summaryrefslogtreecommitdiffstats
path: root/src/test/ui/proc-macro/auxiliary/call-site.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/proc-macro/auxiliary/call-site.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/proc-macro/auxiliary/call-site.rs')
-rw-r--r--src/test/ui/proc-macro/auxiliary/call-site.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/ui/proc-macro/auxiliary/call-site.rs b/src/test/ui/proc-macro/auxiliary/call-site.rs
deleted file mode 100644
index e64a5a343..000000000
--- a/src/test/ui/proc-macro/auxiliary/call-site.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn check(input: TokenStream) -> TokenStream {
- // Parsed `x2` can refer to `x2` from `input`
- let parsed1: TokenStream = "let x3 = x2;".parse().unwrap();
- // `x3` parsed from one string can refer to `x3` parsed from another string.
- let parsed2: TokenStream = "let x4 = x3;".parse().unwrap();
- // Manually assembled `x4` can refer to parsed `x4`.
- let manual: Vec<TokenTree> = vec![
- Ident::new("let", Span::call_site()).into(),
- Ident::new("x5", Span::call_site()).into(),
- Punct::new('=', Spacing::Alone).into(),
- Ident::new("x4", Span::call_site()).into(),
- Punct::new(';', Spacing::Alone).into(),
- ];
- input.into_iter().chain(parsed1.into_iter())
- .chain(parsed2.into_iter())
- .chain(manual.into_iter())
- .collect()
-}