rust/tests/ui/attributes/dump_def_parents.rs

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

35 lines
903 B
Rust
Raw Permalink Normal View History

//@ normalize-stderr-test: "DefId\(.+?\)" -> "DefId(..)"
2024-06-30 13:31:15 -05:00
#![feature(rustc_attrs)]
fn bar() {
fn foo() {
fn baz() {
#[rustc_dump_def_parents]
|| {
//~^ ERROR: rustc_dump_def_parents: DefId
qux::<
{
//~^ ERROR: rustc_dump_def_parents: DefId
fn inhibits_dump() {
qux::<
{
"hi";
1
},
>();
}
qux::<{ 1 + 1 }>();
//~^ ERROR: rustc_dump_def_parents: DefId
1
},
>();
};
}
}
}
const fn qux<const N: usize>() {}
fn main() {}