2021-04-13 09:55:54 -05:00
|
|
|
// edition:2018
|
|
|
|
#[deny(bare_trait_objects)]
|
|
|
|
|
|
|
|
fn function(x: &SomeTrait, y: Box<SomeTrait>) {
|
|
|
|
//~^ ERROR trait objects without an explicit `dyn` are deprecated
|
2021-06-16 07:27:44 -05:00
|
|
|
//~| WARN this is accepted in the current edition
|
2021-04-13 09:55:54 -05:00
|
|
|
//~| ERROR trait objects without an explicit `dyn` are deprecated
|
2021-06-16 07:27:44 -05:00
|
|
|
//~| WARN this is accepted in the current edition
|
2021-11-20 04:54:12 -06:00
|
|
|
//~| ERROR trait objects without an explicit `dyn` are deprecated
|
|
|
|
//~| WARN this is accepted in the current edition
|
|
|
|
//~| ERROR trait objects without an explicit `dyn` are deprecated
|
|
|
|
//~| WARN this is accepted in the current edition
|
|
|
|
//~| ERROR trait objects without an explicit `dyn` are deprecated
|
|
|
|
//~| WARN this is accepted in the current edition
|
|
|
|
//~| ERROR trait objects without an explicit `dyn` are deprecated
|
|
|
|
//~| WARN this is accepted in the current edition
|
2021-04-13 09:55:54 -05:00
|
|
|
let _x: &SomeTrait = todo!();
|
2021-11-20 04:54:12 -06:00
|
|
|
//~^ ERROR trait objects without an explicit `dyn` are deprecated
|
|
|
|
//~| WARN this is accepted in the current edition
|
2021-04-13 09:55:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
trait SomeTrait {}
|
|
|
|
|
|
|
|
fn main() {}
|