]> git.lizzy.rs Git - rust.git/blob - tests/ui/dyn-keyword/dyn-angle-brackets.fixed
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / ui / dyn-keyword / dyn-angle-brackets.fixed
1 // See https://github.com/rust-lang/rust/issues/88508
2 // run-rustfix
3 // edition:2018
4 #![deny(bare_trait_objects)]
5 #![allow(dead_code)]
6 #![allow(unused_imports)]
7
8 use std::fmt;
9
10 #[derive(Debug)]
11 pub struct Foo;
12
13 impl fmt::Display for Foo {
14     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15         <dyn fmt::Debug>::fmt(self, f)
16         //~^ ERROR trait objects without an explicit `dyn` are deprecated
17         //~| WARNING this is accepted in the current edition
18     }
19 }
20
21 fn main() {}