]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issue-100075.rs
Rollup merge of #103159 - cuviper:check_pow-final-try_opt, r=Mark-Simulacrum
[rust.git] / src / test / 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() {}