Skip to main content

rustc_parse/
lib.rs

1//! The main parser interface.
2
3// tidy-alphabetical-start
4#![feature(assert_matches)]
5#![feature(box_patterns)]
6#![feature(debug_closure_helpers)]
7#![feature(default_field_values)]
8#![feature(if_let_guard)]
9#![feature(iter_intersperse)]
10#![feature(iter_order_by)]
11#![recursion_limit = "256"]
12// tidy-alphabetical-end
13
14use std::path::{Path, PathBuf};
15use std::str::Utf8Error;
16use std::sync::Arc;
17
18use rustc_ast as ast;
19use rustc_ast::token;
20use rustc_ast::tokenstream::TokenStream;
21use rustc_ast_pretty::pprust;
22use rustc_errors::{Diag, EmissionGuarantee, FatalError, PResult, pluralize};
23pub use rustc_lexer::UNICODE_VERSION;
24use rustc_session::parse::ParseSess;
25use rustc_span::source_map::SourceMap;
26use rustc_span::{FileName, SourceFile, Span};
27
28pub const MACRO_ARGUMENTS: Option<&str> = Some("macro arguments");
29
30#[macro_use]
31pub mod parser;
32use parser::Parser;
33
34use crate::lexer::StripTokens;
35
36pub mod lexer;
37
38mod errors;
39
40// Make sure that the Unicode version of the dependencies is the same.
41const _: () = {
42    let rustc_lexer = rustc_lexer::UNICODE_VERSION;
43    let rustc_span = rustc_span::UNICODE_VERSION;
44    let normalization = unicode_normalization::UNICODE_VERSION;
45    let width = unicode_width::UNICODE_VERSION;
46
47    if rustc_lexer.0 != rustc_span.0
48        || rustc_lexer.1 != rustc_span.1
49        || rustc_lexer.2 != rustc_span.2
50    {
51        {
    ::core::panicking::panic_fmt(format_args!("rustc_lexer and rustc_span must use the same Unicode version, `rustc_lexer::UNICODE_VERSION` and `rustc_span::UNICODE_VERSION` are different."));
};panic!(
52            "rustc_lexer and rustc_span must use the same Unicode version, \
53            `rustc_lexer::UNICODE_VERSION` and `rustc_span::UNICODE_VERSION` are \
54            different."
55        );
56    }
57
58    if rustc_lexer.0 != normalization.0
59        || rustc_lexer.1 != normalization.1
60        || rustc_lexer.2 != normalization.2
61    {
62        {
    ::core::panicking::panic_fmt(format_args!("rustc_lexer and unicode-normalization must use the same Unicode version, `rustc_lexer::UNICODE_VERSION` and `unicode_normalization::UNICODE_VERSION` are different."));
};panic!(
63            "rustc_lexer and unicode-normalization must use the same Unicode version, \
64            `rustc_lexer::UNICODE_VERSION` and `unicode_normalization::UNICODE_VERSION` are \
65            different."
66        );
67    }
68
69    if rustc_lexer.0 != width.0 || rustc_lexer.1 != width.1 || rustc_lexer.2 != width.2 {
70        {
    ::core::panicking::panic_fmt(format_args!("rustc_lexer and unicode-width must use the same Unicode version, `rustc_lexer::UNICODE_VERSION` and `unicode_width::UNICODE_VERSION` are different."));
};panic!(
71            "rustc_lexer and unicode-width must use the same Unicode version, \
72            `rustc_lexer::UNICODE_VERSION` and `unicode_width::UNICODE_VERSION` are \
73            different."
74        );
75    }
76};
77
78#[allow(non_upper_case_globals)]
#[doc(hidden)]
#[doc =
r" Auto-generated constants for type-checked references to Fluent messages."]
pub(crate) mod fluent_generated {
    #[doc =
    "Constant referring to Fluent message `parse_add_paren` from `parse`"]
    pub const parse_add_paren: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_add_paren"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_ambiguous_range_pattern` from `parse`"]
    pub const parse_ambiguous_range_pattern: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_ambiguous_range_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_ambiguous_range_pattern_suggestion` from `parse`"]
    pub const parse_ambiguous_range_pattern_suggestion:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_ambiguous_range_pattern_suggestion"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_array_brackets_instead_of_braces` from `parse`"]
    pub const parse_array_brackets_instead_of_braces:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_array_brackets_instead_of_braces"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_array_brackets_instead_of_braces.suggestion` from `parse`"]
    pub const parse_suggestion: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion"));
    #[doc =
    "Constant referring to Fluent message `parse_array_index_offset_of` from `parse`"]
    pub const parse_array_index_offset_of: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_array_index_offset_of"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_asm_expected_comma` from `parse`"]
    pub const parse_asm_expected_comma: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_asm_expected_comma"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_asm_expected_comma.label` from `parse`"]
    pub const parse_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label"));
    #[doc =
    "Constant referring to Fluent message `parse_asm_expected_other` from `parse`"]
    pub const parse_asm_expected_other: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_asm_expected_other"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_asm_expected_register_class_or_explicit_register` from `parse`"]
    pub const parse_asm_expected_register_class_or_explicit_register:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_asm_expected_register_class_or_explicit_register"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_asm_expected_string_literal` from `parse`"]
    pub const parse_asm_expected_string_literal: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_asm_expected_string_literal"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_asm_non_abi` from `parse`"]
    pub const parse_asm_non_abi: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_asm_non_abi"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_asm_requires_template` from `parse`"]
    pub const parse_asm_requires_template: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_asm_requires_template"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_asm_sym_no_path` from `parse`"]
    pub const parse_asm_sym_no_path: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_asm_sym_no_path"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_asm_underscore_input` from `parse`"]
    pub const parse_asm_underscore_input: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_asm_underscore_input"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_asm_unsupported_operand` from `parse`"]
    pub const parse_asm_unsupported_operand: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_asm_unsupported_operand"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_assignment_else_not_allowed` from `parse`"]
    pub const parse_assignment_else_not_allowed: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_assignment_else_not_allowed"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_associated_static_item_not_allowed` from `parse`"]
    pub const parse_associated_static_item_not_allowed:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_associated_static_item_not_allowed"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_async_block_in_2015` from `parse`"]
    pub const parse_async_block_in_2015: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_async_block_in_2015"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_async_bound_modifier_in_2015` from `parse`"]
    pub const parse_async_bound_modifier_in_2015: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_async_bound_modifier_in_2015"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_async_fn_in_2015` from `parse`"]
    pub const parse_async_fn_in_2015: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_async_fn_in_2015"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_async_impl` from `parse`"]
    pub const parse_async_impl: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_async_impl"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_async_move_block_in_2015` from `parse`"]
    pub const parse_async_move_block_in_2015: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_async_move_block_in_2015"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_async_move_order_incorrect` from `parse`"]
    pub const parse_async_move_order_incorrect: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_async_move_order_incorrect"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_async_use_block_in_2015` from `parse`"]
    pub const parse_async_use_block_in_2015: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_async_use_block_in_2015"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_async_use_order_incorrect` from `parse`"]
    pub const parse_async_use_order_incorrect: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_async_use_order_incorrect"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_at_dot_dot_in_struct_pattern` from `parse`"]
    pub const parse_at_dot_dot_in_struct_pattern: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_at_dot_dot_in_struct_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_at_in_struct_pattern` from `parse`"]
    pub const parse_at_in_struct_pattern: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_at_in_struct_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_at_in_struct_pattern.note` from `parse`"]
    pub const parse_note: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("note"));
    #[doc =
    "Constant referring to Fluent message `parse_at_in_struct_pattern.help` from `parse`"]
    pub const parse_help: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("help"));
    #[doc =
    "Constant referring to Fluent message `parse_attr_after_generic` from `parse`"]
    pub const parse_attr_after_generic: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_attr_after_generic"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_attr_without_generics` from `parse`"]
    pub const parse_attr_without_generics: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_attr_without_generics"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_attribute_on_empty_type` from `parse`"]
    pub const parse_attribute_on_empty_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_attribute_on_empty_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_attribute_on_generic_arg` from `parse`"]
    pub const parse_attribute_on_generic_arg: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_attribute_on_generic_arg"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_attribute_on_param_type` from `parse`"]
    pub const parse_attribute_on_param_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_attribute_on_param_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_attribute_on_type` from `parse`"]
    pub const parse_attribute_on_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_attribute_on_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_bad_assoc_type_bounds` from `parse`"]
    pub const parse_bad_assoc_type_bounds: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_bad_assoc_type_bounds"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_bad_item_kind` from `parse`"]
    pub const parse_bad_item_kind: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_bad_item_kind"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_bad_return_type_notation_output` from `parse`"]
    pub const parse_bad_return_type_notation_output: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_bad_return_type_notation_output"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_bare_cr` from `parse`"]
    pub const parse_bare_cr: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_bare_cr"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_bare_cr.escape` from `parse`"]
    pub const parse_escape: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("escape"));
    #[doc =
    "Constant referring to Fluent message `parse_bare_cr_in_frontmatter` from `parse`"]
    pub const parse_bare_cr_in_frontmatter: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_bare_cr_in_frontmatter"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_bare_cr_in_raw_string` from `parse`"]
    pub const parse_bare_cr_in_raw_string: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_bare_cr_in_raw_string"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_binder_and_polarity` from `parse`"]
    pub const parse_binder_and_polarity: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_binder_and_polarity"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_binder_before_modifiers` from `parse`"]
    pub const parse_binder_before_modifiers: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_binder_before_modifiers"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_bounds_not_allowed_on_trait_aliases` from `parse`"]
    pub const parse_bounds_not_allowed_on_trait_aliases:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_bounds_not_allowed_on_trait_aliases"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_box_not_pat` from `parse`"]
    pub const parse_box_not_pat: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_box_not_pat"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_box_syntax_removed` from `parse`"]
    pub const parse_box_syntax_removed: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_box_syntax_removed"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_box_syntax_removed_suggestion` from `parse`"]
    pub const parse_box_syntax_removed_suggestion: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_box_syntax_removed_suggestion"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_cannot_be_raw_ident` from `parse`"]
    pub const parse_cannot_be_raw_ident: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_cannot_be_raw_ident"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_cannot_be_raw_lifetime` from `parse`"]
    pub const parse_cannot_be_raw_lifetime: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_cannot_be_raw_lifetime"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_catch_after_try` from `parse`"]
    pub const parse_catch_after_try: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_catch_after_try"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_colon_as_semi` from `parse`"]
    pub const parse_colon_as_semi: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_colon_as_semi"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_comma_after_base_struct` from `parse`"]
    pub const parse_comma_after_base_struct: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_comma_after_base_struct"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_comparison_interpreted_as_generic` from `parse`"]
    pub const parse_comparison_interpreted_as_generic:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_comparison_interpreted_as_generic"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_comparison_interpreted_as_generic.label_args` from `parse`"]
    pub const parse_label_args: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_args"));
    #[doc =
    "Constant referring to Fluent message `parse_comparison_interpreted_as_generic.label_comparison` from `parse`"]
    pub const parse_label_comparison: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_comparison"));
    #[doc =
    "Constant referring to Fluent message `parse_comparison_operators_cannot_be_chained` from `parse`"]
    pub const parse_comparison_operators_cannot_be_chained:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_comparison_operators_cannot_be_chained"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_comparison_operators_cannot_be_chained.sugg_parentheses_for_function_args` from `parse`"]
    pub const parse_sugg_parentheses_for_function_args:
        rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("sugg_parentheses_for_function_args"));
    #[doc =
    "Constant referring to Fluent message `parse_comparison_operators_cannot_be_chained.sugg_split_comparison` from `parse`"]
    pub const parse_sugg_split_comparison: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("sugg_split_comparison"));
    #[doc =
    "Constant referring to Fluent message `parse_comparison_operators_cannot_be_chained.sugg_parenthesize` from `parse`"]
    pub const parse_sugg_parenthesize: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("sugg_parenthesize"));
    #[doc =
    "Constant referring to Fluent message `parse_compound_assignment_expression_in_let` from `parse`"]
    pub const parse_compound_assignment_expression_in_let:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_compound_assignment_expression_in_let"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_const_generic_without_braces` from `parse`"]
    pub const parse_const_generic_without_braces: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_const_generic_without_braces"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_const_global_cannot_be_mutable` from `parse`"]
    pub const parse_const_global_cannot_be_mutable: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_const_global_cannot_be_mutable"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_const_let_mutually_exclusive` from `parse`"]
    pub const parse_const_let_mutually_exclusive: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_const_let_mutually_exclusive"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_cr_doc_comment` from `parse`"]
    pub const parse_cr_doc_comment: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_cr_doc_comment"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_default_not_followed_by_item` from `parse`"]
    pub const parse_default_not_followed_by_item: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_default_not_followed_by_item"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_delegation_non_trait_impl_reuse` from `parse`"]
    pub const parse_delegation_non_trait_impl_reuse: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_delegation_non_trait_impl_reuse"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_do_catch_syntax_removed` from `parse`"]
    pub const parse_do_catch_syntax_removed: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_do_catch_syntax_removed"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_doc_comment_does_not_document_anything` from `parse`"]
    pub const parse_doc_comment_does_not_document_anything:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_doc_comment_does_not_document_anything"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_doc_comment_on_param_type` from `parse`"]
    pub const parse_doc_comment_on_param_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_doc_comment_on_param_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_dot_dot_dot_for_remaining_fields` from `parse`"]
    pub const parse_dot_dot_dot_for_remaining_fields:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_dot_dot_dot_for_remaining_fields"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_dot_dot_dot_range_to_pattern_not_allowed` from `parse`"]
    pub const parse_dot_dot_dot_range_to_pattern_not_allowed:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_dot_dot_dot_range_to_pattern_not_allowed"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_dot_dot_range_attribute` from `parse`"]
    pub const parse_dot_dot_range_attribute: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_dot_dot_range_attribute"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_dotdotdot` from `parse`"]
    pub const parse_dotdotdot: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_dotdotdot"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_dotdotdot.suggest_exclusive_range` from `parse`"]
    pub const parse_suggest_exclusive_range: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggest_exclusive_range"));
    #[doc =
    "Constant referring to Fluent message `parse_dotdotdot.suggest_inclusive_range` from `parse`"]
    pub const parse_suggest_inclusive_range: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggest_inclusive_range"));
    #[doc =
    "Constant referring to Fluent message `parse_dotdotdot_rest_pattern` from `parse`"]
    pub const parse_dotdotdot_rest_pattern: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_dotdotdot_rest_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_dotdotdot_rest_type` from `parse`"]
    pub const parse_dotdotdot_rest_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_dotdotdot_rest_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_double_colon_in_bound` from `parse`"]
    pub const parse_double_colon_in_bound: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_double_colon_in_bound"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_dyn_after_mut` from `parse`"]
    pub const parse_dyn_after_mut: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_dyn_after_mut"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_empty_exponent_float` from `parse`"]
    pub const parse_empty_exponent_float: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_empty_exponent_float"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_empty_unicode_escape` from `parse`"]
    pub const parse_empty_unicode_escape: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_empty_unicode_escape"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_enum_pattern_instead_of_identifier` from `parse`"]
    pub const parse_enum_pattern_instead_of_identifier:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_enum_pattern_instead_of_identifier"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_enum_struct_mutually_exclusive` from `parse`"]
    pub const parse_enum_struct_mutually_exclusive: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_enum_struct_mutually_exclusive"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_eq_field_init` from `parse`"]
    pub const parse_eq_field_init: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_eq_field_init"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_escape_only_char` from `parse`"]
    pub const parse_escape_only_char: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_escape_only_char"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expect_dotdot_not_dotdotdot` from `parse`"]
    pub const parse_expect_dotdot_not_dotdotdot: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expect_dotdot_not_dotdotdot"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expect_eq_instead_of_eqeq` from `parse`"]
    pub const parse_expect_eq_instead_of_eqeq: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expect_eq_instead_of_eqeq"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expect_label_found_ident` from `parse`"]
    pub const parse_expect_label_found_ident: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expect_label_found_ident"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expect_path` from `parse`"]
    pub const parse_expect_path: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expect_path"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_binding_left_of_at` from `parse`"]
    pub const parse_expected_binding_left_of_at: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_binding_left_of_at"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_binding_left_of_at.label_lhs` from `parse`"]
    pub const parse_label_lhs: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_lhs"));
    #[doc =
    "Constant referring to Fluent message `parse_expected_binding_left_of_at.label_rhs` from `parse`"]
    pub const parse_label_rhs: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_rhs"));
    #[doc =
    "Constant referring to Fluent message `parse_expected_builtin_ident` from `parse`"]
    pub const parse_expected_builtin_ident: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_builtin_ident"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_comma_after_pattern_field` from `parse`"]
    pub const parse_expected_comma_after_pattern_field:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_comma_after_pattern_field"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_else_block` from `parse`"]
    pub const parse_expected_else_block: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_else_block"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_expression_found_let` from `parse`"]
    pub const parse_expected_expression_found_let: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_expression_found_let"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_expression_found_let.not_supported_or` from `parse`"]
    pub const parse_not_supported_or: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("not_supported_or"));
    #[doc =
    "Constant referring to Fluent message `parse_expected_expression_found_let.not_supported_parentheses` from `parse`"]
    pub const parse_not_supported_parentheses: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("not_supported_parentheses"));
    #[doc =
    "Constant referring to Fluent message `parse_expected_fn_path_found_fn_keyword` from `parse`"]
    pub const parse_expected_fn_path_found_fn_keyword:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_fn_path_found_fn_keyword"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier` from `parse`"]
    pub const parse_expected_identifier: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_doc_comment` from `parse`"]
    pub const parse_expected_identifier_found_doc_comment:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_doc_comment"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_doc_comment_str` from `parse`"]
    pub const parse_expected_identifier_found_doc_comment_str:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_doc_comment_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_keyword` from `parse`"]
    pub const parse_expected_identifier_found_keyword:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_keyword"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_keyword_str` from `parse`"]
    pub const parse_expected_identifier_found_keyword_str:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_keyword_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_metavar` from `parse`"]
    pub const parse_expected_identifier_found_metavar:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_metavar"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_metavar_str` from `parse`"]
    pub const parse_expected_identifier_found_metavar_str:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_metavar_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_reserved_identifier` from `parse`"]
    pub const parse_expected_identifier_found_reserved_identifier:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_reserved_identifier"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_reserved_identifier_str` from `parse`"]
    pub const parse_expected_identifier_found_reserved_identifier_str:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_reserved_identifier_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_reserved_keyword` from `parse`"]
    pub const parse_expected_identifier_found_reserved_keyword:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_reserved_keyword"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_reserved_keyword_str` from `parse`"]
    pub const parse_expected_identifier_found_reserved_keyword_str:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_reserved_keyword_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_identifier_found_str` from `parse`"]
    pub const parse_expected_identifier_found_str: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_identifier_found_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_mut_or_const_in_raw_pointer_type` from `parse`"]
    pub const parse_expected_mut_or_const_in_raw_pointer_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_mut_or_const_in_raw_pointer_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_semi_found_doc_comment_str` from `parse`"]
    pub const parse_expected_semi_found_doc_comment_str:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_semi_found_doc_comment_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_semi_found_keyword_str` from `parse`"]
    pub const parse_expected_semi_found_keyword_str: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_semi_found_keyword_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_semi_found_metavar_str` from `parse`"]
    pub const parse_expected_semi_found_metavar_str: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_semi_found_metavar_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_semi_found_reserved_identifier_str` from `parse`"]
    pub const parse_expected_semi_found_reserved_identifier_str:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_semi_found_reserved_identifier_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_semi_found_reserved_keyword_str` from `parse`"]
    pub const parse_expected_semi_found_reserved_keyword_str:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_semi_found_reserved_keyword_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_semi_found_str` from `parse`"]
    pub const parse_expected_semi_found_str: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_semi_found_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_statement_after_outer_attr` from `parse`"]
    pub const parse_expected_statement_after_outer_attr:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_statement_after_outer_attr"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_struct_field` from `parse`"]
    pub const parse_expected_struct_field: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_struct_field"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expected_struct_field.ident_label` from `parse`"]
    pub const parse_ident_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("ident_label"));
    #[doc =
    "Constant referring to Fluent message `parse_expected_trait_in_trait_impl_found_type` from `parse`"]
    pub const parse_expected_trait_in_trait_impl_found_type:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expected_trait_in_trait_impl_found_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_expr_rarrow_call` from `parse`"]
    pub const parse_expr_rarrow_call: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_expr_rarrow_call"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_extern_crate_name_with_dashes` from `parse`"]
    pub const parse_extern_crate_name_with_dashes: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_extern_crate_name_with_dashes"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_extern_item_cannot_be_const` from `parse`"]
    pub const parse_extern_item_cannot_be_const: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_extern_item_cannot_be_const"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_extra_if_in_let_else` from `parse`"]
    pub const parse_extra_if_in_let_else: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_extra_if_in_let_else"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_extra_impl_keyword_in_trait_impl` from `parse`"]
    pub const parse_extra_impl_keyword_in_trait_impl:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_extra_impl_keyword_in_trait_impl"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_field_expression_with_generic` from `parse`"]
    pub const parse_field_expression_with_generic: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_field_expression_with_generic"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_float_literal_requires_integer_part` from `parse`"]
    pub const parse_float_literal_requires_integer_part:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_float_literal_requires_integer_part"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_float_literal_unsupported_base` from `parse`"]
    pub const parse_float_literal_unsupported_base: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_float_literal_unsupported_base"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_fn_pointer_cannot_be_async` from `parse`"]
    pub const parse_fn_pointer_cannot_be_async: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_fn_pointer_cannot_be_async"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_fn_pointer_cannot_be_const` from `parse`"]
    pub const parse_fn_pointer_cannot_be_const: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_fn_pointer_cannot_be_const"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_fn_ptr_with_generics` from `parse`"]
    pub const parse_fn_ptr_with_generics: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_fn_ptr_with_generics"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_fn_trait_missing_paren` from `parse`"]
    pub const parse_fn_trait_missing_paren: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_fn_trait_missing_paren"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_forgot_paren` from `parse`"]
    pub const parse_forgot_paren: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_forgot_paren"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_found_expr_would_be_stmt` from `parse`"]
    pub const parse_found_expr_would_be_stmt: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_found_expr_would_be_stmt"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_frontmatter_extra_characters_after_close` from `parse`"]
    pub const parse_frontmatter_extra_characters_after_close:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_frontmatter_extra_characters_after_close"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_frontmatter_invalid_close_preceding_whitespace` from `parse`"]
    pub const parse_frontmatter_invalid_close_preceding_whitespace:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_frontmatter_invalid_close_preceding_whitespace"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_frontmatter_invalid_infostring` from `parse`"]
    pub const parse_frontmatter_invalid_infostring: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_frontmatter_invalid_infostring"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_frontmatter_invalid_opening_preceding_whitespace` from `parse`"]
    pub const parse_frontmatter_invalid_opening_preceding_whitespace:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_frontmatter_invalid_opening_preceding_whitespace"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_frontmatter_length_mismatch` from `parse`"]
    pub const parse_frontmatter_length_mismatch: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_frontmatter_length_mismatch"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_frontmatter_length_mismatch.label_opening` from `parse`"]
    pub const parse_label_opening: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_opening"));
    #[doc =
    "Constant referring to Fluent message `parse_frontmatter_length_mismatch.label_close` from `parse`"]
    pub const parse_label_close: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_close"));
    #[doc =
    "Constant referring to Fluent message `parse_frontmatter_too_many_dashes` from `parse`"]
    pub const parse_frontmatter_too_many_dashes: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_frontmatter_too_many_dashes"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_frontmatter_unclosed` from `parse`"]
    pub const parse_frontmatter_unclosed: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_frontmatter_unclosed"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_function_body_equals_expr` from `parse`"]
    pub const parse_function_body_equals_expr: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_function_body_equals_expr"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_generic_args_in_pat_require_turbofish_syntax` from `parse`"]
    pub const parse_generic_args_in_pat_require_turbofish_syntax:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_generic_args_in_pat_require_turbofish_syntax"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_generic_parameters_without_angle_brackets` from `parse`"]
    pub const parse_generic_parameters_without_angle_brackets:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_generic_parameters_without_angle_brackets"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_generics_in_path` from `parse`"]
    pub const parse_generics_in_path: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_generics_in_path"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_help_set_edition_cargo` from `parse`"]
    pub const parse_help_set_edition_cargo: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_help_set_edition_cargo"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_help_set_edition_standalone` from `parse`"]
    pub const parse_help_set_edition_standalone: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_help_set_edition_standalone"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_hidden_unicode_codepoints` from `parse`"]
    pub const parse_hidden_unicode_codepoints: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_hidden_unicode_codepoints"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_hidden_unicode_codepoints.suggestion_remove` from `parse`"]
    pub const parse_suggestion_remove: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_remove"));
    #[doc =
    "Constant referring to Fluent message `parse_hidden_unicode_codepoints.suggestion_escape` from `parse`"]
    pub const parse_suggestion_escape: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_escape"));
    #[doc =
    "Constant referring to Fluent message `parse_hidden_unicode_codepoints.no_suggestion_note_escape` from `parse`"]
    pub const parse_no_suggestion_note_escape: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("no_suggestion_note_escape"));
    #[doc =
    "Constant referring to Fluent message `parse_if_expression_missing_condition` from `parse`"]
    pub const parse_if_expression_missing_condition: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_if_expression_missing_condition"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_if_expression_missing_condition.condition_label` from `parse`"]
    pub const parse_condition_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("condition_label"));
    #[doc =
    "Constant referring to Fluent message `parse_if_expression_missing_condition.block_label` from `parse`"]
    pub const parse_block_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("block_label"));
    #[doc =
    "Constant referring to Fluent message `parse_if_expression_missing_then_block` from `parse`"]
    pub const parse_if_expression_missing_then_block:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_if_expression_missing_then_block"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_if_expression_missing_then_block.add_then_block` from `parse`"]
    pub const parse_add_then_block: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("add_then_block"));
    #[doc =
    "Constant referring to Fluent message `parse_if_expression_missing_then_block.condition_possibly_unfinished` from `parse`"]
    pub const parse_condition_possibly_unfinished:
        rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("condition_possibly_unfinished"));
    #[doc =
    "Constant referring to Fluent message `parse_in_in_typo` from `parse`"]
    pub const parse_in_in_typo: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_in_in_typo"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inappropriate_default` from `parse`"]
    pub const parse_inappropriate_default: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_inappropriate_default"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inclusive_range_extra_equals` from `parse`"]
    pub const parse_inclusive_range_extra_equals: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_inclusive_range_extra_equals"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inclusive_range_extra_equals.suggestion_remove_eq` from `parse`"]
    pub const parse_suggestion_remove_eq: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_remove_eq"));
    #[doc =
    "Constant referring to Fluent message `parse_inclusive_range_match_arrow` from `parse`"]
    pub const parse_inclusive_range_match_arrow: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_inclusive_range_match_arrow"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inclusive_range_no_end` from `parse`"]
    pub const parse_inclusive_range_no_end: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_inclusive_range_no_end"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inclusive_range_no_end.suggestion_open_range` from `parse`"]
    pub const parse_suggestion_open_range: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_open_range"));
    #[doc =
    "Constant referring to Fluent message `parse_incorrect_parens_trait_bounds` from `parse`"]
    pub const parse_incorrect_parens_trait_bounds: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_incorrect_parens_trait_bounds"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_incorrect_parens_trait_bounds_sugg` from `parse`"]
    pub const parse_incorrect_parens_trait_bounds_sugg:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_incorrect_parens_trait_bounds_sugg"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_incorrect_semicolon` from `parse`"]
    pub const parse_incorrect_semicolon: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_incorrect_semicolon"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_incorrect_type_on_self` from `parse`"]
    pub const parse_incorrect_type_on_self: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_incorrect_type_on_self"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_incorrect_use_of_await` from `parse`"]
    pub const parse_incorrect_use_of_await: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_incorrect_use_of_await"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_incorrect_use_of_await.parentheses_suggestion` from `parse`"]
    pub const parse_parentheses_suggestion: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("parentheses_suggestion"));
    #[doc =
    "Constant referring to Fluent message `parse_incorrect_use_of_await_postfix_suggestion` from `parse`"]
    pub const parse_incorrect_use_of_await_postfix_suggestion:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_incorrect_use_of_await_postfix_suggestion"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_incorrect_use_of_use` from `parse`"]
    pub const parse_incorrect_use_of_use: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_incorrect_use_of_use"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_incorrect_visibility_restriction` from `parse`"]
    pub const parse_incorrect_visibility_restriction:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_incorrect_visibility_restriction"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inner_attr_explanation` from `parse`"]
    pub const parse_inner_attr_explanation: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_inner_attr_explanation"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inner_attr_not_permitted` from `parse`"]
    pub const parse_inner_attr_not_permitted: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_inner_attr_not_permitted"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inner_attr_not_permitted.label_does_not_annotate_this` from `parse`"]
    pub const parse_label_does_not_annotate_this: rustc_errors::SubdiagMessage
        =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_does_not_annotate_this"));
    #[doc =
    "Constant referring to Fluent message `parse_inner_attr_not_permitted.sugg_change_inner_to_outer` from `parse`"]
    pub const parse_sugg_change_inner_to_outer: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("sugg_change_inner_to_outer"));
    #[doc =
    "Constant referring to Fluent message `parse_inner_attr_not_permitted_after_outer_attr` from `parse`"]
    pub const parse_inner_attr_not_permitted_after_outer_attr:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_inner_attr_not_permitted_after_outer_attr"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inner_attr_not_permitted_after_outer_attr.label_attr` from `parse`"]
    pub const parse_label_attr: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_attr"));
    #[doc =
    "Constant referring to Fluent message `parse_inner_attr_not_permitted_after_outer_attr.label_prev_attr` from `parse`"]
    pub const parse_label_prev_attr: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_prev_attr"));
    #[doc =
    "Constant referring to Fluent message `parse_inner_attr_not_permitted_after_outer_doc_comment` from `parse`"]
    pub const parse_inner_attr_not_permitted_after_outer_doc_comment:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_inner_attr_not_permitted_after_outer_doc_comment"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_inner_attr_not_permitted_after_outer_doc_comment.label_prev_doc_comment` from `parse`"]
    pub const parse_label_prev_doc_comment: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_prev_doc_comment"));
    #[doc =
    "Constant referring to Fluent message `parse_inner_doc_comment_not_permitted` from `parse`"]
    pub const parse_inner_doc_comment_not_permitted: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_inner_doc_comment_not_permitted"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_block_macro_segment` from `parse`"]
    pub const parse_invalid_block_macro_segment: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_block_macro_segment"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_char_in_escape` from `parse`"]
    pub const parse_invalid_char_in_escape: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_char_in_escape"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_char_in_escape_msg` from `parse`"]
    pub const parse_invalid_char_in_escape_msg: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_char_in_escape_msg"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_comparison_operator` from `parse`"]
    pub const parse_invalid_comparison_operator: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_comparison_operator"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_comparison_operator.use_instead` from `parse`"]
    pub const parse_use_instead: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("use_instead"));
    #[doc =
    "Constant referring to Fluent message `parse_invalid_comparison_operator.spaceship_operator_invalid` from `parse`"]
    pub const parse_spaceship_operator_invalid: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("spaceship_operator_invalid"));
    #[doc =
    "Constant referring to Fluent message `parse_invalid_curly_in_let_else` from `parse`"]
    pub const parse_invalid_curly_in_let_else: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_curly_in_let_else"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_digit_literal` from `parse`"]
    pub const parse_invalid_digit_literal: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_digit_literal"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_dyn_keyword` from `parse`"]
    pub const parse_invalid_dyn_keyword: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_dyn_keyword"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_expression_in_let_else` from `parse`"]
    pub const parse_invalid_expression_in_let_else: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_expression_in_let_else"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_identifier_with_leading_number` from `parse`"]
    pub const parse_invalid_identifier_with_leading_number:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_identifier_with_leading_number"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_literal_suffix_on_tuple_index` from `parse`"]
    pub const parse_invalid_literal_suffix_on_tuple_index:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_literal_suffix_on_tuple_index"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_logical_operator` from `parse`"]
    pub const parse_invalid_logical_operator: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_logical_operator"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_logical_operator.use_amp_amp_for_conjunction` from `parse`"]
    pub const parse_use_amp_amp_for_conjunction: rustc_errors::SubdiagMessage
        =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("use_amp_amp_for_conjunction"));
    #[doc =
    "Constant referring to Fluent message `parse_invalid_logical_operator.use_pipe_pipe_for_disjunction` from `parse`"]
    pub const parse_use_pipe_pipe_for_disjunction:
        rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("use_pipe_pipe_for_disjunction"));
    #[doc =
    "Constant referring to Fluent message `parse_invalid_meta_item` from `parse`"]
    pub const parse_invalid_meta_item: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_meta_item"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_meta_item.quote_ident_sugg` from `parse`"]
    pub const parse_quote_ident_sugg: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("quote_ident_sugg"));
    #[doc =
    "Constant referring to Fluent message `parse_invalid_offset_of` from `parse`"]
    pub const parse_invalid_offset_of: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_offset_of"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_path_sep_in_fn_definition` from `parse`"]
    pub const parse_invalid_path_sep_in_fn_definition:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_path_sep_in_fn_definition"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_unicode_escape` from `parse`"]
    pub const parse_invalid_unicode_escape: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_unicode_escape"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_invalid_variable_declaration` from `parse`"]
    pub const parse_invalid_variable_declaration: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_invalid_variable_declaration"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_keyword_label` from `parse`"]
    pub const parse_keyword_label: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_keyword_label"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_keyword_lifetime` from `parse`"]
    pub const parse_keyword_lifetime: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_keyword_lifetime"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_kw_bad_case` from `parse`"]
    pub const parse_kw_bad_case: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_kw_bad_case"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_label_inner_attr_does_not_annotate_this` from `parse`"]
    pub const parse_label_inner_attr_does_not_annotate_this:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_label_inner_attr_does_not_annotate_this"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_label_unexpected_token` from `parse`"]
    pub const parse_label_unexpected_token: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_label_unexpected_token"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_label_while_parsing_or_pattern_here` from `parse`"]
    pub const parse_label_while_parsing_or_pattern_here:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_label_while_parsing_or_pattern_here"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_labeled_loop_in_break` from `parse`"]
    pub const parse_labeled_loop_in_break: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_labeled_loop_in_break"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_leading_plus_not_supported` from `parse`"]
    pub const parse_leading_plus_not_supported: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_leading_plus_not_supported"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_leading_plus_not_supported.suggestion_remove_plus` from `parse`"]
    pub const parse_suggestion_remove_plus: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_remove_plus"));
    #[doc =
    "Constant referring to Fluent message `parse_leading_underscore_unicode_escape` from `parse`"]
    pub const parse_leading_underscore_unicode_escape:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_leading_underscore_unicode_escape"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_leading_underscore_unicode_escape_label` from `parse`"]
    pub const parse_leading_underscore_unicode_escape_label:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_leading_underscore_unicode_escape_label"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_left_arrow_operator` from `parse`"]
    pub const parse_left_arrow_operator: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_left_arrow_operator"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_let_chain_pre_2024` from `parse`"]
    pub const parse_let_chain_pre_2024: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_let_chain_pre_2024"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_lifetime_after_mut` from `parse`"]
    pub const parse_lifetime_after_mut: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_lifetime_after_mut"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_lifetime_in_borrow_expression` from `parse`"]
    pub const parse_lifetime_in_borrow_expression: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_lifetime_in_borrow_expression"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_lifetime_in_eq_constraint` from `parse`"]
    pub const parse_lifetime_in_eq_constraint: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_lifetime_in_eq_constraint"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_lifetime_in_eq_constraint.context_label` from `parse`"]
    pub const parse_context_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("context_label"));
    #[doc =
    "Constant referring to Fluent message `parse_lifetime_in_eq_constraint.colon_sugg` from `parse`"]
    pub const parse_colon_sugg: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("colon_sugg"));
    #[doc =
    "Constant referring to Fluent message `parse_lone_slash` from `parse`"]
    pub const parse_lone_slash: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_lone_slash"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_loop_else` from `parse`"]
    pub const parse_loop_else: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_loop_else"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_loop_else.loop_keyword` from `parse`"]
    pub const parse_loop_keyword: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("loop_keyword"));
    #[doc =
    "Constant referring to Fluent message `parse_macro_expands_to_adt_field` from `parse`"]
    pub const parse_macro_expands_to_adt_field: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_macro_expands_to_adt_field"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_macro_expands_to_enum_variant` from `parse`"]
    pub const parse_macro_expands_to_enum_variant: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_macro_expands_to_enum_variant"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_macro_invocation_visibility` from `parse`"]
    pub const parse_macro_invocation_visibility: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_macro_invocation_visibility"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_macro_invocation_with_qualified_path` from `parse`"]
    pub const parse_macro_invocation_with_qualified_path:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_macro_invocation_with_qualified_path"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_macro_name_remove_bang` from `parse`"]
    pub const parse_macro_name_remove_bang: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_macro_name_remove_bang"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_macro_rules_missing_bang` from `parse`"]
    pub const parse_macro_rules_missing_bang: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_macro_rules_missing_bang"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_macro_rules_visibility` from `parse`"]
    pub const parse_macro_rules_visibility: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_macro_rules_visibility"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_malformed_loop_label` from `parse`"]
    pub const parse_malformed_loop_label: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_malformed_loop_label"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_match_arm_body_without_braces` from `parse`"]
    pub const parse_match_arm_body_without_braces: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_match_arm_body_without_braces"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_match_arm_body_without_braces.label_statements` from `parse`"]
    pub const parse_label_statements: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_statements"));
    #[doc =
    "Constant referring to Fluent message `parse_match_arm_body_without_braces.label_arrow` from `parse`"]
    pub const parse_label_arrow: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_arrow"));
    #[doc =
    "Constant referring to Fluent message `parse_match_arm_body_without_braces.suggestion_add_braces` from `parse`"]
    pub const parse_suggestion_add_braces: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_add_braces"));
    #[doc =
    "Constant referring to Fluent message `parse_match_arm_body_without_braces.suggestion_use_comma_not_semicolon` from `parse`"]
    pub const parse_suggestion_use_comma_not_semicolon:
        rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_use_comma_not_semicolon"));
    #[doc =
    "Constant referring to Fluent message `parse_maybe_comparison` from `parse`"]
    pub const parse_maybe_comparison: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_maybe_comparison"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_maybe_fn_typo_with_impl` from `parse`"]
    pub const parse_maybe_fn_typo_with_impl: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_maybe_fn_typo_with_impl"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_maybe_missing_let` from `parse`"]
    pub const parse_maybe_missing_let: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_maybe_missing_let"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_maybe_recover_from_bad_qpath_stage_2` from `parse`"]
    pub const parse_maybe_recover_from_bad_qpath_stage_2:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_maybe_recover_from_bad_qpath_stage_2"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_maybe_recover_from_bad_type_plus` from `parse`"]
    pub const parse_maybe_recover_from_bad_type_plus:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_maybe_recover_from_bad_type_plus"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_maybe_report_ambiguous_plus` from `parse`"]
    pub const parse_maybe_report_ambiguous_plus: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_maybe_report_ambiguous_plus"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_mismatched_closing_delimiter` from `parse`"]
    pub const parse_mismatched_closing_delimiter: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_mismatched_closing_delimiter"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_mismatched_closing_delimiter.label_unmatched` from `parse`"]
    pub const parse_label_unmatched: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_unmatched"));
    #[doc =
    "Constant referring to Fluent message `parse_mismatched_closing_delimiter.label_opening_candidate` from `parse`"]
    pub const parse_label_opening_candidate: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_opening_candidate"));
    #[doc =
    "Constant referring to Fluent message `parse_mismatched_closing_delimiter.label_unclosed` from `parse`"]
    pub const parse_label_unclosed: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_unclosed"));
    #[doc =
    "Constant referring to Fluent message `parse_misplaced_return_type` from `parse`"]
    pub const parse_misplaced_return_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_misplaced_return_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_comma_after_match_arm` from `parse`"]
    pub const parse_missing_comma_after_match_arm: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_comma_after_match_arm"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_const_type` from `parse`"]
    pub const parse_missing_const_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_const_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_enum_for_enum_definition` from `parse`"]
    pub const parse_missing_enum_for_enum_definition:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_enum_for_enum_definition"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_enum_or_struct_for_item_definition` from `parse`"]
    pub const parse_missing_enum_or_struct_for_item_definition:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_enum_or_struct_for_item_definition"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_expression_in_for_loop` from `parse`"]
    pub const parse_missing_expression_in_for_loop: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_expression_in_for_loop"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_fn_for_function_definition` from `parse`"]
    pub const parse_missing_fn_for_function_definition:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_fn_for_function_definition"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_fn_for_method_definition` from `parse`"]
    pub const parse_missing_fn_for_method_definition:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_fn_for_method_definition"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_fn_or_struct_for_item_definition` from `parse`"]
    pub const parse_missing_fn_or_struct_for_item_definition:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_fn_or_struct_for_item_definition"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_fn_params` from `parse`"]
    pub const parse_missing_fn_params: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_fn_params"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_for_in_trait_impl` from `parse`"]
    pub const parse_missing_for_in_trait_impl: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_for_in_trait_impl"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_in_in_for_loop` from `parse`"]
    pub const parse_missing_in_in_for_loop: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_in_in_for_loop"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_in_in_for_loop.use_in` from `parse`"]
    pub const parse_use_in: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("use_in"));
    #[doc =
    "Constant referring to Fluent message `parse_missing_in_in_for_loop.add_in` from `parse`"]
    pub const parse_add_in: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("add_in"));
    #[doc =
    "Constant referring to Fluent message `parse_missing_let_before_mut` from `parse`"]
    pub const parse_missing_let_before_mut: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_let_before_mut"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_plus_in_bounds` from `parse`"]
    pub const parse_missing_plus_in_bounds: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_plus_in_bounds"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_semicolon_before_array` from `parse`"]
    pub const parse_missing_semicolon_before_array: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_semicolon_before_array"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_struct_for_struct_definition` from `parse`"]
    pub const parse_missing_struct_for_struct_definition:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_struct_for_struct_definition"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_trait_in_trait_impl` from `parse`"]
    pub const parse_missing_trait_in_trait_impl: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_missing_trait_in_trait_impl"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_missing_trait_in_trait_impl.suggestion_add_trait` from `parse`"]
    pub const parse_suggestion_add_trait: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_add_trait"));
    #[doc =
    "Constant referring to Fluent message `parse_missing_trait_in_trait_impl.suggestion_remove_for` from `parse`"]
    pub const parse_suggestion_remove_for: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_remove_for"));
    #[doc =
    "Constant referring to Fluent message `parse_misspelled_kw` from `parse`"]
    pub const parse_misspelled_kw: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_misspelled_kw"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_modifier_lifetime` from `parse`"]
    pub const parse_modifier_lifetime: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_modifier_lifetime"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_modifiers_and_polarity` from `parse`"]
    pub const parse_modifiers_and_polarity: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_modifiers_and_polarity"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_more_than_one_char` from `parse`"]
    pub const parse_more_than_one_char: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_more_than_one_char"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_more_than_one_char.followed_by` from `parse`"]
    pub const parse_followed_by: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("followed_by"));
    #[doc =
    "Constant referring to Fluent message `parse_more_than_one_char.non_printing` from `parse`"]
    pub const parse_non_printing: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("non_printing"));
    #[doc =
    "Constant referring to Fluent message `parse_more_than_one_char.consider_normalized` from `parse`"]
    pub const parse_consider_normalized: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("consider_normalized"));
    #[doc =
    "Constant referring to Fluent message `parse_more_than_one_char.remove_non` from `parse`"]
    pub const parse_remove_non: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("remove_non"));
    #[doc =
    "Constant referring to Fluent message `parse_more_than_one_char.use_double_quotes` from `parse`"]
    pub const parse_use_double_quotes: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("use_double_quotes"));
    #[doc =
    "Constant referring to Fluent message `parse_multiple_skipped_lines` from `parse`"]
    pub const parse_multiple_skipped_lines: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_multiple_skipped_lines"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_multiple_where_clauses` from `parse`"]
    pub const parse_multiple_where_clauses: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_multiple_where_clauses"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_mut_on_nested_ident_pattern` from `parse`"]
    pub const parse_mut_on_nested_ident_pattern: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_mut_on_nested_ident_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_mut_on_non_ident_pattern` from `parse`"]
    pub const parse_mut_on_non_ident_pattern: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_mut_on_non_ident_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_need_plus_after_trait_object_lifetime` from `parse`"]
    pub const parse_need_plus_after_trait_object_lifetime:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_need_plus_after_trait_object_lifetime"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_nested_adt` from `parse`"]
    pub const parse_nested_adt: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_nested_adt"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_nested_c_variadic_type` from `parse`"]
    pub const parse_nested_c_variadic_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_nested_c_variadic_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_no_brace_unicode_escape` from `parse`"]
    pub const parse_no_brace_unicode_escape: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_no_brace_unicode_escape"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_no_brace_unicode_escape.use_braces` from `parse`"]
    pub const parse_use_braces: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("use_braces"));
    #[doc =
    "Constant referring to Fluent message `parse_no_brace_unicode_escape.format_of_unicode` from `parse`"]
    pub const parse_format_of_unicode: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("format_of_unicode"));
    #[doc =
    "Constant referring to Fluent message `parse_no_digits_literal` from `parse`"]
    pub const parse_no_digits_literal: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_no_digits_literal"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_non_string_abi_literal` from `parse`"]
    pub const parse_non_string_abi_literal: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_non_string_abi_literal"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_nonterminal_expected_ident` from `parse`"]
    pub const parse_nonterminal_expected_ident: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_nonterminal_expected_ident"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_nonterminal_expected_item_keyword` from `parse`"]
    pub const parse_nonterminal_expected_item_keyword:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_nonterminal_expected_item_keyword"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_nonterminal_expected_lifetime` from `parse`"]
    pub const parse_nonterminal_expected_lifetime: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_nonterminal_expected_lifetime"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_nonterminal_expected_statement` from `parse`"]
    pub const parse_nonterminal_expected_statement: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_nonterminal_expected_statement"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_note_edition_guide` from `parse`"]
    pub const parse_note_edition_guide: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_note_edition_guide"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_note_mut_pattern_usage` from `parse`"]
    pub const parse_note_mut_pattern_usage: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_note_mut_pattern_usage"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_note_pattern_alternatives_use_single_vert` from `parse`"]
    pub const parse_note_pattern_alternatives_use_single_vert:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_note_pattern_alternatives_use_single_vert"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_nul_in_c_str` from `parse`"]
    pub const parse_nul_in_c_str: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_nul_in_c_str"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_or_in_let_chain` from `parse`"]
    pub const parse_or_in_let_chain: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_or_in_let_chain"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_or_pattern_not_allowed_in_fn_parameters` from `parse`"]
    pub const parse_or_pattern_not_allowed_in_fn_parameters:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_or_pattern_not_allowed_in_fn_parameters"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_or_pattern_not_allowed_in_let_binding` from `parse`"]
    pub const parse_or_pattern_not_allowed_in_let_binding:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_or_pattern_not_allowed_in_let_binding"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_outer_attr_explanation` from `parse`"]
    pub const parse_outer_attr_explanation: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_outer_attr_explanation"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_outer_attribute_not_allowed_on_if_else` from `parse`"]
    pub const parse_outer_attribute_not_allowed_on_if_else:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_outer_attribute_not_allowed_on_if_else"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_outer_attribute_not_allowed_on_if_else.branch_label` from `parse`"]
    pub const parse_branch_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("branch_label"));
    #[doc =
    "Constant referring to Fluent message `parse_outer_attribute_not_allowed_on_if_else.ctx_label` from `parse`"]
    pub const parse_ctx_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("ctx_label"));
    #[doc =
    "Constant referring to Fluent message `parse_overlong_unicode_escape` from `parse`"]
    pub const parse_overlong_unicode_escape: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_overlong_unicode_escape"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_parentheses_with_struct_fields` from `parse`"]
    pub const parse_parentheses_with_struct_fields: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_parentheses_with_struct_fields"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_parentheses_with_struct_fields.suggestion_braces_for_struct` from `parse`"]
    pub const parse_suggestion_braces_for_struct: rustc_errors::SubdiagMessage
        =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_braces_for_struct"));
    #[doc =
    "Constant referring to Fluent message `parse_parentheses_with_struct_fields.suggestion_no_fields_for_fn` from `parse`"]
    pub const parse_suggestion_no_fields_for_fn: rustc_errors::SubdiagMessage
        =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_no_fields_for_fn"));
    #[doc =
    "Constant referring to Fluent message `parse_path_double_colon` from `parse`"]
    pub const parse_path_double_colon: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_path_double_colon"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_path_found_attribute_in_params` from `parse`"]
    pub const parse_path_found_attribute_in_params: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_path_found_attribute_in_params"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_path_found_c_variadic_params` from `parse`"]
    pub const parse_path_found_c_variadic_params: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_path_found_c_variadic_params"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_path_found_named_params` from `parse`"]
    pub const parse_path_found_named_params: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_path_found_named_params"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_pattern_method_param_without_body` from `parse`"]
    pub const parse_pattern_method_param_without_body:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_pattern_method_param_without_body"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_pattern_on_wrong_side_of_at` from `parse`"]
    pub const parse_pattern_on_wrong_side_of_at: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_pattern_on_wrong_side_of_at"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_pattern_on_wrong_side_of_at.label_pattern` from `parse`"]
    pub const parse_label_pattern: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_pattern"));
    #[doc =
    "Constant referring to Fluent message `parse_pattern_on_wrong_side_of_at.label_binding` from `parse`"]
    pub const parse_label_binding: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label_binding"));
    #[doc =
    "Constant referring to Fluent message `parse_question_mark_in_type` from `parse`"]
    pub const parse_question_mark_in_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_question_mark_in_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_recover_import_as_use` from `parse`"]
    pub const parse_recover_import_as_use: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_recover_import_as_use"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_remove_let` from `parse`"]
    pub const parse_remove_let: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_remove_let"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_repeated_mut_in_pattern` from `parse`"]
    pub const parse_repeated_mut_in_pattern: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_repeated_mut_in_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_require_colon_after_labeled_expression` from `parse`"]
    pub const parse_require_colon_after_labeled_expression:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_require_colon_after_labeled_expression"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_reserved_multihash` from `parse`"]
    pub const parse_reserved_multihash: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_reserved_multihash"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_reserved_multihash.suggestion_whitespace` from `parse`"]
    pub const parse_suggestion_whitespace: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_whitespace"));
    #[doc =
    "Constant referring to Fluent message `parse_reserved_string` from `parse`"]
    pub const parse_reserved_string: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_reserved_string"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_return_types_use_thin_arrow` from `parse`"]
    pub const parse_return_types_use_thin_arrow: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_return_types_use_thin_arrow"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_self_argument_pointer` from `parse`"]
    pub const parse_self_argument_pointer: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_self_argument_pointer"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_self_param_not_first` from `parse`"]
    pub const parse_self_param_not_first: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_self_param_not_first"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_shift_interpreted_as_generic` from `parse`"]
    pub const parse_shift_interpreted_as_generic: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_shift_interpreted_as_generic"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_single_colon_import_path` from `parse`"]
    pub const parse_single_colon_import_path: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_single_colon_import_path"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_static_with_generics` from `parse`"]
    pub const parse_static_with_generics: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_static_with_generics"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_struct_literal_body_without_path` from `parse`"]
    pub const parse_struct_literal_body_without_path:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_struct_literal_body_without_path"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_struct_literal_body_without_path_late` from `parse`"]
    pub const parse_struct_literal_body_without_path_late:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_struct_literal_body_without_path_late"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_struct_literal_not_allowed_here` from `parse`"]
    pub const parse_struct_literal_not_allowed_here: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_struct_literal_not_allowed_here"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_struct_literal_placeholder_path` from `parse`"]
    pub const parse_struct_literal_placeholder_path: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_struct_literal_placeholder_path"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_suffixed_literal_in_attribute` from `parse`"]
    pub const parse_suffixed_literal_in_attribute: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_suffixed_literal_in_attribute"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_add_let_for_stmt` from `parse`"]
    pub const parse_sugg_add_let_for_stmt: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_add_let_for_stmt"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_add_semi` from `parse`"]
    pub const parse_sugg_add_semi: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_add_semi"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_change_inner_attr_to_outer` from `parse`"]
    pub const parse_sugg_change_inner_attr_to_outer: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_change_inner_attr_to_outer"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_change_this_to_semi` from `parse`"]
    pub const parse_sugg_change_this_to_semi: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_change_this_to_semi"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_escape_identifier` from `parse`"]
    pub const parse_sugg_escape_identifier: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_escape_identifier"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_remove_comma` from `parse`"]
    pub const parse_sugg_remove_comma: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_remove_comma"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_remove_leading_vert_in_pattern` from `parse`"]
    pub const parse_sugg_remove_leading_vert_in_pattern:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_remove_leading_vert_in_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_turbofish_syntax` from `parse`"]
    pub const parse_sugg_turbofish_syntax: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_turbofish_syntax"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_wrap_expression_in_parentheses` from `parse`"]
    pub const parse_sugg_wrap_expression_in_parentheses:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_wrap_expression_in_parentheses"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_wrap_macro_in_parentheses` from `parse`"]
    pub const parse_sugg_wrap_macro_in_parentheses: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_wrap_macro_in_parentheses"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_sugg_wrap_pattern_in_parens` from `parse`"]
    pub const parse_sugg_wrap_pattern_in_parens: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_sugg_wrap_pattern_in_parens"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_switch_mut_let_order` from `parse`"]
    pub const parse_switch_mut_let_order: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_switch_mut_let_order"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_switch_ref_box_order` from `parse`"]
    pub const parse_switch_ref_box_order: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_switch_ref_box_order"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_ternary_operator` from `parse`"]
    pub const parse_ternary_operator: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_ternary_operator"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_tilde_is_not_unary_operator` from `parse`"]
    pub const parse_tilde_is_not_unary_operator: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_tilde_is_not_unary_operator"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_too_many_hashes` from `parse`"]
    pub const parse_too_many_hashes: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_too_many_hashes"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_too_short_hex_escape` from `parse`"]
    pub const parse_too_short_hex_escape: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_too_short_hex_escape"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_trailing_vert_not_allowed` from `parse`"]
    pub const parse_trailing_vert_not_allowed: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_trailing_vert_not_allowed"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_trait_alias_cannot_be_auto` from `parse`"]
    pub const parse_trait_alias_cannot_be_auto: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_trait_alias_cannot_be_auto"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_trait_alias_cannot_be_unsafe` from `parse`"]
    pub const parse_trait_alias_cannot_be_unsafe: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_trait_alias_cannot_be_unsafe"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_trait_impl_modifier_in_inherent_impl` from `parse`"]
    pub const parse_trait_impl_modifier_in_inherent_impl:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_trait_impl_modifier_in_inherent_impl"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_trait_impl_modifier_in_inherent_impl.because` from `parse`"]
    pub const parse_because: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("because"));
    #[doc =
    "Constant referring to Fluent message `parse_trait_impl_modifier_in_inherent_impl.type` from `parse`"]
    pub const parse_type: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("type"));
    #[doc =
    "Constant referring to Fluent message `parse_transpose_dyn_or_impl` from `parse`"]
    pub const parse_transpose_dyn_or_impl: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_transpose_dyn_or_impl"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unclosed_unicode_escape` from `parse`"]
    pub const parse_unclosed_unicode_escape: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unclosed_unicode_escape"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unclosed_unicode_escape.terminate` from `parse`"]
    pub const parse_terminate: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("terminate"));
    #[doc =
    "Constant referring to Fluent message `parse_underscore_literal_suffix` from `parse`"]
    pub const parse_underscore_literal_suffix: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_underscore_literal_suffix"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_const_in_generic_param` from `parse`"]
    pub const parse_unexpected_const_in_generic_param:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_const_in_generic_param"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_const_param_declaration` from `parse`"]
    pub const parse_unexpected_const_param_declaration:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_const_param_declaration"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_default_value_for_lifetime_in_generic_parameters` from `parse`"]
    pub const
        parse_unexpected_default_value_for_lifetime_in_generic_parameters:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_default_value_for_lifetime_in_generic_parameters"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_expr_in_pat` from `parse`"]
    pub const parse_unexpected_expr_in_pat: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_expr_in_pat"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_expr_in_pat_const_sugg` from `parse`"]
    pub const parse_unexpected_expr_in_pat_const_sugg:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_expr_in_pat_const_sugg"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_expr_in_pat_create_guard_sugg` from `parse`"]
    pub const parse_unexpected_expr_in_pat_create_guard_sugg:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_expr_in_pat_create_guard_sugg"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_expr_in_pat_update_guard_sugg` from `parse`"]
    pub const parse_unexpected_expr_in_pat_update_guard_sugg:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_expr_in_pat_update_guard_sugg"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_if_with_if` from `parse`"]
    pub const parse_unexpected_if_with_if: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_if_with_if"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_lifetime_in_pattern` from `parse`"]
    pub const parse_unexpected_lifetime_in_pattern: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_lifetime_in_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_paren_in_range_pat` from `parse`"]
    pub const parse_unexpected_paren_in_range_pat: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_paren_in_range_pat"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_paren_in_range_pat_sugg` from `parse`"]
    pub const parse_unexpected_paren_in_range_pat_sugg:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_paren_in_range_pat_sugg"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_parentheses_in_for_head` from `parse`"]
    pub const parse_unexpected_parentheses_in_for_head:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_parentheses_in_for_head"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_parentheses_in_match_arm_pattern` from `parse`"]
    pub const parse_unexpected_parentheses_in_match_arm_pattern:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_parentheses_in_match_arm_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_self_in_generic_parameters` from `parse`"]
    pub const parse_unexpected_self_in_generic_parameters:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_self_in_generic_parameters"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_dot` from `parse`"]
    pub const parse_unexpected_token_after_dot: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_dot"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_label` from `parse`"]
    pub const parse_unexpected_token_after_label: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_label"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_label.suggestion_remove_label` from `parse`"]
    pub const parse_suggestion_remove_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_remove_label"));
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_label.suggestion_enclose_in_block` from `parse`"]
    pub const parse_suggestion_enclose_in_block: rustc_errors::SubdiagMessage
        =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_enclose_in_block"));
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_not` from `parse`"]
    pub const parse_unexpected_token_after_not: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_not"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_not_bitwise` from `parse`"]
    pub const parse_unexpected_token_after_not_bitwise:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_not_bitwise"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_not_default` from `parse`"]
    pub const parse_unexpected_token_after_not_default:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_not_default"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_not_logical` from `parse`"]
    pub const parse_unexpected_token_after_not_logical:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_not_logical"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_struct_name` from `parse`"]
    pub const parse_unexpected_token_after_struct_name:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_struct_name"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_struct_name_found_doc_comment` from `parse`"]
    pub const parse_unexpected_token_after_struct_name_found_doc_comment:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_struct_name_found_doc_comment"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_struct_name_found_keyword` from `parse`"]
    pub const parse_unexpected_token_after_struct_name_found_keyword:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_struct_name_found_keyword"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_struct_name_found_metavar` from `parse`"]
    pub const parse_unexpected_token_after_struct_name_found_metavar:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_struct_name_found_metavar"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_struct_name_found_other` from `parse`"]
    pub const parse_unexpected_token_after_struct_name_found_other:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_struct_name_found_other"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_struct_name_found_reserved_identifier` from `parse`"]
    pub const
        parse_unexpected_token_after_struct_name_found_reserved_identifier:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_struct_name_found_reserved_identifier"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_token_after_struct_name_found_reserved_keyword` from `parse`"]
    pub const parse_unexpected_token_after_struct_name_found_reserved_keyword:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_token_after_struct_name_found_reserved_keyword"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_vert_vert_before_function_parameter` from `parse`"]
    pub const parse_unexpected_vert_vert_before_function_parameter:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_vert_vert_before_function_parameter"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unexpected_vert_vert_in_pattern` from `parse`"]
    pub const parse_unexpected_vert_vert_in_pattern: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unexpected_vert_vert_in_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unicode_escape_in_byte` from `parse`"]
    pub const parse_unicode_escape_in_byte: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unicode_escape_in_byte"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unknown_builtin_construct` from `parse`"]
    pub const parse_unknown_builtin_construct: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unknown_builtin_construct"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unknown_prefix` from `parse`"]
    pub const parse_unknown_prefix: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unknown_prefix"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unknown_prefix.suggestion_br` from `parse`"]
    pub const parse_suggestion_br: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_br"));
    #[doc =
    "Constant referring to Fluent message `parse_unknown_prefix.suggestion_cr` from `parse`"]
    pub const parse_suggestion_cr: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_cr"));
    #[doc =
    "Constant referring to Fluent message `parse_unknown_prefix.suggestion_str` from `parse`"]
    pub const parse_suggestion_str: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion_str"));
    #[doc =
    "Constant referring to Fluent message `parse_unknown_start_of_token` from `parse`"]
    pub const parse_unknown_start_of_token: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unknown_start_of_token"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unknown_start_of_token.sugg_quotes` from `parse`"]
    pub const parse_sugg_quotes: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("sugg_quotes"));
    #[doc =
    "Constant referring to Fluent message `parse_unknown_start_of_token.sugg_other` from `parse`"]
    pub const parse_sugg_other: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("sugg_other"));
    #[doc =
    "Constant referring to Fluent message `parse_unknown_start_of_token.help_null` from `parse`"]
    pub const parse_help_null: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("help_null"));
    #[doc =
    "Constant referring to Fluent message `parse_unknown_start_of_token.help_invisible_char` from `parse`"]
    pub const parse_help_invisible_char: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("help_invisible_char"));
    #[doc =
    "Constant referring to Fluent message `parse_unknown_start_of_token.note_repeats` from `parse`"]
    pub const parse_note_repeats: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("note_repeats"));
    #[doc =
    "Constant referring to Fluent message `parse_unmatched_angle` from `parse`"]
    pub const parse_unmatched_angle: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unmatched_angle"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unmatched_angle_brackets` from `parse`"]
    pub const parse_unmatched_angle_brackets: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unmatched_angle_brackets"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_unskipped_whitespace` from `parse`"]
    pub const parse_unskipped_whitespace: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_unskipped_whitespace"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_use_empty_block_not_semi` from `parse`"]
    pub const parse_use_empty_block_not_semi: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_use_empty_block_not_semi"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_use_eq_instead` from `parse`"]
    pub const parse_use_eq_instead: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_use_eq_instead"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_use_if_else` from `parse`"]
    pub const parse_use_if_else: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_use_if_else"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_use_let_not_auto` from `parse`"]
    pub const parse_use_let_not_auto: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_use_let_not_auto"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_use_let_not_var` from `parse`"]
    pub const parse_use_let_not_var: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_use_let_not_var"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_varargs_without_pattern` from `parse`"]
    pub const parse_varargs_without_pattern: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_varargs_without_pattern"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_visibility_not_followed_by_item` from `parse`"]
    pub const parse_visibility_not_followed_by_item: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_visibility_not_followed_by_item"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_where_clause_before_const_body` from `parse`"]
    pub const parse_where_clause_before_const_body: rustc_errors::DiagMessage
        =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_where_clause_before_const_body"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_where_clause_before_const_body.name_label` from `parse`"]
    pub const parse_name_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("name_label"));
    #[doc =
    "Constant referring to Fluent message `parse_where_clause_before_const_body.body_label` from `parse`"]
    pub const parse_body_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("body_label"));
    #[doc =
    "Constant referring to Fluent message `parse_where_clause_before_tuple_struct_body` from `parse`"]
    pub const parse_where_clause_before_tuple_struct_body:
        rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_where_clause_before_tuple_struct_body"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_where_generics` from `parse`"]
    pub const parse_where_generics: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_where_generics"),
            None);
    #[doc =
    "Constant referring to Fluent message `parse_zero_chars` from `parse`"]
    pub const parse_zero_chars: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("parse_zero_chars"),
            None);
    #[doc =
    r" Constants expected to exist by the diagnostic derive macros to use as default Fluent"]
    #[doc = r" identifiers for different subdiagnostic kinds."]
    pub mod _subdiag {
        #[doc = r" Default for `#[help]`"]
        pub const help: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("help"));
        #[doc = r" Default for `#[note]`"]
        pub const note: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("note"));
        #[doc = r" Default for `#[warn]`"]
        pub const warn: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("warn"));
        #[doc = r" Default for `#[label]`"]
        pub const label: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label"));
        #[doc = r" Default for `#[suggestion]`"]
        pub const suggestion: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion"));
    }
}rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
79
80// Unwrap the result if `Ok`, otherwise emit the diagnostics and abort.
81pub fn unwrap_or_emit_fatal<T>(expr: Result<T, Vec<Diag<'_>>>) -> T {
82    match expr {
83        Ok(expr) => expr,
84        Err(errs) => {
85            for err in errs {
86                err.emit();
87            }
88            FatalError.raise()
89        }
90    }
91}
92
93/// Creates a new parser from a source string.
94///
95/// On failure, the errors must be consumed via `unwrap_or_emit_fatal`, `emit`, `cancel`,
96/// etc., otherwise a panic will occur when they are dropped.
97pub fn new_parser_from_source_str(
98    psess: &ParseSess,
99    name: FileName,
100    source: String,
101    strip_tokens: StripTokens,
102) -> Result<Parser<'_>, Vec<Diag<'_>>> {
103    let source_file = psess.source_map().new_source_file(name, source);
104    new_parser_from_source_file(psess, source_file, strip_tokens)
105}
106
107/// Creates a new parser from a filename. On failure, the errors must be consumed via
108/// `unwrap_or_emit_fatal`, `emit`, `cancel`, etc., otherwise a panic will occur when they are
109/// dropped.
110///
111/// If a span is given, that is used on an error as the source of the problem.
112pub fn new_parser_from_file<'a>(
113    psess: &'a ParseSess,
114    path: &Path,
115    strip_tokens: StripTokens,
116    sp: Option<Span>,
117) -> Result<Parser<'a>, Vec<Diag<'a>>> {
118    let sm = psess.source_map();
119    let source_file = sm.load_file(path).unwrap_or_else(|e| {
120        let msg = ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("couldn\'t read `{0}`: {1}",
                path.display(), e))
    })format!("couldn't read `{}`: {}", path.display(), e);
