Bump `proc-macro2`, `syn` and `quote`

This disables the `proc_macro_span` feature which unfortunately makes our
diagnostic derive macro diagnostics a little worse.
This commit is contained in:
clubby789 2024-01-29 12:18:30 +00:00
parent 6ac3b57fc8
commit ed8850010a
3 changed files with 142 additions and 215 deletions

View File

@ -257,7 +257,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -569,7 +569,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -596,7 +596,7 @@ dependencies = [
"regex",
"rustc_tools_util",
"serde",
"syn 2.0.32",
"syn 2.0.48",
"tempfile",
"termize",
"tester",
@ -994,7 +994,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -1016,7 +1016,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5"
dependencies = [
"darling_core 0.20.3",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -1031,7 +1031,7 @@ version = "0.1.78"
dependencies = [
"itertools",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -1107,7 +1107,7 @@ dependencies = [
"darling 0.20.3",
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -1196,7 +1196,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -1550,7 +1550,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -1973,7 +1973,7 @@ checksum = "2060258edfcfe32ca7058849bf0f146cb5c59aadbedf480333c0d0002f97bc99"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -2715,7 +2715,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -2907,7 +2907,7 @@ dependencies = [
"pest_meta",
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -3030,9 +3030,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
[[package]]
name = "proc-macro2"
version = "1.0.63"
version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb"
checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
dependencies = [
"unicode-ident",
]
@ -3106,9 +3106,9 @@ checksum = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45"
[[package]]
name = "quote"
version = "1.0.29"
version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105"
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
dependencies = [
"proc-macro2",
]
@ -3914,7 +3914,7 @@ dependencies = [
"fluent-syntax",
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
"unic-langid",
]
@ -4048,7 +4048,7 @@ version = "0.0.0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
"synstructure",
]
@ -4194,7 +4194,7 @@ version = "0.0.0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
"synstructure",
]
@ -4813,7 +4813,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -4976,7 +4976,7 @@ checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -5267,9 +5267,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.32"
version = "2.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2"
checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
dependencies = [
"proc-macro2",
"quote",
@ -5284,7 +5284,7 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
"unicode-xid",
]
@ -5444,7 +5444,7 @@ checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -5667,7 +5667,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -5847,7 +5847,7 @@ checksum = "fea2a4c80deb4fb3ca51f66b5e2dd91e3642bbce52234bcf22e41668281208e4"
dependencies = [
"proc-macro-hack",
"quote",
"syn 2.0.32",
"syn 2.0.48",
"unic-langid-impl",
]
@ -6073,7 +6073,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
"wasm-bindgen-shared",
]
@ -6107,7 +6107,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -6176,7 +6176,7 @@ checksum = "970efb0b6849eb8a87a898f586af7cc167567b070014c7434514c0bde0ca341c"
dependencies = [
"proc-macro2",
"rayon",
"syn 2.0.32",
"syn 2.0.48",
"windows-metadata",
]
@ -6484,7 +6484,7 @@ checksum = "d5e19fb6ed40002bab5403ffa37e53e0e56f914a4450c8765f533018db1db35f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
"synstructure",
]
@ -6505,7 +6505,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]
@ -6525,7 +6525,7 @@ checksum = "e6a647510471d372f2e6c2e6b7219e44d8c574d24fdc11c610a61455782f18c3"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
"synstructure",
]
@ -6548,7 +6548,7 @@ checksum = "acabf549809064225ff8878baedc4ce3732ac3b07e7c7ce6e5c2ccdbc485c324"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.32",
"syn 2.0.48",
]
[[package]]

View File

