mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
f77394fdf3
reverts #119820
30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
error[E0283]: type annotations needed
|
|
--> $DIR/leak-check-in-selection-3.rs:35:5
|
|
|
|
|
LL | impls_indirect_leak::<Box<_>>();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `impls_indirect_leak`
|
|
|
|
|
note: multiple `impl`s satisfying `Box<_>: Leak<'_>` found
|
|
--> $DIR/leak-check-in-selection-3.rs:9:1
|
|
|
|
|
LL | impl Leak<'_> for Box<u32> {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL | impl Leak<'static> for Box<u16> {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
note: required for `Box<_>` to implement `for<'a> IndirectLeak<'a>`
|
|
--> $DIR/leak-check-in-selection-3.rs:23:23
|
|
|
|
|
LL | impl<'a, T: Leak<'a>> IndirectLeak<'a> for T {}
|
|
| -------- ^^^^^^^^^^^^^^^^ ^
|
|
| |
|
|
| unsatisfied trait bound introduced here
|
|
note: required by a bound in `impls_indirect_leak`
|
|
--> $DIR/leak-check-in-selection-3.rs:25:27
|
|
|
|
|
LL | fn impls_indirect_leak<T: for<'a> IndirectLeak<'a>>() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `impls_indirect_leak`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0283`.
|