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 a => "./duplicate-a.ftl",
53 a_b => "./duplicate-a-b.ftl",
54 //~^ ERROR overrides existing message: `a_b_key`
58 mod slug_with_hyphens {
59 use super::fluent_messages;
62 slug_with_hyphens => "./slug-with-hyphens.ftl",
63 //~^ ERROR name `slug_with_hyphens_this-slug-has-hyphens` contains a '-' character
67 mod label_with_hyphens {
68 use super::fluent_messages;
71 label_with_hyphens => "./label-with-hyphens.ftl",
72 //~^ ERROR attribute `label-has-hyphens` contains a '-' character
77 use super::fluent_messages;
80 valid => "./valid.ftl",
83 use self::fluent_generated::{DEFAULT_LOCALE_RESOURCES, valid::key};
86 mod missing_crate_name {
87 use super::fluent_messages;
90 test_crate => "./missing-crate-name.ftl",
91 //~^ ERROR name `test-crate_foo` contains a '-' character
92 //~| ERROR name `with-hyphens` contains a '-' character
93 //~| ERROR name `with-hyphens` does not start with the crate name
96 use self::fluent_generated::{DEFAULT_LOCALE_RESOURCES, test_crate::{foo, with_hyphens}};