We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdeec5d commit e51bb0eCopy full SHA for e51bb0e
1 file changed
tests/ui/crashes/ice-6793.rs
@@ -0,0 +1,23 @@
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
+
4
+trait Trait {
5
+ type Ty: 'static + Clone;
6
7
+ fn broken() -> Self::Ty;
8
+}
9
10
+#[derive(Clone)]
11
+struct MyType {
12
+ x: i32,
13
14
15
+impl Trait for MyType {
16
+ type Ty = MyType;
17
18
+ fn broken() -> Self::Ty {
19
+ Self::Ty { x: 1 }
20
+ }
21
22
23
+fn main() {}
0 commit comments