rust/src/test/ui/impl-trait/issue-67166.rs
Matthew Jasper f97070db90 Forbid lifetime elision in let position impl Trait
This is consistent with types.
2020-06-11 16:24:01 +01:00

11 lines
223 B
Rust

// Regression test for #67166
#![feature(impl_trait_in_bindings)]
#![allow(incomplete_features)]
pub fn run() {
let _foo: Box<impl Copy + '_> = Box::new(());
//~^ ERROR: missing lifetime specifier
}
fn main() {}