]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-ui/deref-generic.rs
Rollup merge of #107348 - lcnr:project-solve-new, r=compiler-errors
[rust.git] / tests / rustdoc-ui / deref-generic.rs
1 // check-pass
2 // #81395: Fix ICE when recursing into Deref target only differing in type args
3
4 pub struct Generic<T>(T);
5
6 impl<'a> std::ops::Deref for Generic<&'a mut ()> {
7     type Target = Generic<&'a ()>;
8     fn deref(&self) -> &Self::Target {
9         unimplemented!()
10     }
11 }
12
13 impl<'a> Generic<&'a ()> {
14     pub fn some_method(&self) {}
15 }