save-analysis: Add a related test case

This commit is contained in:
Igor Matuszewski 2019-09-08 21:48:08 +02:00
parent b456c820ff
commit 6117faa809

View file

@ -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: Trait>(_: U::Assoc) {}
fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() }
impl A {
fn _inner1<U: Trait>(self, _: U::Assoc) {}
fn _inner2<U: Trait>(self) -> U::Assoc { unimplemented!() }
}
}
fn main() {}