rust/tests/ui/nll/issue-69114-static-ty.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
227 B
Rust
Raw Normal View History

2020-02-13 14:29:30 -06:00
// Check that borrowck ensures that `static` items have the expected type.
static FOO: &'static (dyn Fn(&'static u8) + Send + Sync) = &drop;
fn main() {
let n = 42;
FOO(&n);
//~^ ERROR does not live long enough
}