]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/macros-nonfatal-errors.rs
Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrum
[rust.git] / src / test / ui / macros / macros-nonfatal-errors.rs
1 // normalize-stderr-test: "existed:.*\(" -> "existed: $$FILE_NOT_FOUND_MSG ("
2
3 // test that errors in a (selection) of macros don't kill compilation
4 // immediately, so that we get more errors listed at a time.
5
6 #![feature(asm, llvm_asm)]
7 #![feature(trace_macros, concat_idents)]
8
9 #[derive(Default)] //~ ERROR
10 enum OrDeriveThis {}
11
12 fn main() {
13     asm!(invalid); //~ ERROR
14     llvm_asm!(invalid); //~ ERROR
15
16     concat_idents!("not", "idents"); //~ ERROR
17
18     option_env!(invalid); //~ ERROR
19     env!(invalid); //~ ERROR
20     env!(foo, abr, baz); //~ ERROR
21     env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST"); //~ ERROR
22
23     format!(invalid); //~ ERROR
24
25     include!(invalid); //~ ERROR
26
27     include_str!(invalid); //~ ERROR
28     include_str!("i'd be quite surprised if a file with this name existed"); //~ ERROR
29     include_bytes!(invalid); //~ ERROR
30     include_bytes!("i'd be quite surprised if a file with this name existed"); //~ ERROR
31
32     trace_macros!(invalid); //~ ERROR
33 }