| { | ||
| "git": { | ||
| "sha1": "1b3689d1510ee3cfbb3e9b2688f224fb12528682" | ||
| "sha1": "2839b84393cada03d60c849bd48ba99c5e8f01f9" | ||
| }, | ||
| "path_in_vcs": "" | ||
| } |
+1
-1
@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "paste" | ||
| version = "1.0.8" | ||
| version = "1.0.9" | ||
| authors = ["David Tolnay <dtolnay@gmail.com>"] | ||
@@ -19,0 +19,0 @@ description = "Macros for all your token pasting needs" |
+12
-2
@@ -167,4 +167,14 @@ //! [![github]](https://github.com/dtolnay/paste) [![crates-io]](https://crates.io/crates/paste) [![docs-rs]](https://docs.rs/paste) | ||
| let flatten_single_interpolation = true; | ||
| match expand(input, &mut contains_paste, flatten_single_interpolation) { | ||
| Ok(expanded) => expanded, | ||
| match expand( | ||
| input.clone(), | ||
| &mut contains_paste, | ||
| flatten_single_interpolation, | ||
| ) { | ||
| Ok(expanded) => { | ||
| if contains_paste { | ||
| expanded | ||
| } else { | ||
| input | ||
| } | ||
| } | ||
| Err(err) => err.to_compile_error(), | ||
@@ -171,0 +181,0 @@ } |
+23
-0
@@ -250,1 +250,24 @@ use paste::paste; | ||
| } | ||
| // https://github.com/dtolnay/paste/issues/85 | ||
| #[test] | ||
| fn test_top_level_none_delimiter() { | ||
| macro_rules! clone { | ||
| ($val:expr) => { | ||
| paste! { | ||
| $val.clone() | ||
| } | ||
| }; | ||
| } | ||
| #[derive(Clone)] | ||
| struct A; | ||
| impl A { | ||
| fn consume_self(self) { | ||
| let _ = self; | ||
| } | ||
| } | ||
| clone!(&A).consume_self(); | ||
| } |
Sorry, the diff of this file is not supported yet