Fix issues and add test
This commit is contained in:
parent
69a19bfd43
commit
4675690ac4
4 changed files with 15 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// compile-flags: --force-warns bare_trait_objects
|
||||
// check-pass
|
||||
|
||||
#![allow(rust_2018_compatibility)]
|
||||
#![allow(rust_2018_idioms)]
|
||||
|
||||
pub trait SomeTrait {}
|
||||
|
||||
|
|
|
|||
13
src/test/ui/lint/force-warn/force-warn-group.rs
Normal file
13
src/test/ui/lint/force-warn/force-warn-group.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// ignore-test
|
||||
// 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() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue