Files
rust/tests/ui/traits/negative-bounds/on-unimplemented.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

15 lines
299 B
Rust

//@ reference: attributes.diagnostic.on_unimplemented.intro
#![feature(negative_bounds)]
#[diagnostic::on_unimplemented(message = "this ain't fooing")]
trait Foo {}
struct NotFoo;
fn hello() -> impl !Foo {
//~^ ERROR the trait bound `NotFoo: !Foo` is not satisfied
NotFoo
}
fn main() {}