]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/crashes/ice-6792.rs
Rollup merge of #86263 - fee1-dead:rustdoc-layout-variants, r=camelid
[rust.git] / src / tools / clippy / tests / ui / crashes / ice-6792.rs
1 //! This is a reproducer for the ICE 6792: https://github.com/rust-lang/rust-clippy/issues/6792.
2 //! The ICE is caused by using `TyCtxt::type_of(assoc_type_id)`.
3
4 trait Trait {
5     type Ty;
6
7     fn broken() -> Self::Ty;
8 }
9
10 struct Foo {}
11
12 impl Trait for Foo {
13     type Ty = Foo;
14
15     fn broken() -> Self::Ty {
16         Self::Ty {}
17     }
18 }
19
20 fn main() {}