mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-01 08:53:29 +00:00

This adds reference annotations for `diagnostic::on_unimplmented` and the `diagnostic` namespace in general.
12 lines
292 B
Rust
12 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
|
|
}
|