about summary refs log tree commit diff
path: root/tests/ui/attributes/attr_unknown_custom_attr.rs
blob: cdbe48a636fca5294528468e6a79a1c27a434302 (plain)
1
2
3
4
5
6
7
8
9
10
11
//! Checks error handling for undefined custom attributes.

#![feature(stmt_expr_attributes)]

#[foo] //~ ERROR cannot find attribute `foo` in this scope
fn main() {
    #[foo] //~ ERROR cannot find attribute `foo` in this scope
    let x = ();
    #[foo] //~ ERROR cannot find attribute `foo` in this scope
    x
}