rust/tests/ui/diagnostic_namespace/suggest_typos.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

20 lines
529 B
Rust

//@ reference: attributes.diagnostic.namespace.unknown-invalid-syntax
#![deny(unknown_or_malformed_diagnostic_attributes)]
#[diagnostic::onunimplemented]
//~^ERROR unknown diagnostic attribute
//~^^HELP an attribute with a similar name exists
trait X{}
#[diagnostic::un_onimplemented]
//~^ERROR unknown diagnostic attribute
//~^^HELP an attribute with a similar name exists
trait Y{}
#[diagnostic::on_implemented]
//~^ERROR unknown diagnostic attribute
//~^^HELP an attribute with a similar name exists
trait Z{}
fn main(){}