Lowering field access for anonymous adts

This commit is contained in:
Frank King 2024-01-04 21:45:06 +08:00
parent 36d7e7fd3f
commit 0c0df4efe0
18 changed files with 391 additions and 71 deletions

View file

@ -2217,6 +2217,10 @@ rustc_queries! {
desc { "whether the item should be made inlinable across crates" }
separate_provide_extern
}
query find_field((def_id, ident): (DefId, rustc_span::symbol::Ident)) -> Option<rustc_target::abi::FieldIdx> {
desc { |tcx| "find the index of maybe nested field `{ident}` in `{}`", tcx.def_path_str(def_id) }
}
}
rustc_query_append! { define_callbacks! }