rust/tests/ui/error-codes/E0161.rs

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

21 lines
342 B
Rust
Raw Normal View History

// Check that E0161 is a hard error in all possible configurations that might
// affect it.
2022-04-01 17:13:25 +00:00
//@ revisions: base ul
//@[base] check-fail
//@[ul] check-pass
2021-11-20 12:13:40 +00:00
#![allow(incomplete_features)]
2022-04-01 17:13:25 +00:00
#![cfg_attr(ul, feature(unsized_locals))]
2016-05-27 20:06:24 +00:00
trait Bar {
fn f(self);
}
fn foo(x: Box<dyn Bar>) {
x.f();
2022-04-01 17:13:25 +00:00
//[base]~^ ERROR E0161
2016-05-27 20:06:24 +00:00
}
fn main() {}