d1fcf61117
Instead of loading the Fluent resources for every crate in `rustc_error_messages`, each crate generates typed identifiers for its own diagnostics and creates a static which are pulled together in the `rustc_driver` crate and provided to the diagnostic emitter. Signed-off-by: David Wood <david.wood@huawei.com>
88 lines
2.6 KiB
Plaintext
88 lines
2.6 KiB
Plaintext
error: could not open Fluent resource
|
|
--> $DIR/test.rs:24:24
|
|
|
|
|
LL | fluent_messages! { "/definitely_does_not_exist.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: os-specific message
|
|
|
|
error: could not open Fluent resource
|
|
--> $DIR/test.rs:31:24
|
|
|
|
|
LL | fluent_messages! { "../definitely_does_not_exist.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: os-specific message
|
|
|
|
error: could not parse Fluent resource
|
|
--> $DIR/test.rs:38:24
|
|
|
|
|
LL | fluent_messages! { "./missing-message.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: see additional errors emitted
|
|
|
|
error: expected a message field for "no_crate_missing_message"
|
|
--> ./missing-message.ftl:1:1
|
|
|
|
|
1 | no_crate_missing_message =
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
error: overrides existing message: `no_crate_a_b_key`
|
|
--> $DIR/test.rs:45:24
|
|
|
|
|
LL | fluent_messages! { "./duplicate.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: name `no_crate_this-slug-has-hyphens` contains a '-' character
|
|
--> $DIR/test.rs:52:24
|
|
|
|
|
LL | fluent_messages! { "./slug-with-hyphens.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: replace any '-'s with '_'s
|
|
|
|
error: attribute `label-has-hyphens` contains a '-' character
|
|
--> $DIR/test.rs:59:24
|
|
|
|
|
LL | fluent_messages! { "./label-with-hyphens.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: replace any '-'s with '_'s
|
|
|
|
error: name `with-hyphens` contains a '-' character
|
|
--> $DIR/test.rs:76:24
|
|
|
|
|
LL | fluent_messages! { "./missing-crate-name.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: replace any '-'s with '_'s
|
|
|
|
error: name `with-hyphens` does not start with the crate name
|
|
--> $DIR/test.rs:76:24
|
|
|
|
|
LL | fluent_messages! { "./missing-crate-name.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: prepend `no_crate_` to the slug name: `no_crate_with_hyphens`
|
|
|
|
error: name `no-crate_foo` contains a '-' character
|
|
--> $DIR/test.rs:76:24
|
|
|
|
|
LL | fluent_messages! { "./missing-crate-name.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: replace any '-'s with '_'s
|
|
|
|
error: referenced message `message` does not exist (in message `no_crate_missing_message_ref`)
|
|
--> $DIR/test.rs:92:24
|
|
|
|
|
LL | fluent_messages! { "./missing-message-ref.ftl" }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: you may have meant to use a variable reference (`{$message}`)
|
|
|
|
error: aborting due to 10 previous errors
|
|
|