Files
rust/tests/ui/unpretty/diagnostic-attr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
361 B
Rust
Raw Normal View History

//@ compile-flags: -Zunpretty=hir
//@ check-pass
//@ edition: 2015
#[diagnostic::on_unimplemented(
message = "My Message for `ImportantTrait<{A}>` implemented for `{Self}`",
label = "My Label",
note = "Note 1",
note = "Note 2"
)]
pub trait ImportantTrait<A> {}
#[diagnostic::do_not_recommend]
impl<T> ImportantTrait<T> for T where T: Clone {}