1
Fork 0

Auto merge of #127718 - cjgillot:find_field, r=compiler-errors

find_field does not need to be a query.

The current implementation is quadratic in the number of nested fields.

r? `@davidtwco` as you reviewed https://github.com/rust-lang/rust/pull/115367
Fixes https://github.com/rust-lang/rust/issues/121755
This commit is contained in:
bors 2024-07-14 23:35:45 +00:00
commit 8b72d7a9d7
4 changed files with 73 additions and 55 deletions

View file

@ -2280,10 +2280,6 @@ 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! }