2018-08-21 19:47:39 +00:00
|
|
|
// 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
|
|
|
|
2020-10-16 22:37:54 +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
|
|
|
|
2021-08-20 13:59:42 +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
|
|
|
}
|
2018-08-21 19:47:39 +00:00
|
|
|
|
|
|
|
fn main() {}
|