rust/tests/ui/type-alias-impl-trait/underef-index-out-of-bounds...

24 lines
683 B
Plaintext

error[E0308]: mismatched types
--> $DIR/underef-index-out-of-bounds-121472.rs:14:20
|
LL | type Alias<'a> = impl T;
| ------ the expected opaque type
...
LL | with_positive(|&n| ());
| ^^
| |
| expected opaque type, found `&_`
| expected due to this
|
= note: expected opaque type `Alias<'_>`
found reference `&_`
help: consider removing `&` from the pattern
|
LL - with_positive(|&n| ());
LL + with_positive(|n| ());
|
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.