Skip to content

Commit 2357dd4

Browse files
committed
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
2 parents 249cb84 + c756251 commit 2357dd4

File tree

177 files changed

+1936
-1896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+1936
-1896
lines changed

compiler/rustc_ast_lowering/src/delegation.rs

+1
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
330330
.unwrap_or_default()
331331
&& delegation.qself.is_none()
332332
&& !has_generic_args
333+
&& !args.is_empty()
333334
{
334335
let ast_segment = delegation.path.segments.last().unwrap();
335336
let segment = self.lower_path_segment(

compiler/rustc_borrowck/src/diagnostics/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
505505
let var_id =
506506
self.infcx.tcx.closure_captures(def_id)[field.index()].get_root_variable();
507507

508-
Some(self.infcx.tcx.hir().name(var_id).to_string())
508+
Some(self.infcx.tcx.hir_name(var_id).to_string())
509509
}
510510
_ => {
511511
// Might need a revision when the fields in trait RFC is implemented
@@ -1124,7 +1124,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
11241124
def_id, target_place, places
11251125
);
11261126
let hir_id = self.infcx.tcx.local_def_id_to_hir_id(def_id);
1127-
let expr = &self.infcx.tcx.hir().expect_expr(hir_id).kind;
1127+
let expr = &self.infcx.tcx.hir_expect_expr(hir_id).kind;
11281128
debug!("closure_span: hir_id={:?} expr={:?}", hir_id, expr);
11291129
if let &hir::ExprKind::Closure(&hir::Closure { kind, fn_decl_span, .. }) = expr {
11301130
for (captured_place, place) in

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
698698
if !matches!(k, hir::AssocItemKind::Fn { .. }) {
699699
continue;
700700
}
701-
if self.infcx.tcx.hir().name(hi) != self.infcx.tcx.hir().name(my_hir) {
701+
if self.infcx.tcx.hir_name(hi) != self.infcx.tcx.hir_name(my_hir) {
702702
continue;
703703
}
704704
f_in_trait_opt = Some(hi);

compiler/rustc_borrowck/src/diagnostics/opaque_suggestions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
105105

106106
if let Some(opaque_def_id) = opaque_def_id.as_local()
107107
&& let hir::OpaqueTyOrigin::FnReturn { parent, .. } =
108-
tcx.hir().expect_opaque_ty(opaque_def_id).origin
108+
tcx.hir_expect_opaque_ty(opaque_def_id).origin
109109
{
110110
if let Some(sugg) = impl_trait_overcapture_suggestion(
111111
tcx,

compiler/rustc_borrowck/src/diagnostics/region_name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
343343
}
344344
};
345345
let hir::ExprKind::Closure(&hir::Closure { fn_decl_span, .. }) =
346-
tcx.hir().expect_expr(self.mir_hir_id()).kind
346+
tcx.hir_expect_expr(self.mir_hir_id()).kind
347347
else {
348348
bug!("Closure is not defined by a closure expr");
349349
};

compiler/rustc_borrowck/src/diagnostics/var_name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
6969
let upvar_hir_id = upvars[upvar_index].get_root_variable();
7070
debug!("get_upvar_name_and_span_for_region: upvar_hir_id={upvar_hir_id:?}");
7171

72-
let upvar_name = tcx.hir().name(upvar_hir_id);
72+
let upvar_name = tcx.hir_name(upvar_hir_id);
7373
let upvar_span = tcx.hir().span(upvar_hir_id);
7474
debug!(
7575
"get_upvar_name_and_span_for_region: upvar_name={upvar_name:?} upvar_span={upvar_span:?}",

0 commit comments

Comments
 (0)