about summary refs log tree commit diff
path: root/tests/ui/frontmatter/frontmatter-whitespace-2.rs
blob: 7a28e5c1b85a64e2dc4e6ff04c9ea586dd1ecad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---cargo
//~^ ERROR: unclosed frontmatter

//@ compile-flags: --crate-type lib

#![feature(frontmatter)]

fn foo(x: i32) -> i32 {
    ---x
     //~^ WARNING: use of a double negation [double_negations]
}

// this test is for the weird case that valid Rust code can have three dashes
// within them and get treated as a frontmatter close.