]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0161.rs
Rollup merge of #101388 - compiler-errors:issue-101376, r=fee1-dead
[rust.git] / src / test / ui / error-codes / E0161.rs
1 // Check that E0161 is a hard error in all possible configurations that might
2 // affect it.
3
4 // revisions: base ul
5 //[base] check-fail
6 //[ul] check-pass
7
8 #![allow(incomplete_features)]
9 #![cfg_attr(ul, feature(unsized_locals))]
10
11 trait Bar {
12     fn f(self);
13 }
14
15 fn foo(x: Box<dyn Bar>) {
16     x.f();
17     //[base]~^ ERROR E0161
18 }
19
20 fn main() {}