File tree 2 files changed +23
-0
lines changed
tests/ui-fulldeps/session-diagnostic
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,5 @@ no_crate_example = this is an example message used in testing
3
3
.help = with a help
4
4
.suggestion = with a suggestion
5
5
.label = with a label
6
+
7
+ no_crate_bad_reference = { $r } does not exist
Original file line number Diff line number Diff line change
1
+ // run-fail
2
+ // compile-flags: --test
3
+ // test that messages referencing non-existent fields cause test failures
4
+
5
+ #![ feature( rustc_private) ]
6
+ #![ crate_type = "lib" ]
7
+
8
+ extern crate rustc_driver;
9
+ extern crate rustc_fluent_macro;
10
+ extern crate rustc_macros;
11
+ extern crate rustc_errors;
12
+ use rustc_fluent_macro:: fluent_messages;
13
+ use rustc_macros:: Diagnostic ;
14
+ use rustc_errors:: { SubdiagnosticMessage , DiagnosticMessage } ;
15
+ extern crate rustc_session;
16
+
17
+ fluent_messages ! { "./example.ftl" }
18
+
19
+ #[ derive( Diagnostic ) ]
20
+ #[ diag( no_crate_bad_reference) ]
21
+ struct BadRef ;
You can’t perform that action at this time.
0 commit comments