]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-24308.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-24308.rs
1 // run-pass
2 pub trait Foo {
3     fn method1() {}
4     fn method2();
5 }
6
7 struct Slice<'a, T: 'a>(#[allow(unused_tuple_struct_fields)] &'a [T]);
8
9 impl<'a, T: 'a> Foo for Slice<'a, T> {
10     fn method2() {
11         <Self as Foo>::method1();
12     }
13 }
14
15 fn main() {
16     <Slice<()> as Foo>::method2();
17 }