diff options
Diffstat (limited to 'src/test/ui/lint/bare-trait-objects-path.rs')
| -rw-r--r-- | src/test/ui/lint/bare-trait-objects-path.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/test/ui/lint/bare-trait-objects-path.rs b/src/test/ui/lint/bare-trait-objects-path.rs index 4c961e998df..74f838e9ed1 100644 --- a/src/test/ui/lint/bare-trait-objects-path.rs +++ b/src/test/ui/lint/bare-trait-objects-path.rs @@ -11,8 +11,14 @@ trait Dyn {} impl Assoc for dyn Dyn {} fn main() { - Dyn::func(); //~ WARN trait objects without an explicit `dyn` are deprecated - ::Dyn::func(); //~ WARN trait objects without an explicit `dyn` are deprecated - Dyn::CONST; //~ WARN trait objects without an explicit `dyn` are deprecated + Dyn::func(); + //~^ WARN trait objects without an explicit `dyn` are deprecated + //~| WARN this was previously accepted by the compiler + ::Dyn::func(); + //~^ WARN trait objects without an explicit `dyn` are deprecated + //~| WARN this was previously accepted by the compiler + Dyn::CONST; + //~^ WARN trait objects without an explicit `dyn` are deprecated + //~| WARN this was previously accepted by the compiler let _: Dyn::Ty; //~ ERROR ambiguous associated type } |
