rust/src/test/ui/lint/force-warn/force-warn-group.rs

13 lines
290 B
Rust
Raw Normal View History

2021-06-01 11:01:13 -05:00
// compile-flags: --force-warns rust_2018_idioms
// check-pass
#![allow(rust_2018_idioms)]
pub trait SomeTrait {}
pub fn function(_x: Box<SomeTrait>) {}
//~^ WARN trait objects without an explicit `dyn` are deprecated
//~| WARN this was previously accepted by the compiler
fn main() {}