blob: 4dc0c54633d7225a0226c869d807ecca7b161919 [file]
#![attr = Feature([diagnostic_on_const#0])]
extern crate std;
#[attr = PreludeImport]
use ::std::prelude::rust_2015::*;
//@ compile-flags: -Zunpretty=hir
//@ check-pass
//@ edition: 2015
#[attr = OnUnimplemented {directive: Directive {is_rustc_attr: false,
subcommands: [],
message: FormatString {input: "My Message for `ImportantTrait<{A}>` implemented for `{Self}`",
pieces: [Lit("My Message for `ImportantTrait<"),
Arg(GenericParam {generic_param: "A"}), Lit(">` implemented for `"),
Arg(SelfUpper), Lit("`")]}, label: FormatString {input: "My Label",
pieces: [Lit("My Label")]}, notes: [FormatString {input: "Note 1",
pieces: [Lit("Note 1")]}, FormatString {input: "Note 2",
pieces: [Lit("Note 2")]}]}}]
trait ImportantTrait<A> { }
#[attr = DoNotRecommend]
impl <T> ImportantTrait<T> for T where T: Clone { }
struct X;
#[attr = OnConst {directive: Directive {is_rustc_attr: false, subcommands: [],
message: FormatString {input: "My Message for `ImportantTrait<u8>` implemented for `{Self}`",
pieces: [Lit("My Message for `ImportantTrait<u8>` implemented for `"),
Arg(SelfUpper), Lit("`")]}, label: FormatString {input: "My Label",
pieces: [Lit("My Label")]}, notes: [FormatString {input: "Note 1",
pieces: [Lit("Note 1")]}, FormatString {input: "Note 2",
pieces: [Lit("Note 2")]}]}}]
impl ImportantTrait<u8> for X { }