121        let mut err = psess.dcx().struct_fatal(msg);
122        if let Ok(contents) = std::fs::read(path)
123            && let Err(utf8err) = String::from_utf8(contents.clone())
124        {
125            utf8_error(
126                sm,
127                &path.display().to_string(),
128                sp,
129                &mut err,
130                utf8err.utf8_error(),
131                &contents,
132            );
133        }
134        if let Some(sp) = sp {
135            err.span(sp);
136        }
137        err.emit();
138    });
139    new_parser_from_source_file(psess, source_file, strip_tokens)
140}
141
142pub fn utf8_error<E: EmissionGuarantee>(
143    sm: &SourceMap,
144    path: &str,
145    sp: Option<Span>,
146    err: &mut Diag<'_, E>,
147    utf8err: Utf8Error,
148    contents: &[u8],
149) {
150    // The file exists, but it wasn't valid UTF-8.
151    let start = utf8err.valid_up_to();
152    let note = ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("invalid utf-8 at byte `{0}`",
                start))
    })format!("invalid utf-8 at byte `{start}`");
153    let msg = if let Some(len) = utf8err.error_len() {
154        ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("byte{1} `{0}` {2} not valid utf-8",
                if len == 1 {
                    ::alloc::__export::must_use({
                            ::alloc::fmt::format(format_args!("{0:?}", contents[start]))
                        })
                } else {
                    ::alloc::__export::must_use({
                            ::alloc::fmt::format(format_args!("{0:?}",
                                    &contents[start..start + len]))
                        })
                }, if len == 1 { "" } else { "s" },
                if len == 1 { "is" } else { "are" }))
    })format!(
155            "byte{s} `{bytes}` {are} not valid utf-8",
156            bytes = if len == 1 {
157                format!("{:?}", contents[start])
158            } else {
159                format!("{:?}", &contents[start..start + len])
160            },
161            s = pluralize!(len),
162            are = if len == 1 { "is" } else { "are" },
163        )
164    } else {
165        note.clone()
166    };
167    let contents = String::from_utf8_lossy(contents).to_string();
168
169    // We only emit this error for files in the current session
170    // so the working directory can only be the current working directory
171    let filename = FileName::Real(
172        sm.path_mapping().to_real_filename(sm.working_dir(), PathBuf::from(path).as_path()),
173    );
174    let source = sm.new_source_file(filename, contents);
175
176    // Avoid out-of-bounds span from lossy UTF-8 conversion.
177    if start as u32 > source.normalized_source_len.0 {
178        err.note(note);
179        return;
180    }
181
182    let span = Span::with_root_ctxt(
183        source.normalized_byte_pos(start as u32),
184        source.normalized_byte_pos(start as u32),
185    );
186    if span.is_dummy() {
187        err.note(note);
188    } else {
189        if sp.is_some() {
190            err.span_note(span, msg);
191        } else {
192            err.span(span);
193            err.span_label(span, msg);
194        }
195    }
196}
197
198/// Given a session and a `source_file`, return a parser. Returns any buffered errors from lexing
199/// the initial token stream.
200fn new_parser_from_source_file(
201    psess: &ParseSess,
202    source_file: Arc<SourceFile>,
203    strip_tokens: StripTokens,
204) -> Result<Parser<'_>, Vec<Diag<'_>>> {
205    let end_pos = source_file.end_position();
206    let stream = source_file_to_stream(psess, source_file, None, strip_tokens)?;
207    let mut parser = Parser::new(psess, stream, None);
208    if parser.token == token::Eof {
209        parser.token.span = Span::new(end_pos, end_pos, parser.token.span.ctxt(), None);
210    }
211    Ok(parser)
212}
213
214/// Given a source string, produces a sequence of token trees.
215///
216/// NOTE: This only strips shebangs, not frontmatter!
217pub fn source_str_to_stream(
218    psess: &ParseSess,
219    name: FileName,
220    source: String,
221    override_span: Option<Span>,
222) -> Result<TokenStream, Vec<Diag<'_>>> {
223    let source_file = psess.source_map().new_source_file(name, source);
224    // FIXME(frontmatter): Consider stripping frontmatter in a future edition. We can't strip them
225    // in the current edition since that would be breaking.
226    // See also <https://github.com/rust-lang/rust/issues/145520>.
227    // Alternatively, stop stripping shebangs here, too, if T-lang and crater approve.
228    source_file_to_stream(psess, source_file, override_span, StripTokens::Shebang)
229}
230
231/// Given a source file, produces a sequence of token trees.
232///
233/// Returns any buffered errors from parsing the token stream.
234fn source_file_to_stream<'psess>(
235    psess: &'psess ParseSess,
236    source_file: Arc<SourceFile>,
237    override_span: Option<Span>,
238    strip_tokens: StripTokens,
239) -> Result<TokenStream, Vec<Diag<'psess>>> {
240    let src = source_file.src.as_ref().unwrap_or_else(|| {
241        psess.dcx().bug(::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("cannot lex `source_file` without source: {0}",
                psess.source_map().filename_for_diagnostics(&source_file.name)))
    })format!(
242            "cannot lex `source_file` without source: {}",
243            psess.source_map().filename_for_diagnostics(&source_file.name)
244        ));
245    });
246
247    lexer::lex_token_trees(psess, src.as_str(), source_file.start_pos, override_span, strip_tokens)
248}
249
250/// Runs the given subparser `f` on the tokens of the given `attr`'s item.
251pub fn parse_in<'a, T>(
252    psess: &'a ParseSess,
253    tts: TokenStream,
254    name: &'static str,
255    mut f: impl FnMut(&mut Parser<'a>) -> PResult<'a, T>,
256) -> PResult<'a, T> {
257    let mut parser = Parser::new(psess, tts, Some(name));
258    let result = f(&mut parser)?;
259    if parser.token != token::Eof {
260        parser.unexpected()?;
261    }
262    Ok(result)
263}
264
265pub fn fake_token_stream_for_item(psess: &ParseSess, item: &ast::Item) -> TokenStream {
266    let source = pprust::item_to_string(item);
267    let filename = FileName::macro_expansion_source_code(&source);
268    unwrap_or_emit_fatal(source_str_to_stream(psess, filename, source, Some(item.span)))
269}
270
271pub fn fake_token_stream_for_crate(psess: &ParseSess, krate: &ast::Crate) -> TokenStream {
272    let source = pprust::crate_to_string_for_macros(krate);
273    let filename = FileName::macro_expansion_source_code(&source);
274    unwrap_or_emit_fatal(source_str_to_stream(
275        psess,
276        filename,
277        source,
278        Some(krate.spans.inner_span),
279    ))
280}