]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-69114-static-ty.rs
Rollup merge of #105216 - GuillaumeGomez:rm-unused-gui-test, r=notriddle
[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 }