File tree 3 files changed +32
-1
lines changed
tests/ui-fulldeps/fluent-messages
3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change
1
+ no_crate_foo = foo
2
+
3
+ # This file tests error reporting for
4
+ # fluent files with many lines.
5
+ # The error message should point to the correct line number
6
+ # and include no more context than necessary.
7
+
8
+ no_crate_bar =
9
+
10
+ no_crate_baz =
11
+ baz
Original file line number Diff line number Diff line change @@ -80,3 +80,8 @@ mod bad_escape {
80
80
//~| ERROR invalid escape `\"`
81
81
//~| ERROR invalid escape `\'`
82
82
}
83
+
84
+ mod many_lines {
85
+ rustc_fluent_macro:: fluent_messages! { "./many-lines.ftl" }
86
+ //~^ ERROR could not parse Fluent resource
87
+ }
Original file line number Diff line number Diff line change @@ -103,5 +103,20 @@ LL | rustc_fluent_macro::fluent_messages! { "./invalid-escape.ftl" }
103
103
|
104
104
= note: Fluent does not interpret these escape sequences (<https://projectfluent.org/fluent/guide/special.html>)
105
105
106
- error: aborting due to 13 previous errors
106
+ error: could not parse Fluent resource
107
+ --> $DIR/test.rs:85:44
108
+ |
109
+ LL | rustc_fluent_macro::fluent_messages! { "./many-lines.ftl" }
110
+ | ^^^^^^^^^^^^^^^^^^
111
+ |
112
+ = help: see additional errors emitted
113
+
114
+ error: expected a message field for "no_crate_bar"
115
+ --> ./many-lines.ftl:15:1
116
+ |
117
+ 15 | no_crate_bar =
118
+ | ^^^^^^^^^^^^^^
119
+ |
120
+
121
+ error: aborting due to 14 previous errors
107
122
You can’t perform that action at this time.
0 commit comments