Do not suggest incorrect syntax on pattern borrow error
This commit is contained in:
parent
a55c2eb325
commit
0e7e9382fa
3 changed files with 19 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue