Files
rust/tests/ui/frontmatter/frontmatter-whitespace-2.rs
2025-05-05 23:10:08 +08:00

16 lines
428 B
Rust

---cargo
//@ compile-flags: --crate-type lib
#![feature(frontmatter)]
fn foo(x: i32) -> i32 {
---x
//~^ ERROR: invalid preceding whitespace for frontmatter close
//~| ERROR: extra characters after frontmatter close are not allowed
}
//~^ ERROR: unexpected closing delimiter: `}`
// this test is for the weird case that valid Rust code can have three dashes
// within them and get treated as a frontmatter close.