rust/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.stderr
Esteban Küber eeadffd926 When more than a single impl and less than 4 could apply, point at them
```
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
  --> $DIR/issue-67185-2.rs:21:6
   |
LL | impl Foo for FooImpl {}
   |      ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
   |
help: the following other types implement trait `Bar`
  --> $DIR/issue-67185-2.rs:9:1
   |
LL | impl Bar for [u16; 4] {}
   | ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
note: required by a bound in `Foo`
  --> $DIR/issue-67185-2.rs:14:30
   |
LL | trait Foo
   |       --- required by a bound in this trait
LL | where
LL |     [<u8 as Baz>::Quaks; 2]: Bar,
   |                              ^^^ required by this bound in `Foo`
```
2025-10-31 20:44:01 +00:00

38 lines
1.4 KiB
Text

error[E0277]: the trait bound `Tuple: From<u8>` is not satisfied
--> $DIR/suggest_tuple_wrap_root_obligation.rs:22:24
|
LL | convert_into_tuple(42_u8);
| ------------------ ^^^^^ unsatisfied trait bound
| |
| required by a bound introduced by this call
|
help: the trait `From<u8>` is not implemented for `Tuple`
--> $DIR/suggest_tuple_wrap_root_obligation.rs:1:1
|
LL | struct Tuple;
| ^^^^^^^^^^^^
help: the following other types implement trait `From<T>`
--> $DIR/suggest_tuple_wrap_root_obligation.rs:3:1
|
LL | impl From<(u8,)> for Tuple {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `Tuple` implements `From<(u8,)>`
...
LL | impl From<(u8, u8)> for Tuple {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Tuple` implements `From<(u8, u8)>`
...
LL | impl From<(u8, u8, u8)> for Tuple {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Tuple` implements `From<(u8, u8, u8)>`
= note: required for `u8` to implement `Into<Tuple>`
note: required by a bound in `convert_into_tuple`
--> $DIR/suggest_tuple_wrap_root_obligation.rs:19:32
|
LL | fn convert_into_tuple(_x: impl Into<Tuple>) {}
| ^^^^^^^^^^^ required by this bound in `convert_into_tuple`
help: use a unary tuple instead
|
LL | convert_into_tuple((42_u8,));
| + ++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.