Skip to content

Commit

Permalink
Update to syn 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 30, 2023
1 parent ba5811c commit d762ee2
Show file tree
Hide file tree
Showing 9 changed files with 350 additions and 167 deletions.
1 change: 0 additions & 1 deletion .deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ multiple-versions = "warn"
wildcards = "allow" # https://github.com/EmbarkStudios/cargo-deny/issues/488
build.allow-build-scripts = [
{ name = "proc-macro2" },
{ name = "syn" }, # TODO: update to 2.0
]

# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
Expand Down
1 change: 1 addition & 0 deletions .github/.cspell/project-dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
asyncness
constness
elems
qself
SUBPATTERN
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ clone-impls = ["syn/clone-impls"]
[dependencies]
proc-macro2 = { version = "1.0.60", default-features = false }
quote = { version = "1", default-features = false }
syn = { version = "1.0.44", default-features = false, features = ["parsing", "printing", "derive"] }
syn = { version = "2", default-features = false, features = ["parsing", "printing", "derive"] }
2 changes: 1 addition & 1 deletion examples/const_fn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ proc-macro = true
[dependencies]
proc-macro2 = "1"
quote = "1"
syn = "1"
syn = "2"
syn-mid = { path = "../..", features = ["clone-impls"] }
10 changes: 10 additions & 0 deletions examples/const_fn/tests/test.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use const_fn::const_fn;

#[const_fn(any())]
pub const fn a() {}
#[const_fn(not(any()))]
const fn b() {}

pub static _B: () = b();
Loading

0 comments on commit d762ee2

Please sign in to comment.