1 // normalize-stderr-test "note.*" -> "note: os-specific message"
3 #![feature(rustc_private)]
6 extern crate rustc_macros;
7 use rustc_macros::fluent_messages;
9 /// Copy of the relevant `DiagnosticMessage` variant constructed by `fluent_messages` as it
10 /// expects `crate::DiagnosticMessage` to exist.
11 pub enum DiagnosticMessage {
12 FluentIdentifier(std::borrow::Cow<'static, str>, Option<std::borrow::Cow<'static, str>>),
15 /// Copy of the relevant `SubdiagnosticMessage` variant constructed by `fluent_messages` as it
16 /// expects `crate::SubdiagnosticMessage` to exist.
17 pub enum SubdiagnosticMessage {
18 FluentAttr(std::borrow::Cow<'static, str>),
21 mod missing_absolute {
22 use super::fluent_messages;
25 missing_absolute => "/definitely_does_not_exist.ftl",
26 //~^ ERROR could not open Fluent resource
30 mod missing_relative {
31 use super::fluent_messages;
34 missing_relative => "../definitely_does_not_exist.ftl",
35 //~^ ERROR could not open Fluent resource
40 use super::fluent_messages;
43 missing_message => "./missing-message.ftl",
44 //~^ ERROR could not parse Fluent resource
49 use super::fluent_messages;
52 //~^ ERROR the name `a_b_key` is defined multiple times
53 a => "./duplicate-a.ftl",
54 a_b => "./duplicate-a-b.ftl",
55 //~^ ERROR overrides existing message: `a_b_key`
59 mod slug_with_hyphens {
60 use super::fluent_messages;
63 slug_with_hyphens => "./slug-with-hyphens.ftl",
64 //~^ ERROR name `slug_with_hyphens_this-slug-has-hyphens` contains a '-' character
68 mod label_with_hyphens {
69 use super::fluent_messages;
72 label_with_hyphens => "./label-with-hyphens.ftl",
73 //~^ ERROR attribute `label-has-hyphens` contains a '-' character
78 use super::fluent_messages;
81 valid => "./valid.ftl",
84 use self::fluent_generated::{DEFAULT_LOCALE_RESOURCES, valid_key};
87 mod missing_crate_name {
88 use super::fluent_messages;
91 test_crate => "./missing-crate-name.ftl",
92 //~^ ERROR name `test-crate_foo` contains a '-' character
93 //~| ERROR name `with-hyphens` contains a '-' character
94 //~| ERROR name `with-hyphens` does not start with the crate name
97 use self::fluent_generated::{DEFAULT_LOCALE_RESOURCES, test_crate_foo, with_hyphens};