]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-ui/recursive-deref-ice.rs
Rollup merge of #107779 - compiler-errors:issue-107775, r=jackh726
[rust.git] / tests / rustdoc-ui / recursive-deref-ice.rs
1 // check-pass
2
3 // ICE found in https://github.com/rust-lang/rust/issues/83123
4
5 pub struct Attribute;
6
7 pub struct Map<'hir> {}
8 impl<'hir> Map<'hir> {
9     pub fn attrs(&self) -> &'hir [Attribute] { &[] }
10 }
11
12 pub struct List<T>(T);
13
14 impl<T> std::ops::Deref for List<T> {
15     type Target = [T];
16     fn deref(&self) -> &[T] {
17         &[]
18     }
19 }