]> git.proxmox.com Git - rustc.git/blob - src/test/ui/save-analysis/issue-63663.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / save-analysis / issue-63663.rs
1 // check-pass
2 // compile-flags: -Zsave-analysis
3
4 pub trait Trait {
5 type Assoc;
6 }
7
8 pub struct A;
9
10 trait Generic<T> {}
11 impl<T> Generic<T> for () {}
12
13 // Don't ICE when resolving type paths in return type `impl Trait`
14 fn assoc_in_opaque_type_bounds<U: Trait>() -> impl Generic<U::Assoc> {}
15
16 // Check that this doesn't ICE when processing associated const in formal
17 // argument and return type of functions defined inside function/method scope.
18 pub fn func() {
19 fn _inner1<U: Trait>(_: U::Assoc) {}
20 fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() }
21
22 impl A {
23 fn _inner1<U: Trait>(self, _: U::Assoc) {}
24 fn _inner2<U: Trait>(self) -> U::Assoc { unimplemented!() }
25 }
26 }
27
28 fn main() {}