]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-69114-static-ty.rs
Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
[rust.git] / src / test / ui / nll / issue-69114-static-ty.rs
1 // Check that borrowck ensures that `static` items have the expected type.
2
3 static FOO: &'static (dyn Fn(&'static u8) + Send + Sync) = &drop;
4
5 fn main() {
6     let n = 42;
7     FOO(&n);
8     //~^ ERROR does not live long enough
9 }