rust/tests/ui/nll/user-annotations/promoted-annotation.rs

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

11 lines
208 B
Rust
Raw Normal View History

// Test that type annotations are checked in promoted constants correctly.
fn foo<'a>() {
let x = 0;
let f = &drop::<&'a i32>;
f(&x);
//~^ ERROR `x` does not live long enough
}
fn main() {}