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
|
@ -485,7 +485,7 @@ fn construct_fn<'tcx>(
|
|||
};
|
||||
|
||||
if let Some(custom_mir_attr) =
|
||||
tcx.hir().attrs(fn_id).iter().find(|attr| attr.name_or_empty() == sym::custom_mir)
|
||||
tcx.hir_attrs(fn_id).iter().find(|attr| attr.name_or_empty() == sym::custom_mir)
|
||||
{
|
||||
return custom::build_custom_mir(
|
||||
tcx,
|
||||
|
@ -741,7 +741,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
coroutine: Option<Box<CoroutineInfo<'tcx>>>,
|
||||
) -> Builder<'a, 'tcx> {
|
||||
let tcx = infcx.tcx;
|
||||
let attrs = tcx.hir().attrs(hir_id);
|
||||
let attrs = tcx.hir_attrs(hir_id);
|
||||
// Some functions always have overflow checks enabled,
|
||||
// however, they may not get codegen'd, depending on
|
||||
// the settings for the crate they are codegened in.
|
||||
|
|
|
@ -942,14 +942,13 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
assert_eq!(orig_id.owner, self.hir_id.owner);
|
||||
|
||||
let mut id = orig_id;
|
||||
let hir = self.tcx.hir();
|
||||
loop {
|
||||
if id == self.hir_id {
|
||||
// This is a moderately common case, mostly hit for previously unseen nodes.
|
||||
break;
|
||||
}
|
||||
|
||||
if hir.attrs(id).iter().any(|attr| Level::from_attr(attr).is_some()) {
|
||||
if self.tcx.hir_attrs(id).iter().any(|attr| Level::from_attr(attr).is_some()) {
|
||||
// This is a rare case. It's for a node path that doesn't reach the root due to an
|
||||
// intervening lint level attribute. This result doesn't get cached.
|
||||
return id;
|
||||
|
|
|
@ -1041,7 +1041,7 @@ impl<'tcx> ThirBuildCx<'tcx> {
|
|||
"Should have already errored about late bound consts: {def_id:?}"
|
||||
);
|
||||
};
|
||||
let name = self.tcx.hir().name(hir_id);
|
||||
let name = self.tcx.hir_name(hir_id);
|
||||
let param = ty::ParamConst::new(index, name);
|
||||
|
||||
ExprKind::ConstParam { param, def_id }
|
||||
|
|
|
@ -73,7 +73,6 @@ struct ThirBuildCx<'tcx> {
|
|||
impl<'tcx> ThirBuildCx<'tcx> {
|
||||
fn new(tcx: TyCtxt<'tcx>, def: LocalDefId) -> Self {
|
||||
let typeck_results = tcx.typeck(def);
|
||||
let hir = tcx.hir();
|
||||
let hir_id = tcx.local_def_id_to_hir_id(def);
|
||||
|
||||
let body_type = match tcx.hir_body_owner_kind(def) {
|
||||
|
@ -111,8 +110,8 @@ impl<'tcx> ThirBuildCx<'tcx> {
|
|||
typeck_results,
|
||||
rvalue_scopes: &typeck_results.rvalue_scopes,
|
||||
body_owner: def.to_def_id(),
|
||||
apply_adjustments: hir
|
||||
.attrs(hir_id)
|
||||
apply_adjustments: tcx
|
||||
.hir_attrs(hir_id)
|
||||
.iter()
|
||||
.all(|attr| attr.name_or_empty() != rustc_span::sym::custom_mir),
|
||||
}
|
||||
|
|
|
@ -1043,7 +1043,7 @@ fn find_fallback_pattern_typo<'tcx>(
|
|||
for item in cx.tcx.hir_crate_items(()).free_items() {
|
||||
if let DefKind::Use = cx.tcx.def_kind(item.owner_id) {
|
||||
// Look for consts being re-exported.
|
||||
let item = cx.tcx.hir().expect_item(item.owner_id.def_id);
|
||||
let item = cx.tcx.hir_expect_item(item.owner_id.def_id);
|
||||
let use_name = item.ident.name;
|
||||
let hir::ItemKind::Use(path, _) = item.kind else {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue