rust/tests/ui/attributes/attr_unknown_custom_attr.rs
2025-06-08 11:25:09 +05:00

12 lines
316 B
Rust

//! 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
}