Skip to content

Commit 7730ef1

Browse files
committed
save-analysis: Add a related test case
1 parent 28ef141 commit 7730ef1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// check-pass
2+
// compile-flags: -Zsave-analysis
3+
4+
// Check that this doesn't ICE when processing associated const in formal
5+
// argument and return type of functions defined inside function/method scope.
6+
7+
pub trait Trait {
8+
type Assoc;
9+
}
10+
11+
pub struct A;
12+
13+
pub fn func() {
14+
fn _inner1<U: Trait>(_: U::Assoc) {}
15+
fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() }
16+
17+
impl A {
18+
fn _inner1<U: Trait>(self, _: U::Assoc) {}
19+
fn _inner2<U: Trait>(self) -> U::Assoc { unimplemented!() }
20+
}
21+
}
22+
23+
fn main() {}

0 commit comments

Comments
 (0)