diff options
| author | bors <bors@rust-lang.org> | 2024-07-04 16:37:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-04 16:37:39 +0000 |
| commit | 8a9cccb1004e9fa8a189e3288a92e998cefdd3c6 (patch) | |
| tree | 047e49067e968e998874d688b4edbd8fe57772a6 /compiler/rustc_builtin_macros/src/errors.rs | |
| parent | 9f877c9cd2c3f8f2f64df1e0c1804ad0682416d0 (diff) | |
| parent | dd42f7a0a6158738e7321ac489591d9694a71fcc (diff) | |
| download | rust-8a9cccb1004e9fa8a189e3288a92e998cefdd3c6.tar.gz rust-8a9cccb1004e9fa8a189e3288a92e998cefdd3c6.zip | |
Auto merge of #127326 - matthiaskrgr:rollup-kz7vd3w, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #123043 (Disable dead variant removal for `#[repr(C)]` enums.) - #126405 (Migrate some rustc_builtin_macros to SessionDiagnostic) - #127037 (Remove some duplicated tests) - #127283 (Reject SmartPointer constructions not serving the purpose) - #127301 (Tweak some structured suggestions to be more verbose and accurate) - #127307 (Allow to have different types for arguments of `Rustc::remap_path_prefix`) - #127309 (jsondocck: add `$FILE` built-in variable) - #127314 (Trivial update on tidy bless note) - #127319 (Remove a use of `StructuredDiag`, which is incompatible with automatic error tainting and error translations) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_builtin_macros/src/errors.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/errors.rs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/compiler/rustc_builtin_macros/src/errors.rs b/compiler/rustc_builtin_macros/src/errors.rs index ed2f98f2a39..49d640436c2 100644 --- a/compiler/rustc_builtin_macros/src/errors.rs +++ b/compiler/rustc_builtin_macros/src/errors.rs @@ -729,6 +729,14 @@ pub(crate) struct AsmExpectedComma { } #[derive(Diagnostic)] +#[diag(builtin_macros_asm_expected_string_literal)] +pub(crate) struct AsmExpectedStringLiteral { + #[primary_span] + #[label] + pub(crate) span: Span, +} + +#[derive(Diagnostic)] #[diag(builtin_macros_asm_underscore_input)] pub(crate) struct AsmUnderscoreInput { #[primary_span] @@ -782,6 +790,14 @@ pub(crate) struct AsmNoReturn { } #[derive(Diagnostic)] +#[diag(builtin_macros_asm_no_matched_argument_name)] +pub(crate) struct AsmNoMatchedArgumentName { + pub(crate) name: String, + #[primary_span] + pub(crate) span: Span, +} + +#[derive(Diagnostic)] #[diag(builtin_macros_asm_mayunwind)] pub(crate) struct AsmMayUnwind { #[primary_span] @@ -872,3 +888,27 @@ pub(crate) struct TakesNoArguments<'a> { pub span: Span, pub name: &'a str, } + +#[derive(Diagnostic)] +#[diag(builtin_macros_proc_macro_attribute_only_be_used_on_bare_functions)] +pub(crate) struct AttributeOnlyBeUsedOnBareFunctions<'a> { + #[primary_span] + pub span: Span, + pub path: &'a str, +} + +#[derive(Diagnostic)] +#[diag(builtin_macros_proc_macro_attribute_only_usable_with_crate_type)] +pub(crate) struct AttributeOnlyUsableWithCrateType<'a> { + #[primary_span] + pub span: Span, + pub path: &'a str, +} + +#[derive(Diagnostic)] +#[diag(builtin_macros_source_uitls_expected_item)] +pub(crate) struct ExpectedItem<'a> { + #[primary_span] + pub span: Span, + pub token: &'a str, +} |
