]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/dyn-keyword/dyn-2018-edition-lint.rs
2 #[deny(bare_trait_objects)]
4 fn function(x
: &SomeTrait
, y
: Box
<SomeTrait
>) {
5 //~^ ERROR trait objects without an explicit `dyn` are deprecated
6 //~| WARN this is accepted in the current edition
7 //~| ERROR trait objects without an explicit `dyn` are deprecated
8 //~| WARN this is accepted in the current edition
9 //~| ERROR trait objects without an explicit `dyn` are deprecated
10 //~| WARN this is accepted in the current edition
11 //~| ERROR trait objects without an explicit `dyn` are deprecated
12 //~| WARN this is accepted in the current edition
13 //~| ERROR trait objects without an explicit `dyn` are deprecated
14 //~| WARN this is accepted in the current edition
15 //~| ERROR trait objects without an explicit `dyn` are deprecated
16 //~| WARN this is accepted in the current edition
17 let _x
: &SomeTrait
= todo
!();
18 //~^ ERROR trait objects without an explicit `dyn` are deprecated
19 //~| WARN this is accepted in the current edition