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

17 lines
777 B
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfied
2018-12-25 08:56:47 -07:00
--> $DIR/defaulted-never-note.rs:26:5
2018-08-08 14:28:26 +02:00
|
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: https://github.com/rust-lang/rust/issues/48950 for more info). Consider whether you meant to use the type `()` here instead.
note: required by `foo`
2018-12-25 08:56:47 -07:00
--> $DIR/defaulted-never-note.rs:21:1
2018-08-08 14:28:26 +02:00
|
LL | fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.