2024-01-23 18:24:40 +00:00
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 {}
2024-07-06 03:07:46 +00:00
| ^
|
help: use `->` instead
|
2024-07-09 22:30:26 +00:00
LL - fn call_this<F>(f: F) : Fn(&str) + call_that {}
LL + fn call_this<F>(f: F) -> Fn(&str) + call_that {}
|
2024-01-23 18:24:40 +00:00
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
2024-10-04 16:10:28 +02:00
error[E0782]: expected a type, found a trait
--> $DIR/avoid-ice-on-warning.rs:4:25
|
LL | fn call_this<F>(f: F) : Fn(&str) + call_that {}
| ^^^^^^^^^^^^^^^^^^^^
|
help: `Fn(&str) + call_that` is dyn-incompatible, use `impl Fn(&str) + call_that` to return an opaque type, as long as you return a single underlying type
|
LL | fn call_this<F>(f: F) : impl Fn(&str) + call_that {}
| ++++
error: aborting due to 3 previous errors
2024-01-23 18:24:40 +00:00
2024-10-04 16:10:28 +02:00
Some errors have detailed explanations: E0405, E0782.
For more information about an error, try `rustc --explain E0405`.