File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
tests/ui-fulldeps/internal-lints Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -117,4 +117,11 @@ pub fn skipped_because_of_annotation<'a>(dcx: DiagCtxtHandle<'a>) {
117
117
fn f ( _x : impl Into < DiagMessage > , _y : impl Into < SubdiagMessage > ) { }
118
118
fn g ( ) {
119
119
f ( crate :: fluent_generated:: no_crate_example, crate :: fluent_generated:: no_crate_example) ;
120
+ f ( "untranslatable diagnostic" , crate :: fluent_generated:: no_crate_example) ;
121
+ //~^ ERROR diagnostics should be created using translatable messages
122
+ f ( crate :: fluent_generated:: no_crate_example, "untranslatable diagnostic" ) ;
123
+ //~^ ERROR diagnostics should be created using translatable messages
124
+ f ( "untranslatable diagnostic" , "untranslatable diagnostic" ) ;
125
+ //~^ ERROR diagnostics should be created using translatable messages
126
+ //~^^ ERROR diagnostics should be created using translatable messages
120
127
}
Original file line number Diff line number Diff line change @@ -46,5 +46,31 @@ error: diagnostics should be created using translatable messages
46
46
LL | let _diag = dcx.struct_err("untranslatable diagnostic");
47
47
| ^^^^^^^^^^
48
48
49
- error: aborting due to 6 previous errors
49
+ error: diagnostics should be created using translatable messages
50
+ --> $DIR/diagnostics.rs:120:5
51
+ |
52
+ LL | f("untranslatable diagnostic", crate::fluent_generated::no_crate_example);
53
+ | ^
54
+
55
+ error: diagnostics should be created using translatable messages
56
+ --> $DIR/diagnostics.rs:122:5
57
+ |
58
+ LL | f(crate::fluent_generated::no_crate_example, "untranslatable diagnostic");
59
+ | ^
60
+
61
+ error: diagnostics should be created using translatable messages
62
+ --> $DIR/diagnostics.rs:124:5
63
+ |
64
+ LL | f("untranslatable diagnostic", "untranslatable diagnostic");
65
+ | ^
66
+
67
+ error: diagnostics should be created using translatable messages
68
+ --> $DIR/diagnostics.rs:124:5
69
+ |
70
+ LL | f("untranslatable diagnostic", "untranslatable diagnostic");
71
+ | ^
72
+ |
73
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
74
+
75
+ error: aborting due to 10 previous errors
50
76
You can’t perform that action at this time.
0 commit comments