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