rust/tests/ui/deprecation/issue-66340-deprecated-attr-non-meta-grammar.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
339 B
Rust
Raw Normal View History

// The original problem in #66340 was that `find_deprecation_generic`
// called `attr.meta().unwrap()` under the assumption that the attribute
// was a well-formed `MetaItem`.
fn main() {
2025-02-09 21:50:01 +00:00
foo() //~ WARNING use of deprecated function `foo`
}
#[deprecated(note = test)]
//~^ ERROR expected unsuffixed literal, found `test`
fn foo() {}