Auto merge of #138416 - Manishearth:rollup-fejor9p, r=Manishearth
Rollup of 12 pull requests Successful merges: - #134076 (Stabilize `std::io::ErrorKind::InvalidFilename`) - #137504 (Move methods from Map to TyCtxt, part 4.) - #138175 (Support rmeta inputs for --crate-type=bin --emit=obj) - #138259 (Disentangle `ForwardGenericParamBan` and `ConstParamTy` ribs) - #138280 (fix ICE in pretty-printing `global_asm!`) - #138318 (Rustdoc: remove a bunch of `@ts-expect-error` from main.js) - #138331 (Use `RUSTC_LINT_FLAGS` more) - #138357 (merge `TypeChecker` and `TypeVerifier`) - #138394 (remove unnecessary variant) - #138403 (Delegation: one more ICE fix for `MethodCall` generation) - #138407 (Delegation: reject C-variadics) - #138409 (Use sa_sigaction instead of sa_union.__su_sigaction for AIX) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
8536f201ff
177 changed files with 1488 additions and 1448 deletions
|
@ -21,7 +21,7 @@ pub(crate) fn provide(providers: &mut Providers) {
|
|||
}
|
||||
|
||||
fn associated_item_def_ids(tcx: TyCtxt<'_>, def_id: LocalDefId) -> &[DefId] {
|
||||
let item = tcx.hir().expect_item(def_id);
|
||||
let item = tcx.hir_expect_item(def_id);
|
||||
match item.kind {
|
||||
hir::ItemKind::Trait(.., trait_item_refs) => {
|
||||
// We collect RPITITs for each trait method's return type and create a
|
||||
|
@ -96,7 +96,7 @@ fn impl_item_implementor_ids(tcx: TyCtxt<'_>, impl_id: DefId) -> DefIdMap<DefId>
|
|||
fn associated_item(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::AssocItem {
|
||||
let id = tcx.local_def_id_to_hir_id(def_id);
|
||||
let parent_def_id = tcx.hir_get_parent_item(id);
|
||||
let parent_item = tcx.hir().expect_item(parent_def_id.def_id);
|
||||
let parent_item = tcx.hir_expect_item(parent_def_id.def_id);
|
||||
match parent_item.kind {
|
||||
hir::ItemKind::Impl(impl_) => {
|
||||
if let Some(impl_item_ref) = impl_.items.iter().find(|i| i.id.owner_id.def_id == def_id)
|
||||
|
@ -201,7 +201,7 @@ fn associated_types_for_impl_traits_in_associated_fn(
|
|||
|
||||
let mut visitor = RPITVisitor { rpits: FxIndexSet::default() };
|
||||
|
||||
if let Some(output) = tcx.hir().get_fn_output(fn_def_id) {
|
||||
if let Some(output) = tcx.hir_get_fn_output(fn_def_id) {
|
||||
visitor.visit_fn_ret_ty(output);
|
||||
|
||||
tcx.arena.alloc_from_iter(visitor.rpits.iter().map(|opaque_ty_def_id| {
|
||||
|
|
|
@ -161,7 +161,7 @@ fn fn_sig_spans(tcx: TyCtxt<'_>, def_id: LocalDefId) -> impl Iterator<Item = Spa
|
|||
}
|
||||
|
||||
fn impl_spans(tcx: TyCtxt<'_>, def_id: LocalDefId) -> impl Iterator<Item = Span> {
|
||||
let item = tcx.hir().expect_item(def_id);
|
||||
let item = tcx.hir_expect_item(def_id);
|
||||
if let hir::ItemKind::Impl(impl_) = item.kind {
|
||||
let trait_args = impl_
|
||||
.of_trait
|
||||
|
|
|
@ -107,11 +107,9 @@ fn resolve_associated_item<'tcx>(
|
|||
let input = typing_env.as_query_input(trait_ref);
|
||||
let vtbl = match tcx.codegen_select_candidate(input) {
|
||||
Ok(vtbl) => vtbl,
|
||||
Err(
|
||||
CodegenObligationError::Ambiguity
|
||||
| CodegenObligationError::Unimplemented
|
||||
| CodegenObligationError::FulfillmentError,
|
||||
) => return Ok(None),
|
||||
Err(CodegenObligationError::Ambiguity | CodegenObligationError::Unimplemented) => {
|
||||
return Ok(None);
|
||||
}
|
||||
Err(CodegenObligationError::UnconstrainedParam(guar)) => return Err(guar),
|
||||
};
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ impl<'tcx> OpaqueTypeCollector<'tcx> {
|
|||
if !hir_id.is_owner() {
|
||||
return;
|
||||
}
|
||||
let Some(defines) = self.tcx.hir_attrs(hir_id.owner).define_opaque else {
|
||||
let Some(defines) = self.tcx.hir_attr_map(hir_id.owner).define_opaque else {
|
||||
return;
|
||||
};
|
||||
for &(span, define) in defines {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue