summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/suggest-deferences
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/traits/suggest-deferences')
-rw-r--r--src/test/ui/traits/suggest-deferences/issue-39029.stderr12
-rw-r--r--src/test/ui/traits/suggest-deferences/issue-62530.stderr10
-rw-r--r--src/test/ui/traits/suggest-deferences/multiple-0.stderr10
-rw-r--r--src/test/ui/traits/suggest-deferences/root-obligation.stderr4
4 files changed, 21 insertions, 15 deletions
diff --git a/src/test/ui/traits/suggest-deferences/issue-39029.stderr b/src/test/ui/traits/suggest-deferences/issue-39029.stderr
index 5c324cd38..eb2b88059 100644
--- a/src/test/ui/traits/suggest-deferences/issue-39029.stderr
+++ b/src/test/ui/traits/suggest-deferences/issue-39029.stderr
@@ -2,18 +2,20 @@ error[E0277]: the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied
--> $DIR/issue-39029.rs:16:37
|
LL | let _errors = TcpListener::bind(&bad);
- | ----------------- ^^^^
- | | |
- | | the trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs`
- | | help: consider dereferencing here: `&*bad`
+ | ----------------- ^^^^ the trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs`
+ | |
| required by a bound introduced by this call
|
- = note: required because of the requirements on the impl of `ToSocketAddrs` for `&NoToSocketAddrs`
+ = note: required for `&NoToSocketAddrs` to implement `ToSocketAddrs`
note: required by a bound in `TcpListener::bind`
--> $SRC_DIR/std/src/net/tcp.rs:LL:COL
|
LL | pub fn bind<A: ToSocketAddrs>(addr: A) -> io::Result<TcpListener> {
| ^^^^^^^^^^^^^ required by this bound in `TcpListener::bind`
+help: consider dereferencing here
+ |
+LL | let _errors = TcpListener::bind(&*bad);
+ | +
error: aborting due to previous error
diff --git a/src/test/ui/traits/suggest-deferences/issue-62530.stderr b/src/test/ui/traits/suggest-deferences/issue-62530.stderr
index d129328da..e47ae0b65 100644
--- a/src/test/ui/traits/suggest-deferences/issue-62530.stderr
+++ b/src/test/ui/traits/suggest-deferences/issue-62530.stderr
@@ -2,10 +2,8 @@ error[E0277]: the trait bound `&String: SomeTrait` is not satisfied
--> $DIR/issue-62530.rs:13:26
|
LL | takes_type_parameter(&string); // Error
- | -------------------- ^^^^^^^
- | | |
- | | the trait `SomeTrait` is not implemented for `&String`
- | | help: consider dereferencing here: `&*string`
+ | -------------------- ^^^^^^^ the trait `SomeTrait` is not implemented for `&String`
+ | |
| required by a bound introduced by this call
|
note: required by a bound in `takes_type_parameter`
@@ -13,6 +11,10 @@ note: required by a bound in `takes_type_parameter`
|
LL | fn takes_type_parameter<T>(_x: T) where T: SomeTrait {}
| ^^^^^^^^^ required by this bound in `takes_type_parameter`
+help: consider dereferencing here
+ |
+LL | takes_type_parameter(&*string); // Error
+ | +
error: aborting due to previous error
diff --git a/src/test/ui/traits/suggest-deferences/multiple-0.stderr b/src/test/ui/traits/suggest-deferences/multiple-0.stderr
index efb3c7d12..6a4d4b8d5 100644
--- a/src/test/ui/traits/suggest-deferences/multiple-0.stderr
+++ b/src/test/ui/traits/suggest-deferences/multiple-0.stderr
@@ -2,10 +2,8 @@ error[E0277]: the trait bound `&Baz: Happy` is not satisfied
--> $DIR/multiple-0.rs:34:9
|
LL | foo(&baz);
- | --- ^^^^
- | | |
- | | the trait `Happy` is not implemented for `&Baz`
- | | help: consider dereferencing here: `&***baz`
+ | --- ^^^^ the trait `Happy` is not implemented for `&Baz`
+ | |
| required by a bound introduced by this call
|
note: required by a bound in `foo`
@@ -13,6 +11,10 @@ note: required by a bound in `foo`
|
LL | fn foo<T>(_: T) where T: Happy {}
| ^^^^^ required by this bound in `foo`
+help: consider dereferencing here
+ |
+LL | foo(&***baz);
+ | +++
error: aborting due to previous error
diff --git a/src/test/ui/traits/suggest-deferences/root-obligation.stderr b/src/test/ui/traits/suggest-deferences/root-obligation.stderr
index 16e03e79c..76663ace7 100644
--- a/src/test/ui/traits/suggest-deferences/root-obligation.stderr
+++ b/src/test/ui/traits/suggest-deferences/root-obligation.stderr
@@ -7,8 +7,8 @@ LL | .filter(|c| "aeiou".contains(c))
| required by a bound introduced by this call
|
= help: the trait `Fn<(char,)>` is not implemented for `char`
- = note: required because of the requirements on the impl of `FnOnce<(char,)>` for `&char`
- = note: required because of the requirements on the impl of `Pattern<'_>` for `&char`
+ = note: required for `&char` to implement `FnOnce<(char,)>`
+ = note: required for `&char` to implement `Pattern<'_>`
note: required by a bound in `core::str::<impl str>::contains`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
|