]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/defaulted-never-note.fallback.stderr
Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomez
[rust.git] / tests / ui / never_type / defaulted-never-note.fallback.stderr
1 error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfied
2   --> $DIR/defaulted-never-note.rs:30:9
3    |
4 LL |     foo(_x);
5    |     --- ^^ the trait `ImplementedForUnitButNotNever` is not implemented for `!`
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = help: the trait `ImplementedForUnitButNotNever` is implemented for `()`
10    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
11    = help: did you intend to use the type `()` here instead?
12 note: required by a bound in `foo`
13   --> $DIR/defaulted-never-note.rs:25:11
14    |
15 LL | fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
16    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0277`.