rust/tests/ui/did_you_mean/issue-93210-ignore-doc-hidden.rs
2023-01-11 09:32:08 +00:00

25 lines
461 B
Rust

#[derive(Default)]
pub struct A {
#[doc(hidden)]
pub hello: i32,
pub bye: i32,
}
#[derive(Default)]
pub struct B {
pub hello: i32,
pub bye: i32,
}
fn main() {
A::default().hey;
//~^ ERROR no field `hey` on type `A`
//~| NOTE unknown field
//~| NOTE available fields are: `bye`
B::default().hey;
//~^ ERROR no field `hey` on type `B`
//~| NOTE unknown field
//~| NOTE available fields are: `hello`, `bye`
}