about summary refs log tree commit diff
path: root/tests/ui/unpretty/diagnostic-attr.rs
blob: 4ef85c71f90e213c9c8aa6f90767657cda882d6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ 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 {}