Files
rust/tests/ui/attributes/attr_unknown_custom_attr.rs

12 lines
316 B
Rust
Raw Normal View History

2025-06-07 16:17:21 +05:00
//! 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
}