Merge "Upgrade rust/crates/paste to 0.1.15" am: 29fdf7c1d3 am: ccbc359a43 am: 9caf1d655b
Original change: undetermined
Change-Id: I619d51cc01e814ef3dbfaa4fabe9b511328b0f90
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 1347e27..40fcd29 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "157559c3faf524ae24f8329537d2a763f6e18931"
+ "sha1": "b5ce9a40b201ffe985e13260f6b0fa9ef5330fd7"
}
}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4d4b341..b4476e1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,13 +12,18 @@
strategy:
fail-fast: false
matrix:
- rust: [nightly, beta, stable, 1.31.0]
+ rust: [nightly, beta, stable, 1.32.0]
+ include:
+ - rust: 1.31.0
+ rustflags: --cfg no_literal_matcher
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cargo test
+ env:
+ RUSTFLAGS: ${{matrix.rustflags}}
minimal:
name: Minimal versions
diff --git a/Cargo.toml b/Cargo.toml
index 12ad9f0..0e2b6da 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
[package]
edition = "2018"
name = "paste"
-version = "0.1.14"
+version = "0.1.15"
authors = ["David Tolnay <dtolnay@gmail.com>"]
description = "Macros for all your token pasting needs"
readme = "README.md"
@@ -22,7 +22,7 @@
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies.paste-impl]
-version = "=0.1.14"
+version = "=0.1.15"
[dependencies.proc-macro-hack]
version = "0.5.9"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 2d4833f..28c943d 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "paste"
-version = "0.1.14"
+version = "0.1.15"
authors = ["David Tolnay <dtolnay@gmail.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
@@ -9,7 +9,7 @@
readme = "README.md"
[dependencies]
-paste-impl = { version = "=0.1.14", path = "impl" }
+paste-impl = { version = "=0.1.15", path = "impl" }
proc-macro-hack = "0.5.9"
[dev-dependencies]
diff --git a/METADATA b/METADATA
index 39fea39..2567ac7 100644
--- a/METADATA
+++ b/METADATA
@@ -9,11 +9,11 @@
type: GIT
value: "https://github.com/dtolnay/paste"
}
- version: "0.1.14"
+ version: "0.1.15"
license_type: NOTICE
last_upgrade_date {
year: 2020
month: 5
- day: 25
+ day: 29
}
}
diff --git a/tests/test.rs b/tests/test.rs
index 8e6ea75..0a7cc76 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -364,3 +364,38 @@
let _ = get_b;
}
}
+
+mod test_pat_in_expr_position {
+ // https://github.com/xiph/rav1e/pull/2324/files
+
+ macro_rules! rav1e_bad {
+ ($e:pat) => {
+ paste::item! {
+ #[test]
+ fn test() {
+ let _ = $e;
+ }
+ }
+ };
+ }
+
+ rav1e_bad!(std::fmt::Error);
+}
+
+#[cfg(not(no_literal_matcher))]
+mod test_x86_feature_literal {
+ // work around https://github.com/rust-lang/rust/issues/72726
+
+ macro_rules! my_is_x86_feature_detected {
+ ($feat:literal) => {
+ paste::item! {
+ #[test]
+ fn test() {
+ let _ = is_x86_feature_detected!($feat);
+ }
+ }
+ };
+ }
+
+ my_is_x86_feature_detected!("mmx");
+}