Files
rust/tests/ui/unpretty/diagnostic-attr.rs
2025-03-05 01:51:07 +00:00

14 lines
343 B
Rust

//@ compile-flags: -Zunpretty=hir
//@ check-pass
#[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 {}