summaryrefslogtreecommitdiffstats
path: root/src/test/ui/proc-macro/expand-expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/proc-macro/expand-expr.rs')
-rw-r--r--src/test/ui/proc-macro/expand-expr.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/test/ui/proc-macro/expand-expr.rs b/src/test/ui/proc-macro/expand-expr.rs
index d1146d970..901b3a951 100644
--- a/src/test/ui/proc-macro/expand-expr.rs
+++ b/src/test/ui/proc-macro/expand-expr.rs
@@ -1,5 +1,5 @@
// aux-build:expand-expr.rs
-
+#![feature(concat_bytes)]
extern crate expand_expr;
use expand_expr::{
@@ -23,6 +23,11 @@ expand_expr_is!(
concat!("contents: ", include_str!("auxiliary/included-file.txt"))
);
+expand_expr_is!(
+ b"contents: Included file contents\n",
+ concat_bytes!(b"contents: ", include_bytes!("auxiliary/included-file.txt"))
+);
+
// Correct value is checked for multiple sources.
check_expand_expr_file!(file!());
@@ -118,4 +123,10 @@ expand_expr_fail!(echo_pm!(arbitrary_expression() + "etc"));
const _: u32 = recursive_expand!(); //~ ERROR: recursion limit reached while expanding `recursive_expand!`
-fn main() {}
+fn main() {
+ // https://github.com/rust-lang/rust/issues/104414
+ match b"Included file contents\n" {
+ include_bytes!("auxiliary/included-file.txt") => (),
+ _ => panic!("include_bytes! in pattern"),
+ }
+}