// aux-build:expand-expr.rs
-
+#![feature(concat_bytes)]
extern crate expand_expr;
use expand_expr::{
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!());
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"),
+ }
+}