diff --git a/src/test/ui/save-analysis/issue-63663.rs b/src/test/ui/save-analysis/issue-63663.rs new file mode 100644 index 0000000000000..ccbe13f1a1b71 --- /dev/null +++ b/src/test/ui/save-analysis/issue-63663.rs @@ -0,0 +1,23 @@ +// check-pass +// compile-flags: -Zsave-analysis + +// Check that this doesn't ICE when processing associated const in formal +// argument and return type of functions defined inside function/method scope. + +pub trait Trait { + type Assoc; +} + +pub struct A; + +pub fn func() { + fn _inner1(_: U::Assoc) {} + fn _inner2() -> U::Assoc { unimplemented!() } + + impl A { + fn _inner1(self, _: U::Assoc) {} + fn _inner2(self) -> U::Assoc { unimplemented!() } + } +} + +fn main() {}