mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
4fa5fb684e
this prevents higher ranked goals from guiding selection
36 lines
1.4 KiB
Plaintext
36 lines
1.4 KiB
Plaintext
error[E0283]: type annotations needed
|
|
--> $DIR/leak-check-in-selection-3.rs:18:5
|
|
|
|
|
LL | impls_leak::<Box<_>>();
|
|
| ^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `impls_leak`
|
|
|
|
|
note: multiple `impl`s satisfying `for<'a> Box<_>: Leak<'a>` 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 by a bound in `impls_leak`
|
|
--> $DIR/leak-check-in-selection-3.rs:12:18
|
|
|
|
|
LL | fn impls_leak<T: for<'a> Leak<'a>>() {}
|
|
| ^^^^^^^^^^^^^^^^ required by this bound in `impls_leak`
|
|
|
|
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: cannot satisfy `for<'a> Box<_>: IndirectLeak<'a>`
|
|
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 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0283`.
|