2025-08-21 13:56:56 +02:00
|
|
|
error[E0282]: type annotations needed
|
2025-06-06 16:28:05 +00:00
|
|
|
--> $DIR/auto-trait-selection.rs:15:16
|
2024-06-04 13:55:15 +00:00
|
|
|
|
|
|
|
|
|
LL | if false { is_trait(foo()) } else { Default::default() }
|
2025-08-21 13:56:56 +02:00
|
|
|
| ^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `is_trait`
|
2025-06-06 16:28:05 +00:00
|
|
|
|
|
|
|
|
|
help: consider specifying the generic arguments
|
|
|
|
|
|
|
|
|
|
|
LL | if false { is_trait::<T, U>(foo()) } else { Default::default() }
|
|
|
|
|
| ++++++++
|
2024-06-04 13:55:15 +00:00
|
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
|
|
2025-08-21 13:56:56 +02:00
|
|
|
For more information about this error, try `rustc --explain E0282`.
|