]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-ui/recursive-deref-ice.rs
Auto merge of #99843 - oli-obk:is_useful_perf, r=compiler-errors
[rust.git] / src / test / 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 }