1
Fork 0

Rollup merge of #106407 - mejrs:attr_check, r=compiler-errors

Improve proc macro attribute diagnostics

Closes https://github.com/rust-lang/rust/issues/102923
This commit is contained in:
Matthias Krüger 2023-01-26 06:15:23 +01:00 committed by GitHub
commit 8ae5116fae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 542 additions and 22 deletions

View file

@ -710,3 +710,24 @@ passes_ignored_derived_impls =
[one] trait {$trait_list}, but this is
*[other] traits {$trait_list}, but these are
} intentionally ignored during dead code analysis
passes_proc_macro_typeerror = mismatched {$kind} signature
.label = found {$found}, expected type `proc_macro::TokenStream`
.note = {$kind}s must have a signature of `{$expected_signature}`
passes_proc_macro_diff_arg_count = mismatched {$kind} signature
.label = found unexpected {$count ->
[one] argument
*[other] arguments
}
.note = {$kind}s must have a signature of `{$expected_signature}`
passes_proc_macro_missing_args = mismatched {$kind} signature
.label = {$kind} must have {$expected_input_count ->
[one] one argument
*[other] two arguments
} of type `proc_macro::TokenStream`
passes_proc_macro_invalid_abi = proc macro functions may not be `extern "{$abi}"`
passes_proc_macro_unsafe = proc macro functions may not be `unsafe`