fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
494 B21 linesraw
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
8use std::fmt;
9
10#[derive(Debug)]
11pub struct Foo;
12
13impl 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
21fn main() {}