about summary refs log tree commit diff
path: root/src/test/ui/dyn-keyword/dyn-angle-brackets.fixed
blob: 25caa6a8030ff5a5d587e2f784226ad2139a9444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// See https://github.com/rust-lang/rust/issues/88508
// run-rustfix
// edition:2018
#![deny(bare_trait_objects)]
#![allow(dead_code)]
#![allow(unused_imports)]

use std::fmt;

#[derive(Debug)]
pub struct Foo;

impl fmt::Display for Foo {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <dyn fmt::Debug>::fmt(self, f)
        //~^ ERROR trait objects without an explicit `dyn` are deprecated
        //~| WARNING this is accepted in the current edition
        //~| ERROR trait objects without an explicit `dyn` are deprecated
        //~| WARNING this is accepted in the current edition
    }
}

fn main() {}