Open
Description
#![feature(trivial_bounds)]
trait Trait {
type Assoc;
}
impl<T> Trait for T {
type Assoc = T;
}
fn foo<T>()
where
u32: Trait<Assoc = T>,
{
}
this results in
warning: trait bound u32: Trait does not depend on any type or lifetime parameters
--> <source>:12:10
|
12 | u32: Trait<Assoc = T>,
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(trivial_bounds)]` on by default
but should not, as the corresponding projection bound does reference a generic parameter (and requires this function to only be called with T = u32
.