Closed
Description
This code successfully compiles on stable and nightly, but should supposedly be rejected for one of two reasons - incompatible method signature or "a
does not live long enough"
trait Tr {
fn f<T>(_: T) {}
}
impl Tr for u8 {
fn f<T>(_: T) where T: 'static {} // Should this be rejected?
}
fn main() {
let a = 10;
u8::f(a);
u8::f(&a); // Or should *this* be rejected?
}
cc @arielb1
Metadata
Metadata
Assignees
Labels
No labels