rust/src/test/ui/never_type/defaulted-never-note.stderr

15 lines
757 B
Plaintext

error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfied
--> $DIR/defaulted-never-note.rs:26:5
|
LL | fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
| ----------------------------- required by this bound in `foo`
...
LL | foo(_x);
| ^^^ the trait `ImplementedForUnitButNotNever` is not implemented for `!`
|
= note: the trait is implemented for `()`. Possibly this error has been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information). Consider whether you meant to use the type `()` here instead.
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.