rust/tests/ui-fulldeps/session-diagnostic/invalid-variable.rs
Nicholas Nethercote 57cd5e6551 Use rustc_fluent_macro::fluent_messages! directly.
Currently we always do this:
```
use rustc_fluent_macro::fluent_messages;
...
fluent_messages! { "./example.ftl" }
```
But there is no need, we can just do this everywhere:
```
rustc_fluent_macro::fluent_messages! { "./example.ftl" }
```
which is shorter.
2023-11-26 08:38:40 +11:00

21 lines
524 B
Rust

// run-fail
// compile-flags: --test
// test that messages referencing non-existent fields cause test failures
#![feature(rustc_private)]
#![crate_type = "lib"]
extern crate rustc_driver;
extern crate rustc_fluent_macro;
extern crate rustc_macros;
extern crate rustc_errors;
use rustc_macros::Diagnostic;
use rustc_errors::{SubdiagnosticMessage, DiagnosticMessage};
extern crate rustc_session;
rustc_fluent_macro::fluent_messages! { "./example.ftl" }
#[derive(Diagnostic)]
#[diag(no_crate_bad_reference)]
struct BadRef;