]> git.lizzy.rs Git - rust.git/blob - tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs
internally change regions to be covariant
[rust.git] / tests / ui / regions / regions-infer-region-in-fn-but-not-type.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(unused_variables)]
4 #![allow(non_camel_case_types)]
5
6
7 // check that the &isize here does not cause us to think that `foo`
8 // contains region pointers
9 // pretty-expanded FIXME #23616
10
11 struct foo(Box<dyn FnMut(&isize)+'static>);
12
13 fn take_foo<T:'static>(x: T) {}
14
15 fn have_foo(f: foo) {
16     take_foo(f);
17 }
18
19 fn main() {}