Skip to content

Commit

Permalink
Rollup merge of #114088 - oli-obk:syn, r=davidtwco
Browse files Browse the repository at this point in the history
Bump syn dependency

r? `@davidtwco` because this affects diagnostics derive diagnostics (yes this sentence is grammatically correct)
  • Loading branch information
GuillaumeGomez authored Jul 27, 2023
2 parents 1fa0c4d + ad83037 commit f7123db
Show file tree
Hide file tree
Showing 6 changed files with 205 additions and 199 deletions.
38 changes: 19 additions & 19 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -502,7 +502,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand All @@ -527,7 +527,7 @@ dependencies = [
"regex",
"rustc_tools_util",
"serde",
"syn 2.0.8",
"syn 2.0.27",
"tempfile",
"termize",
"tester",
Expand Down Expand Up @@ -842,7 +842,7 @@ version = "0.1.73"
dependencies = [
"itertools",
"quote",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -943,7 +943,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -1309,7 +1309,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -2456,7 +2456,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -2643,7 +2643,7 @@ dependencies = [
"pest_meta",
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -3586,7 +3586,7 @@ dependencies = [
"fluent-syntax",
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
"unic-langid",
]

Expand Down Expand Up @@ -3855,7 +3855,7 @@ version = "0.1.0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
"synstructure 0.13.0",
]

Expand Down Expand Up @@ -4462,7 +4462,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -4629,7 +4629,7 @@ checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -4910,9 +4910,9 @@ dependencies = [

[[package]]
name = "syn"
version = "2.0.8"
version = "2.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcc02725fd69ab9f26eab07fad303e2497fad6fb9eba4f96c4d1687bdf704ad9"
checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -4939,7 +4939,7 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
"unicode-xid",
]

Expand Down Expand Up @@ -5089,7 +5089,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -5310,7 +5310,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
]

[[package]]
Expand Down Expand Up @@ -5740,7 +5740,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
"wasm-bindgen-shared",
]

Expand Down Expand Up @@ -5774,7 +5774,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.8",
"syn 2.0.27",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ proc-macro = true

[dependencies]
synstructure = "0.13.0"
# FIXME(Nilstrieb): Updating this causes changes in the diagnostics output.
syn = { version = "=2.0.8", features = ["full"] }
syn = { version = "2.0.9", features = ["full"] }
proc-macro2 = "1"
quote = "1"
8 changes: 4 additions & 4 deletions tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum DiagnosticOnEnum {
#[derive(Diagnostic)]
#[diag(no_crate_example, code = "E0123")]
#[diag = "E0123"]
//~^ ERROR expected parentheses: #[diag(...)]
//~^ ERROR failed to resolve: maybe a missing crate `core`
struct WrongStructAttrStyle {}

#[derive(Diagnostic)]
Expand Down Expand Up @@ -644,7 +644,7 @@ struct MissingCodeInSuggestion {
//~| ERROR cannot find attribute `multipart_suggestion` in this scope
#[multipart_suggestion()]
//~^ ERROR cannot find attribute `multipart_suggestion` in this scope
//~| ERROR unexpected end of input, unexpected token in nested attribute, expected ident
//~| ERROR `#[multipart_suggestion(...)]` is not a valid attribute
struct MultipartSuggestion {
#[multipart_suggestion(no_crate_suggestion)]
//~^ ERROR `#[multipart_suggestion(...)]` is not a valid attribute
Expand Down Expand Up @@ -797,15 +797,15 @@ struct SuggestionsNoItem {
struct SuggestionsInvalidItem {
#[suggestion(code(foo))]
//~^ ERROR `code(...)` must contain only string literals
//~| ERROR unexpected token
//~| ERROR failed to resolve: maybe a missing crate `core`
sub: Span,
}

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

Expand Down
52 changes: 27 additions & 25 deletions tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ LL | Bar,
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`

error: expected parentheses: #[diag(...)]
--> $DIR/diagnostic-derive.rs:55:8
|
LL | #[diag = "E0123"]
| ^

error: `#[nonsense(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:60:1
|
Expand Down Expand Up @@ -476,6 +470,14 @@ LL | #[multipart_suggestion(no_crate_suggestion)]
|
= help: consider creating a `Subdiagnostic` instead

error: `#[multipart_suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:645:1
|
LL | #[multipart_suggestion()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider creating a `Subdiagnostic` instead

error: `#[multipart_suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:649:5
|
Expand All @@ -484,12 +486,6 @@ LL | #[multipart_suggestion(no_crate_suggestion)]
|
= help: consider creating a `Subdiagnostic` instead

error: unexpected end of input, unexpected token in nested attribute, expected ident
--> $DIR/diagnostic-derive.rs:645:24
|
LL | #[multipart_suggestion()]
| ^

error: `#[suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:657:1
|
Expand Down Expand Up @@ -550,18 +546,6 @@ error: `code(...)` must contain only string literals
LL | #[suggestion(code(foo))]
| ^^^

error: unexpected token
--> $DIR/diagnostic-derive.rs:798:23
|
LL | #[suggestion(code(foo))]
| ^^^

error: expected string literal
--> $DIR/diagnostic-derive.rs:807:25
|
LL | #[suggestion(code = 3)]
| ^

error: `#[suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:822:5
|
Expand All @@ -572,6 +556,24 @@ LL | #[suggestion(no_crate_suggestion, code = "")]
= help: to show a suggestion consisting of multiple parts, use a `Subdiagnostic` annotated with `#[multipart_suggestion(...)]`
= help: to show a variable set of suggestions, use a `Vec` of `Subdiagnostic`s annotated with `#[suggestion(...)]`

error[E0433]: failed to resolve: maybe a missing crate `core`?
--> $DIR/diagnostic-derive.rs:55:8
|
LL | #[diag = "E0123"]
| ^ maybe a missing crate `core`?

error[E0433]: failed to resolve: maybe a missing crate `core`?
--> $DIR/diagnostic-derive.rs:798:23
|
LL | #[suggestion(code(foo))]
| ^^^ maybe a missing crate `core`?

error[E0433]: failed to resolve: maybe a missing crate `core`?
--> $DIR/diagnostic-derive.rs:807:25
|
LL | #[suggestion(code = 3)]
| ^ maybe a missing crate `core`?

error: cannot find attribute `nonsense` in this scope
--> $DIR/diagnostic-derive.rs:60:3
|
Expand Down Expand Up @@ -656,5 +658,5 @@ note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`

error: aborting due to 84 previous errors

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

0 comments on commit f7123db

Please sign in to comment.