Skip to content

Commit f7123db

Browse files
Rollup merge of #114088 - oli-obk:syn, r=davidtwco
Bump syn dependency r? `@davidtwco` because this affects diagnostics derive diagnostics (yes this sentence is grammatically correct)
2 parents 1fa0c4d + ad83037 commit f7123db

File tree

6 files changed

+205
-199
lines changed

6 files changed

+205
-199
lines changed

Cargo.lock

+19-19
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ dependencies = [
220220
"proc-macro2",
221221
"quote",
222222
"serde",
223-
"syn 2.0.8",
223+
"syn 2.0.27",
224224
]
225225

226226
[[package]]
@@ -502,7 +502,7 @@ dependencies = [
502502
"heck",
503503
"proc-macro2",
504504
"quote",
505-
"syn 2.0.8",
505+
"syn 2.0.27",
506506
]
507507

508508
[[package]]
@@ -527,7 +527,7 @@ dependencies = [
527527
"regex",
528528
"rustc_tools_util",
529529
"serde",
530-
"syn 2.0.8",
530+
"syn 2.0.27",
531531
"tempfile",
532532
"termize",
533533
"tester",
@@ -842,7 +842,7 @@ version = "0.1.73"
842842
dependencies = [
843843
"itertools",
844844
"quote",
845-
"syn 2.0.8",
845+
"syn 2.0.27",
846846
]
847847

848848
[[package]]
@@ -943,7 +943,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
943943
dependencies = [
944944
"proc-macro2",
945945
"quote",
946-
"syn 2.0.8",
946+
"syn 2.0.27",
947947
]
948948

949949
[[package]]
@@ -1309,7 +1309,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
13091309
dependencies = [
13101310
"proc-macro2",
13111311
"quote",
1312-
"syn 2.0.8",
1312+
"syn 2.0.27",
13131313
]
13141314

13151315
[[package]]
@@ -2456,7 +2456,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
24562456
dependencies = [
24572457
"proc-macro2",
24582458
"quote",
2459-
"syn 2.0.8",
2459+
"syn 2.0.27",
24602460
]
24612461

24622462
[[package]]
@@ -2643,7 +2643,7 @@ dependencies = [
26432643
"pest_meta",
26442644
"proc-macro2",
26452645
"quote",
2646-
"syn 2.0.8",
2646+
"syn 2.0.27",
26472647
]
26482648

26492649
[[package]]
@@ -3586,7 +3586,7 @@ dependencies = [
35863586
"fluent-syntax",
35873587
"proc-macro2",
35883588
"quote",
3589-
"syn 2.0.8",
3589+
"syn 2.0.27",
35903590
"unic-langid",
35913591
]
35923592

@@ -3855,7 +3855,7 @@ version = "0.1.0"
38553855
dependencies = [
38563856
"proc-macro2",
38573857
"quote",
3858-
"syn 2.0.8",
3858+
"syn 2.0.27",
38593859
"synstructure 0.13.0",
38603860
]
38613861

@@ -4462,7 +4462,7 @@ dependencies = [
44624462
"proc-macro2",
44634463
"quote",
44644464
"serde",
4465-
"syn 2.0.8",
4465+
"syn 2.0.27",
44664466
]
44674467

44684468
[[package]]
@@ -4629,7 +4629,7 @@ checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
46294629
dependencies = [
46304630
"proc-macro2",
46314631
"quote",
4632-
"syn 2.0.8",
4632+
"syn 2.0.27",
46334633
]
46344634

46354635
[[package]]
@@ -4910,9 +4910,9 @@ dependencies = [
49104910

49114911
[[package]]
49124912
name = "syn"
4913-
version = "2.0.8"
4913+
version = "2.0.27"
49144914
source = "registry+https://github.com/rust-lang/crates.io-index"
4915-
checksum = "bcc02725fd69ab9f26eab07fad303e2497fad6fb9eba4f96c4d1687bdf704ad9"
4915+
checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0"
49164916
dependencies = [
49174917
"proc-macro2",
49184918
"quote",
@@ -4939,7 +4939,7 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06"
49394939
dependencies = [
49404940
"proc-macro2",
49414941
"quote",
4942-
"syn 2.0.8",
4942+
"syn 2.0.27",
49434943
"unicode-xid",
49444944
]
49454945

@@ -5089,7 +5089,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
50895089
dependencies = [
50905090
"proc-macro2",
50915091
"quote",
5092-
"syn 2.0.8",
5092+
"syn 2.0.27",
50935093
]
50945094

50955095
[[package]]
@@ -5310,7 +5310,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
53105310
dependencies = [
53115311
"proc-macro2",
53125312
"quote",
5313-
"syn 2.0.8",
5313+
"syn 2.0.27",
53145314
]
53155315

53165316
[[package]]
@@ -5740,7 +5740,7 @@ dependencies = [
57405740
"once_cell",
57415741
"proc-macro2",
57425742
"quote",
5743-
"syn 2.0.8",
5743+
"syn 2.0.27",
57445744
"wasm-bindgen-shared",
57455745
]
57465746

@@ -5774,7 +5774,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
57745774
dependencies = [
57755775
"proc-macro2",
57765776
"quote",
5777-
"syn 2.0.8",
5777+
"syn 2.0.27",
57785778
"wasm-bindgen-backend",
57795779
"wasm-bindgen-shared",
57805780
]

compiler/rustc_macros/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ proc-macro = true
88

99
[dependencies]
1010
synstructure = "0.13.0"
11-
# FIXME(Nilstrieb): Updating this causes changes in the diagnostics output.
12-
syn = { version = "=2.0.8", features = ["full"] }
11+
syn = { version = "2.0.9", features = ["full"] }
1312
proc-macro2 = "1"
1413
quote = "1"

tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ enum DiagnosticOnEnum {
5353
#[derive(Diagnostic)]
5454
#[diag(no_crate_example, code = "E0123")]
5555
#[diag = "E0123"]
56-
//~^ ERROR expected parentheses: #[diag(...)]
56+
//~^ ERROR failed to resolve: maybe a missing crate `core`
5757
struct WrongStructAttrStyle {}
5858

5959
#[derive(Diagnostic)]
@@ -644,7 +644,7 @@ struct MissingCodeInSuggestion {
644644
//~| ERROR cannot find attribute `multipart_suggestion` in this scope
645645
#[multipart_suggestion()]
646646
//~^ ERROR cannot find attribute `multipart_suggestion` in this scope
647-
//~| ERROR unexpected end of input, unexpected token in nested attribute, expected ident
647+
//~| ERROR `#[multipart_suggestion(...)]` is not a valid attribute
648648
struct MultipartSuggestion {
649649
#[multipart_suggestion(no_crate_suggestion)]
650650
//~^ ERROR `#[multipart_suggestion(...)]` is not a valid attribute
@@ -797,15 +797,15 @@ struct SuggestionsNoItem {
797797
struct SuggestionsInvalidItem {
798798
#[suggestion(code(foo))]
799799
//~^ ERROR `code(...)` must contain only string literals
800-
//~| ERROR unexpected token
800+
//~| ERROR failed to resolve: maybe a missing crate `core`
801801
sub: Span,
802802
}
803803

804804
#[derive(Diagnostic)] //~ ERROR cannot find value `__code_34` in this scope
805805
#[diag(no_crate_example)]
806806
struct SuggestionsInvalidLiteral {
807807
#[suggestion(code = 3)]
808-
//~^ ERROR expected string literal
808+
//~^ ERROR failed to resolve: maybe a missing crate `core`
809809
sub: Span,
810810
}
811811

tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr

+27-25
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ LL | Bar,
2020
|
2121
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
2222

23-
error: expected parentheses: #[diag(...)]
24-
--> $DIR/diagnostic-derive.rs:55:8
25-
|
26-
LL | #[diag = "E0123"]
27-
| ^
28-
2923
error: `#[nonsense(...)]` is not a valid attribute
3024
--> $DIR/diagnostic-derive.rs:60:1
3125
|
@@ -476,6 +470,14 @@ LL | #[multipart_suggestion(no_crate_suggestion)]
476470
|
477471
= help: consider creating a `Subdiagnostic` instead
478472

473+
error: `#[multipart_suggestion(...)]` is not a valid attribute
474+
--> $DIR/diagnostic-derive.rs:645:1
475+
|
476+
LL | #[multipart_suggestion()]
477+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
478+
|
479+
= help: consider creating a `Subdiagnostic` instead
480+
479481
error: `#[multipart_suggestion(...)]` is not a valid attribute
480482
--> $DIR/diagnostic-derive.rs:649:5
481483
|
@@ -484,12 +486,6 @@ LL | #[multipart_suggestion(no_crate_suggestion)]
484486
|
485487
= help: consider creating a `Subdiagnostic` instead
486488

487-
error: unexpected end of input, unexpected token in nested attribute, expected ident
488-
--> $DIR/diagnostic-derive.rs:645:24
489-
|
490-
LL | #[multipart_suggestion()]
491-
| ^
492-
493489
error: `#[suggestion(...)]` is not a valid attribute
494490
--> $DIR/diagnostic-derive.rs:657:1
495491
|
@@ -550,18 +546,6 @@ error: `code(...)` must contain only string literals
550546
LL | #[suggestion(code(foo))]
551547
| ^^^
552548

553-
error: unexpected token
554-
--> $DIR/diagnostic-derive.rs:798:23
555-
|
556-
LL | #[suggestion(code(foo))]
557-
| ^^^
558-
559-
error: expected string literal
560-
--> $DIR/diagnostic-derive.rs:807:25
561-
|
562-
LL | #[suggestion(code = 3)]
563-
| ^
564-
565549
error: `#[suggestion(...)]` is not a valid attribute
566550
--> $DIR/diagnostic-derive.rs:822:5
567551
|
@@ -572,6 +556,24 @@ LL | #[suggestion(no_crate_suggestion, code = "")]
572556
= help: to show a suggestion consisting of multiple parts, use a `Subdiagnostic` annotated with `#[multipart_suggestion(...)]`
573557
= help: to show a variable set of suggestions, use a `Vec` of `Subdiagnostic`s annotated with `#[suggestion(...)]`
574558

559+
error[E0433]: failed to resolve: maybe a missing crate `core`?
560+
--> $DIR/diagnostic-derive.rs:55:8
561+
|
562+
LL | #[diag = "E0123"]
563+
| ^ maybe a missing crate `core`?
564+
565+
error[E0433]: failed to resolve: maybe a missing crate `core`?
566+
--> $DIR/diagnostic-derive.rs:798:23
567+
|
568+
LL | #[suggestion(code(foo))]
569+
| ^^^ maybe a missing crate `core`?
570+
571+
error[E0433]: failed to resolve: maybe a missing crate `core`?
572+
--> $DIR/diagnostic-derive.rs:807:25
573+
|
574+
LL | #[suggestion(code = 3)]
575+
| ^ maybe a missing crate `core`?
576+
575577
error: cannot find attribute `nonsense` in this scope
576578
--> $DIR/diagnostic-derive.rs:60:3
577579
|
@@ -656,5 +658,5 @@ note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
656658

657659
error: aborting due to 84 previous errors
658660

659-
Some errors have detailed explanations: E0277, E0425.
661+
Some errors have detailed explanations: E0277, E0425, E0433.
660662
For more information about an error, try `rustc --explain E0277`.

0 commit comments

Comments
 (0)