os-rust/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.rs
Eric Huss 1b0e78738b Add reference annotations for diagnostic attributes
This adds reference annotations for `diagnostic::on_unimplmented` and
the `diagnostic` namespace in general.
2024-11-18 10:45:26 -08:00

11 lines
292 B
Rust

//@ reference: attributes.diagnostic.on_unimplemented.intro
//@ reference: attributes.diagnostic.on_unimplemented.keys
#[diagnostic::on_unimplemented(message = "Foo", label = "Bar", note = "Baz")]
trait Foo {}
fn takes_foo(_: impl Foo) {}
fn main() {
takes_foo(());
//~^ERROR Foo
}