mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-01 08:18:10 +00:00
```
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`
```
29 lines
983 B
Plaintext
29 lines
983 B
Plaintext
error[E0283]: type annotations needed
|
|
--> $DIR/overflow-computing-ambiguity.rs:15:5
|
|
|
|
|
LL | hello();
|
|
| ^^^^^ cannot infer type of the type parameter `T` declared on the function `hello`
|
|
|
|
|
= note: cannot satisfy `_: Hello`
|
|
help: the following types implement trait `Hello`
|
|
--> $DIR/overflow-computing-ambiguity.rs:8:1
|
|
|
|
|
LL | impl<'a, T> Hello for Foo<'a, &'a T> where Foo<'a, T>: Hello {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo<'a, &'a T>`
|
|
LL |
|
|
LL | impl Hello for Foo<'static, i32> {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo<'static, i32>`
|
|
note: required by a bound in `hello`
|
|
--> $DIR/overflow-computing-ambiguity.rs:12:13
|
|
|
|
|
LL | fn hello<T: Hello>() {}
|
|
| ^^^^^ required by this bound in `hello`
|
|
help: consider specifying the generic argument
|
|
|
|
|
LL | hello::<T>();
|
|
| +++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0283`.
|