rust/tests/ui/issues/issue-24308.rs
2023-01-11 09:32:08 +00:00

18 lines
291 B
Rust

// run-pass
pub trait Foo {
fn method1() {}
fn method2();
}
struct Slice<'a, T: 'a>(#[allow(unused_tuple_struct_fields)] &'a [T]);
impl<'a, T: 'a> Foo for Slice<'a, T> {
fn method2() {
<Self as Foo>::method1();
}
}
fn main() {
<Slice<()> as Foo>::method2();
}