Do not suggest incorrect syntax on pattern borrow error

This commit is contained in:
Esteban Küber 2019-04-29 18:12:57 -07:00
parent a55c2eb325
commit 0e7e9382fa
3 changed files with 19 additions and 9 deletions

View file

@ -24,7 +24,6 @@ LL | let &&x = &1isize as &T;
|
= note: expected type `dyn T`
found type `&_`
= help: did you mean `x: &dyn T`?
error[E0308]: mismatched types
--> $DIR/destructure-trait-ref.rs:36:11
@ -34,7 +33,6 @@ LL | let &&&x = &(&1isize as &T);
|
= note: expected type `dyn T`
found type `&_`
= help: did you mean `x: &dyn T`?
error[E0308]: mismatched types
--> $DIR/destructure-trait-ref.rs:41:13

View file

@ -16,7 +16,6 @@ LL | fn agh(&&bar: &u32) {
|
= note: expected type `u32`
found type `&_`
= help: did you mean `bar: &u32`?
error[E0308]: mismatched types
--> $DIR/issue-38371.rs:21:8