mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
09f16b596d
Do not attempt to provide an accurate suggestion for `impl Trait` in bare trait types when linting. Instead, only do the object safety check when an E0782 is already going to be emitted in the 2021 edition. Fix #120241.
15 lines
535 B
Text
15 lines
535 B
Text
error: return types are denoted using `->`
|
|
--> $DIR/avoid-ice-on-warning.rs:4:23
|
|
|
|
|
LL | fn call_this<F>(f: F) : Fn(&str) + call_that {}
|
|
| ^ help: use `->` instead
|
|
|
|
error[E0405]: cannot find trait `call_that` in this scope
|
|
--> $DIR/avoid-ice-on-warning.rs:4:36
|
|
|
|
|
LL | fn call_this<F>(f: F) : Fn(&str) + call_that {}
|
|
| ^^^^^^^^^ not found in this scope
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0405`.
|