]> git.proxmox.com Git - rustc.git/blob - tests/ui/impl-trait/issue-100075.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / impl-trait / issue-100075.rs
1 trait Marker {}
2 impl<T> Marker for T {}
3
4 fn maybe<T>(
5 _t: T,
6 ) -> Option<
7 //removing the line below makes it compile
8 &'static T,
9 > {
10 None
11 }
12
13 fn _g<T>(t: &'static T) -> &'static impl Marker {
14 //~^ ERROR cannot resolve opaque type
15 if let Some(t) = maybe(t) {
16 return _g(t);
17 }
18 todo!()
19 }
20
21 fn main() {}