]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-18232.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / issues / issue-18232.rs
1 // run-pass
2 // pretty-expanded FIXME #23616
3
4 struct Cursor<'a>(::std::marker::PhantomData<&'a ()>);
5
6 trait CursorNavigator {
7     fn init_cursor<'a, 'b:'a>(&'a self, cursor: &mut Cursor<'b>) -> bool;
8 }
9
10 struct SimpleNavigator;
11
12 impl CursorNavigator for SimpleNavigator {
13     fn init_cursor<'a, 'b: 'a>(&'a self, _cursor: &mut Cursor<'b>) -> bool {
14         false
15     }
16 }
17
18 fn main() {
19     let mut c = Cursor(::std::marker::PhantomData);
20     let n = SimpleNavigator;
21     n.init_cursor(&mut c);
22 }