We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b755501 commit 90b8131Copy full SHA for 90b8131
src/test/ui/issue-55846.rs
@@ -0,0 +1,39 @@
1
+// run-pass
2
+
3
+// Regression test for #55846, which once caused an ICE.
4
5
+use std::marker::PhantomData;
6
7
+struct Foo;
8
9
+struct Bar<A> {
10
+ a: PhantomData<A>,
11
+}
12
13
+impl Fooifier for Foo {
14
+ type Assoc = Foo;
15
16
17
+trait Fooifier {
18
+ type Assoc;
19
20
21
+trait Barifier<H> {
22
+ fn barify();
23
24
25
+impl<H> Barifier<H> for Bar<H> {
26
+ fn barify() {
27
+ println!("All correct!");
28
+ }
29
30
31
+impl Bar<<Foo as Fooifier>::Assoc> {
32
+ fn this_shouldnt_crash() {
33
+ <Self as Barifier<<Foo as Fooifier>::Assoc>>::barify();
34
35
36
37
+fn main() {
38
+ Bar::<Foo>::this_shouldnt_crash();
39
0 commit comments