@ -2,7 +2,7 @@ error: unsupported type attribute for diagnostic derive enum
--> $DIR/diagnostic-derive.rs:47:1
|
LL | #[diag(no_crate_example, code = E0123)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:50:5
@ -24,27 +24,21 @@ error: `#[nonsense(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:63:1
|
LL | #[nonsense(no_crate_example, code = E0123)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:63:1
|
LL | / #[nonsense(no_crate_example, code = E0123)]
LL | |
LL | |
LL | |
LL | | struct InvalidStructAttr {}
| |___________________________^
LL | #[nonsense(no_crate_example, code = E0123)]
| ^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:70:1
|
LL | / #[diag(code = E0123)]
LL | |
LL | | struct InvalidLitNestedAttr {}
| |______________________________^
LL | #[diag(code = E0123)]
| ^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
@ -57,11 +51,8 @@ LL | #[diag(nonsense("foo"), code = E0123, slug = "foo")]
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:80:1
|
LL | / #[diag(nonsense("foo"), code = E0123, slug = "foo")]
LL | |
LL | |
LL | | struct InvalidNestedStructAttr1 {}
| |__________________________________^
LL | #[diag(nonsense("foo"), code = E0123, slug = "foo")]
| ^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
@ -76,11 +67,8 @@ LL | #[diag(nonsense = "...", code = E0123, slug = "foo")]
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:86:1
|
LL | / #[diag(nonsense = "...", code = E0123, slug = "foo")]
LL | |
LL | |
LL | | struct InvalidNestedStructAttr2 {}
| |__________________________________^
LL | #[diag(nonsense = "...", code = E0123, slug = "foo")]
| ^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
@ -95,11 +83,8 @@ LL | #[diag(nonsense = 4, code = E0123, slug = "foo")]
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:92:1
|
LL | / #[diag(nonsense = 4, code = E0123, slug = "foo")]
LL | |
LL | |
LL | | struct InvalidNestedStructAttr3 {}
| |__________________________________^
LL | #[diag(nonsense = 4, code = E0123, slug = "foo")]
| ^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
@ -115,7 +100,7 @@ error: `#[suggestion = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:105:5
|
LL | #[suggestion = "bar"]
| ^^^^^^^^^^^^^^^^^^^^^
| ^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:112:8
@ -163,17 +148,15 @@ error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:128:1
|
LL | struct KindNotProvided {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:131:1
|
LL | / #[diag(code = E0123)]
LL | |
LL | | struct SlugNotProvided {}
| |_________________________^
LL | #[diag(code = E0123)]
| ^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
@ -181,19 +164,19 @@ error: the `#[primary_span]` attribute can only be applied to fields of type `Sp
--> $DIR/diagnostic-derive.rs:142:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
| ^
error: `#[nonsense]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:150:5
|
LL | #[nonsense]
| ^^^^^^^^^^^
| ^
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> $DIR/diagnostic-derive.rs:167:5
|
LL | #[label(no_crate_label)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: `name` doesn't refer to a field on this type
--> $DIR/diagnostic-derive.rs:175:46
@ -223,13 +206,13 @@ error: the `#[label(...)]` attribute can only be applied to fields of type `Span
--> $DIR/diagnostic-derive.rs:210:5
|
LL | #[label(no_crate_label)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: suggestion without `code = "..."`
--> $DIR/diagnostic-derive.rs:229:5
|
LL | #[suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: invalid nested attribute
--> $DIR/diagnostic-derive.rs:237:18
@ -243,7 +226,7 @@ error: suggestion without `code = "..."`
--> $DIR/diagnostic-derive.rs:237:5
|
LL | #[suggestion(nonsense = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: invalid nested attribute
--> $DIR/diagnostic-derive.rs:246:18
@ -257,15 +240,13 @@ error: suggestion without `code = "..."`
--> $DIR/diagnostic-derive.rs:246:5
|
LL | #[suggestion(msg = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: wrong field type for suggestion
--> $DIR/diagnostic-derive.rs:269:5
|
LL | / #[suggestion(no_crate_suggestion, code = "This is suggested code")]
LL | |
LL | | suggestion: Applicability,
| |_____________________________^
LL | #[suggestion(no_crate_suggestion, code = "This is suggested code")]
| ^
|
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
@ -297,13 +278,13 @@ error: `#[label = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:300:5
|
LL | #[label = "bar"]
| ^^^^^^^^^^^^^^^^
| ^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:451:5
|
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:453:24
@ -321,7 +302,7 @@ error: the `#[help(...)]` attribute can only be applied to fields of type `Span`
--> $DIR/diagnostic-derive.rs:526:5
|
LL | #[help(no_crate_help)]
| ^^^^^^^^^^^^^^^^^^^^^^
| ^
error: a diagnostic slug must be the first argument to the attribute
--> $DIR/diagnostic-derive.rs:535:32
@ -345,7 +326,7 @@ error: `#[primary_span]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:563:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
| ^
|
= help: the `primary_span` field attribute is not valid for lint diagnostics
@ -353,17 +334,13 @@ error: `#[error(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:583:1
|
LL | #[error(no_crate_example, code = E0123)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:583:1
|
LL | / #[error(no_crate_example, code = E0123)]
LL | |
LL | |
LL | |
LL | | struct ErrorAttribute {}
| |________________________^
LL | #[error(no_crate_example, code = E0123)]
| ^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
@ -371,17 +348,13 @@ error: `#[warn_(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:590:1
|
LL | #[warn_(no_crate_example, code = E0123)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:590:1
|
LL | / #[warn_(no_crate_example, code = E0123)]
LL | |
LL | |
LL | |
LL | | struct WarnAttribute {}
| |_______________________^
LL | #[warn_(no_crate_example, code = E0123)]
| ^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
@ -389,17 +362,13 @@ error: `#[lint(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:597:1
|
LL | #[lint(no_crate_example, code = E0123)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:597:1
|
LL | / #[lint(no_crate_example, code = E0123)]
LL | |
LL | |
LL | |
LL | | struct LintAttributeOnSessionDiag {}
| |____________________________________^
LL | #[lint(no_crate_example, code = E0123)]
| ^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
@ -407,26 +376,21 @@ error: `#[lint(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:604:1
|
LL | #[lint(no_crate_example, code = E0123)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: `#[lint(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:604:1
|
LL | #[lint(no_crate_example, code = E0123)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:604:1
|
LL | / #[lint(no_crate_example, code = E0123)]
LL | |
LL | |
LL | |
LL | |
LL | | struct LintAttributeOnLintDiag {}
| |_________________________________^
LL | #[lint(no_crate_example, code = E0123)]
| ^
|
= help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
@ -462,13 +426,13 @@ error: suggestion without `code = "..."`
--> $DIR/diagnostic-derive.rs:638:5
|
LL | #[suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: `#[multipart_suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:645:1
|
LL | #[multipart_suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= help: consider creating a `Subdiagnostic` instead
@ -476,7 +440,7 @@ error: `#[multipart_suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:648:1
|
LL | #[multipart_suggestion()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= help: consider creating a `Subdiagnostic` instead
@ -484,7 +448,7 @@ error: `#[multipart_suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:652:5
|
LL | #[multipart_suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= help: consider creating a `Subdiagnostic` instead
@ -492,7 +456,7 @@ error: `#[suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:660:1
|
LL | #[suggestion(no_crate_suggestion, code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= help: `#[label]` and `#[suggestion]` can only be applied to fields
@ -500,7 +464,7 @@ error: `#[label]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:669:1
|
LL | #[label]
| ^^^^^^^^
| ^
|
= help: `#[label]` and `#[suggestion]` can only be applied to fields
@ -508,31 +472,31 @@ error: `eager` is the only supported nested attribute for `subdiagnostic`
--> $DIR/diagnostic-derive.rs:703:7
|
LL | #[subdiagnostic(bad)]
| ^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^
error: `#[subdiagnostic = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:711:5
|
LL | #[subdiagnostic = "bad"]
| ^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: `eager` is the only supported nested attribute for `subdiagnostic`
--> $DIR/diagnostic-derive.rs:719:7
|
LL | #[subdiagnostic(bad, bad)]
| ^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^
error: `eager` is the only supported nested attribute for `subdiagnostic`
--> $DIR/diagnostic-derive.rs:727:7
|
LL | #[subdiagnostic("bad")]
| ^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^
error: `#[subdiagnostic(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:735:5
|
LL | #[subdiagnostic(eager)]
| ^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= help: eager subdiagnostics are not supported on lints
@ -552,7 +516,7 @@ error: `#[suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:825:5
|
LL | #[suggestion(no_crate_suggestion, code = "")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= note: `#[suggestion(...)]` applied to `Vec` field is ambiguous
= help: to show a suggestion consisting of multiple parts, use a `Subdiagnostic` annotated with `#[multipart_suggestion(...)]`

View File

@ -1,30 +1,26 @@
error: label without `#[primary_span]` field
--> $DIR/subdiagnostic-derive.rs:51:1
|
LL | / #[label(no_crate_example)]
LL | |
LL | | struct C {
LL | | var: String,
LL | | }
| |_^
LL | #[label(no_crate_example)]
| ^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive.rs:58:1
|
LL | #[label]
| ^^^^^^^^
| ^
error: `#[foo]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:67:1
|
LL | #[foo]
| ^^^^^^
| ^
error: `#[label = ...]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:77:1
|
LL | #[label = "..."]
| ^^^^^^^^^^^^^^^^
| ^
error: only `no_span` is a valid nested attribute
--> $DIR/subdiagnostic-derive.rs:86:9
@ -36,7 +32,7 @@ error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive.rs:86:1
|
LL | #[label(bug = "...")]
| ^^^^^^^^^^^^^^^^^^^^^
| ^
error: only `no_span` is a valid nested attribute
--> $DIR/subdiagnostic-derive.rs:106:9
@ -48,7 +44,7 @@ error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive.rs:106:1
|
LL | #[label(slug = 4)]
| ^^^^^^^^^^^^^^^^^^
| ^
error: only `no_span` is a valid nested attribute
--> $DIR/subdiagnostic-derive.rs:116:9
@ -60,13 +56,13 @@ error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive.rs:116:1
|
LL | #[label(slug("..."))]
| ^^^^^^^^^^^^^^^^^^^^^
| ^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive.rs:136:1
|
LL | #[label()]
| ^^^^^^^^^^
| ^
error: only `no_span` is a valid nested attribute
--> $DIR/subdiagnostic-derive.rs:145:27
@ -84,31 +80,31 @@ error: unsupported type attribute for subdiagnostic enum
--> $DIR/subdiagnostic-derive.rs:163:1
|
LL | #[foo]
| ^^^^^^
| ^
error: `#[bar]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:177:5
|
LL | #[bar]
| ^^^^^^
| ^
error: `#[bar = ...]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:189:5
|
LL | #[bar = "..."]
| ^^^^^^^^^^^^^^
| ^
error: `#[bar = ...]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:201:5
|
LL | #[bar = 4]
| ^^^^^^^^^^
| ^
error: `#[bar(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:213:5
|
LL | #[bar("...")]
| ^^^^^^^^^^^^^
| ^
error: only `no_span` is a valid nested attribute
--> $DIR/subdiagnostic-derive.rs:225:13
@ -120,37 +116,31 @@ error: diagnostic slug must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive.rs:225:5
|
LL | #[label(code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^
| ^
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> $DIR/subdiagnostic-derive.rs:254:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
| ^
error: label without `#[primary_span]` field
--> $DIR/subdiagnostic-derive.rs:251:1
|
LL | / #[label(no_crate_example)]
LL | |
LL | | struct W {
LL | | #[primary_span]
LL | |
LL | | span: String,
LL | | }
| |_^
LL | #[label(no_crate_example)]
| ^
error: `#[applicability]` is only valid on suggestions
--> $DIR/subdiagnostic-derive.rs:264:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
| ^
error: `#[bar]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:274:5
|
LL | #[bar]
| ^^^^^^
| ^
|
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
@ -158,13 +148,13 @@ error: `#[bar = ...]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:285:5
|
LL | #[bar = "..."]
| ^^^^^^^^^^^^^^
| ^
error: `#[bar(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:296:5
|
LL | #[bar("...")]
| ^^^^^^^^^^^^^
| ^
|
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
@ -178,13 +168,13 @@ error: specified multiple times
--> $DIR/subdiagnostic-derive.rs:341:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
| ^
|
note: previously specified here
--> $DIR/subdiagnostic-derive.rs:338:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
| ^
error: subdiagnostic kind not specified
--> $DIR/subdiagnostic-derive.rs:347:8
@ -208,25 +198,25 @@ error: specified multiple times
--> $DIR/subdiagnostic-derive.rs:402:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
| ^
|
note: previously specified here
--> $DIR/subdiagnostic-derive.rs:399:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
| ^
error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
--> $DIR/subdiagnostic-derive.rs:412:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
| ^
error: suggestion without `code = "..."`
--> $DIR/subdiagnostic-derive.rs:425:1
|
LL | #[suggestion(no_crate_example)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: invalid applicability
--> $DIR/subdiagnostic-derive.rs:435:62
@ -237,18 +227,14 @@ LL | #[suggestion(no_crate_example, code = "...", applicability = "foo")]
error: suggestion without `#[primary_span]` field
--> $DIR/subdiagnostic-derive.rs:453:1
|
LL | / #[suggestion(no_crate_example, code = "...")]
LL | |
LL | | struct AR {
LL | | var: String,
LL | | }
| |_^
LL | #[suggestion(no_crate_example, code = "...")]
| ^
error: unsupported type attribute for subdiagnostic enum
--> $DIR/subdiagnostic-derive.rs:467:1
|
LL | #[label]
| ^^^^^^^^
| ^
error: `var` doesn't refer to a field on this type
--> $DIR/subdiagnostic-derive.rs:487:39
@ -266,7 +252,7 @@ error: `#[suggestion_part]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:529:5
|
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
| ^
|
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
@ -274,21 +260,15 @@ error: `#[suggestion_part(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:532:5
|
LL | #[suggestion_part(code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions
error: suggestion without `#[primary_span]` field
--> $DIR/subdiagnostic-derive.rs:526:1
|
LL | / #[suggestion(no_crate_example, code = "...")]
LL | |
LL | | struct BA {
LL | | #[suggestion_part]
... |
LL | | var: String,
LL | | }
| |_^
LL | #[suggestion(no_crate_example, code = "...")]
| ^
error: invalid nested attribute
--> $DIR/subdiagnostic-derive.rs:541:42
@ -301,57 +281,46 @@ LL | #[multipart_suggestion(no_crate_example, code = "...", applicability = "mac
error: multipart suggestion without any `#[suggestion_part(...)]` fields
--> $DIR/subdiagnostic-derive.rs:541:1
|
LL | / #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
LL | |
LL | |
LL | | struct BBa {
LL | | var: String,
LL | | }
| |_^
LL | #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
| ^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
--> $DIR/subdiagnostic-derive.rs:551:5
|
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
| ^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
--> $DIR/subdiagnostic-derive.rs:559:5
|
LL | #[suggestion_part()]
| ^^^^^^^^^^^^^^^^^^^^
| ^
error: `#[primary_span]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:568:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
| ^
|
= help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
error: multipart suggestion without any `#[suggestion_part(...)]` fields
--> $DIR/subdiagnostic-derive.rs:565:1
|
LL | / #[multipart_suggestion(no_crate_example)]
LL | |
LL | | struct BC {
LL | | #[primary_span]
LL | |
LL | | span: Span,
LL | | }
| |_^
LL | #[multipart_suggestion(no_crate_example)]
| ^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
--> $DIR/subdiagnostic-derive.rs:576:5
|
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
| ^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
--> $DIR/subdiagnostic-derive.rs:579:5
|
LL | #[suggestion_part()]
| ^^^^^^^^^^^^^^^^^^^^
| ^
error: `code` is the only valid nested attribute
--> $DIR/subdiagnostic-derive.rs:582:23
@ -363,13 +332,13 @@ error: the `#[suggestion_part(...)]` attribute can only be applied to fields of
--> $DIR/subdiagnostic-derive.rs:587:5
|
LL | #[suggestion_part(code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> $DIR/subdiagnostic-derive.rs:590:5
|
LL | #[suggestion_part()]
| ^^^^^^^^^^^^^^^^^^^^
| ^
error: specified multiple times
--> $DIR/subdiagnostic-derive.rs:598:37
@ -387,7 +356,7 @@ error: `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_sugg
--> $DIR/subdiagnostic-derive.rs:627:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
| ^
error: expected exactly one string literal for `code = ...`
--> $DIR/subdiagnostic-derive.rs:675:34
@ -417,19 +386,19 @@ error: specified multiple times
--> $DIR/subdiagnostic-derive.rs:763:1
|
LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
note: previously specified here
--> $DIR/subdiagnostic-derive.rs:763:1
|
LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
error: `#[suggestion_hidden(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:772:1
|
LL | #[suggestion_hidden(no_crate_example, code = "")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= help: Use `#[suggestion(..., style = "hidden")]` instead
@ -437,7 +406,7 @@ error: `#[suggestion_hidden(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:780:1
|
LL | #[suggestion_hidden(no_crate_example, code = "", style = "normal")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
|
= help: Use `#[suggestion(..., style = "hidden")]` instead
@ -471,7 +440,7 @@ error: `#[primary_span]` is not a valid attribute
--> $DIR/subdiagnostic-derive.rs:825:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
| ^
|
= note: there must be exactly one primary span
= help: to create a suggestion with multiple spans, use `#[multipart_suggestion]` instead
@ -479,14 +448,8 @@ LL | #[primary_span]
error: suggestion without `#[primary_span]` field
--> $DIR/subdiagnostic-derive.rs:822:1
|
LL | / #[suggestion(no_crate_example, code = "")]
LL | |
LL | | struct PrimarySpanOnVec {
LL | | #[primary_span]
... |
LL | | sub: Vec<Span>,
LL | | }
| |_^
LL | #[suggestion(no_crate_example, code = "")]
| ^
error[E0433]: failed to resolve: maybe a missing crate `core`?
--> $DIR/subdiagnostic-derive.rs:96:9