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