diff options
Diffstat (limited to 'tests/ui/inference/deref-suggestion.stderr')
-rw-r--r-- | tests/ui/inference/deref-suggestion.stderr | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/tests/ui/inference/deref-suggestion.stderr b/tests/ui/inference/deref-suggestion.stderr index 1626032ae..c58aab422 100644 --- a/tests/ui/inference/deref-suggestion.stderr +++ b/tests/ui/inference/deref-suggestion.stderr @@ -98,19 +98,23 @@ error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:40:17 | LL | let s = S { u }; - | ^ - | | - | expected `&u32`, found integer - | help: consider borrowing here: `u: &u` + | ^ expected `&u32`, found integer + | +help: consider borrowing here + | +LL | let s = S { u: &u }; + | ++++ error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:42:20 | LL | let s = S { u: u }; - | ^ - | | - | expected `&u32`, found integer - | help: consider borrowing here: `&u` + | ^ expected `&u32`, found integer + | +help: consider borrowing here + | +LL | let s = S { u: &u }; + | + error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:45:17 @@ -175,6 +179,19 @@ LL | || }; | |_____`if` and `else` have incompatible types | expected `i32`, found `&{integer}` -error: aborting due to 13 previous errors +error[E0308]: mismatched types + --> $DIR/deref-suggestion.rs:81:15 + | +LL | if foo == bar { + | --- ^^^ expected `Foo`, found `&Foo` + | | + | expected because this is `Foo` + | +help: consider dereferencing the borrow + | +LL | if foo == *bar { + | + + +error: aborting due to 14 previous errors For more information about this error, try `rustc --explain E0308`. |