]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/crashes/ice-6793.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / crashes / ice-6793.rs
CommitLineData
f20569fa
XL
1//! This is a reproducer for the ICE 6793: https://github.com/rust-lang/rust-clippy/issues/6793.
2//! The ICE is caused by using `TyCtxt::type_of(assoc_type_id)`, which is the same as the ICE 6792.
3
4trait Trait {
5 type Ty: 'static + Clone;
6
7 fn broken() -> Self::Ty;
8}
9
10#[derive(Clone)]
11struct MyType {
12 x: i32,
13}
14
15impl Trait for MyType {
16 type Ty = MyType;
17
18 fn broken() -> Self::Ty {
19 Self::Ty { x: 1 }
20 }
21}
22
23fn main() {}