Upgrade rust/crates/paste to 0.1.14
Test: None
Change-Id: Id1de01679386f2e34f8d9f276a866bb436a2d1cf
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 326754d..1347e27 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "ff47f2f0bbba62fcb2f892f5c488265b3bd7156f"
+ "sha1": "157559c3faf524ae24f8329537d2a763f6e18931"
}
}
diff --git a/Cargo.toml b/Cargo.toml
index 3b7b5ad..12ad9f0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
[package]
edition = "2018"
name = "paste"
-version = "0.1.12"
+version = "0.1.14"
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.12"
+version = "=0.1.14"
[dependencies.proc-macro-hack]
version = "0.5.9"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index a790489..2d4833f 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "paste"
-version = "0.1.12"
+version = "0.1.14"
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.12", path = "impl" }
+paste-impl = { version = "=0.1.14", path = "impl" }
proc-macro-hack = "0.5.9"
[dev-dependencies]
diff --git a/METADATA b/METADATA
index 87c29a4..39fea39 100644
--- a/METADATA
+++ b/METADATA
@@ -9,11 +9,11 @@
type: GIT
value: "https://github.com/dtolnay/paste"
}
- version: "0.1.12"
+ version: "0.1.14"
license_type: NOTICE
last_upgrade_date {
year: 2020
month: 5
- day: 4
+ day: 25
}
}
diff --git a/README.md b/README.md
index 8ccc568..28fcafb 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
Macros for all your token pasting needs
=======================================
-[](https://travis-ci.org/dtolnay/paste)
+[](https://github.com/dtolnay/paste/actions?query=branch%3Amaster)
[](https://crates.io/crates/paste)
[](https://docs.rs/paste)
diff --git a/tests/test.rs b/tests/test.rs
index 3aecd8d..8e6ea75 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -305,3 +305,62 @@
let _ = LIBPaste;
}
}
+
+mod test_doc_expr {
+ // https://github.com/dtolnay/paste/issues/29
+
+ macro_rules! doc_expr {
+ ($doc:expr) => {
+ paste::item! {
+ #[doc = $doc]
+ pub struct S;
+ }
+ };
+ }
+
+ doc_expr!(stringify!());
+
+ #[test]
+ fn test_doc_expr() {
+ let _: S;
+ }
+}
+
+mod test_type_in_path {
+ // https://github.com/dtolnay/paste/issues/31
+
+ mod keys {
+ #[derive(Default)]
+ pub struct Mib<T = ()>(std::marker::PhantomData<T>);
+ }
+
+ macro_rules! types {
+ ($mib:ty) => {
+ paste::item! {
+ #[derive(Default)]
+ pub struct S(pub keys::$mib);
+ }
+ };
+ }
+
+ macro_rules! write {
+ ($fn:ident, $field:ty) => {
+ paste::item! {
+ pub fn $fn() -> $field {
+ $field::default()
+ }
+ }
+ };
+ }
+
+ types! {Mib<[usize; 2]>}
+ write! {get_a, keys::Mib}
+ write! {get_b, usize}
+
+ #[test]
+ fn test_type_in_path() {
+ let _: S;
+ let _ = get_a;
+ let _ = get_b;
+ }
+}