mirror of https://github.com/rust-lang/rust
15 lines
349 B
Rust
15 lines
349 B
Rust
trait Foo {
|
|
type F<'a>;
|
|
|
|
fn identity<'a>(t: &'a Self::F<'a>) -> &'a Self::F<'a> { t }
|
|
}
|
|
|
|
impl <T, T1> Foo for T {
|
|
//~^ ERROR: the type parameter `T1` is not constrained
|
|
type F<T1> = &[u8];
|
|
//~^ ERROR: the name `T1` is already used for
|
|
//~| ERROR: `&` without an explicit lifetime name cannot be used here
|
|
}
|
|
|
|
fn main() {}
|