Fix issues and add test

This commit is contained in:
Ryan Levick 2021-06-01 18:01:13 +02:00
parent 69a19bfd43
commit 4675690ac4
4 changed files with 15 additions and 3 deletions

View file

@ -1,7 +1,7 @@
// compile-flags: --force-warns bare_trait_objects
// check-pass
#![allow(rust_2018_compatibility)]
#![allow(rust_2018_idioms)]
pub trait SomeTrait {}

View 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() {}