Skip to content

Remove strict invariant node_type on hir_type during ty privacy visit - #157883

Merged
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
bit-aloo:2026-06-14-remove-strict-invariant-ty-privacy-vist
Jun 25, 2026
Merged

Remove strict invariant node_type on hir_type during ty privacy visit#157883
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
bit-aloo:2026-06-14-remove-strict-invariant-ty-privacy-vist

Conversation

@bit-aloo

@bit-aloobit-aloo commented Jun 14, 2026

Copy link
Copy Markdown
Member

closes: #157772

r? @BoxyUwU

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 14, 2026
Comment threadcompiler/rustc_privacy/src/lib.rs Outdated
Comment on lines +1184 to +1191
if let Some(ty) = self
.maybe_typeck_results
.unwrap_or_else(|| span_bug!(hir_ty.span, "`hir::Ty` outside of a body"))
.node_type_opt(hir_ty.hir_id)
{
return;
if self.visit(ty).is_break() {
return;
}

@bit-aloobit-alooJun 14, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not fully sure this change is right, but this is how I am thinking about it. This used node_type before, so visit_ty was assuming every hir_ty would already have a type entry in TypeckResults. But the comment in writeback::visit_ty makes it sound like that is not always true on some error paths, since writeback may just not write a final type entry for that hir_ty. So based on that, I changed this visit_ty to handle missing type entries and just keep walking the type tree.

I hope the thought process is sane. And I am not breaking any invariant (like I am not seeing any test fail :P)

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we instead fix writeback to ensure we always have a type recorded, even on error paths?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, seems like its an intended behavior as mentioned here in writeback visit_ty:

// If there are type checking errors, Type privacy pass will stop,
// so we may not get the type from hir_id, see #104513

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had an issue during lowering itself, reverted this change, thanks.

@bit-aloobit-aloo changed the title Remove strict invariant ty_type on hir_type during ty privacy visitRemove strict invariant node_type on hir_type during ty privacy visitJun 14, 2026
Comment threadcompiler/rustc_privacy/src/lib.rs

@BoxyUwUBoxyUwU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure what's going on with this ICE, so I have a few questions hopefully you can look into/answer for me 😅

  1. what's the Ty we're visiting that hasn't got a node_type entry? Is it the T in T::ASSOC?
  2. If this code doesn't error where would we normally insert the node_type at and why doesn't that happen when the code errors
  3. Are there similar ICEIng cases not using the tuple syntax, e.g. when using struct expressions or associated constants. If not why not :3

View changes since this review

Comment threadcompiler/rustc_privacy/src/lib.rs Outdated
if let Some(ty) = self
.maybe_typeck_results
.unwrap_or_else(|| span_bug!(hir_ty.span, "`hir::Ty` outside of a body"))
.node_type_opt(hir_ty.hir_id)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delaying a bug if node_type_opt returns None feels "safer" to me than implicitly doing nothing, we only expect to not have a type here if there were errors right?

@BoxyUwU

Copy link
Copy Markdown
Member

@rustbot author

@rustbotrustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 19, 2026
@bit-aloo

bit-aloo commented Jun 22, 2026

Copy link
Copy Markdown
MemberAuthor

I'm not entirely sure what's going on with this ICE, so I have a few questions hopefully you can look into/answer for me 😅

  1. what's the Ty we're visiting that hasn't got a node_type entry? Is it the T in T::ASSOC?
  2. If this code doesn't error where would we normally insert the node_type at and why doesn't that happen when the code errors
  3. Are there similar ICEIng cases not using the tuple syntax, e.g. when using struct expressions or associated constants. If not why not :3
  1. Yes, the missing node_type is for the T in T::ASSOC.
  2. Because we didn't lowered the caller tuple elements, so we never assigned an node_type to those hir_nodes.
  3. I didn't see ICE for struct expressions or associated constants. This bug is specific to tuple const args.

After looking deeply and many debugs logs, I think I found the real issue, which is in lower_const_arg_tup:

The current code uses zip, in lower_const_arg_tup:

let exprs = exprs
.iter().zip(tys.iter()).map(|(expr, ty)| self.lower_const_arg(expr, ty)).collect::<Vec<_>>();

code snippet:

fnlower_const_arg_tup(&self,exprs:&'tcx[&'tcx hir::ConstArg<'tcx>],ty:Ty<'tcx>,span:Span,) -> Const<'tcx>{let tcx = self.tcx();let tys = match ty.kind(){
ty::Tuple(tys) => tys,
ty::Error(e) => returnConst::new_error(tcx,*e),
_ => {let e = tcx.dcx().span_err(span,format!("expected `{}`, found const tuple", ty));returnConst::new_error(tcx, e);}};let exprs = exprs
.iter().zip(tys.iter()).map(|(expr, ty)| self.lower_const_arg(expr, ty)).collect::<Vec<_>>();let valtree = ty::ValTree::from_branches(tcx, exprs);
ty::Const::new_value(tcx, valtree, ty)}

This is the problem. zip stops when either side ends. So if the user gives too many tuple elements, the extra elements are silently ignored.

For example, this can compile even though it should not:

#![feature(min_generic_const_args, adt_const_params)]fntakes_tuple<constN:(u32,)>(){}fngeneric_caller<constN:u32>(){takes_tuple::<{(1,1)}>;}fnmain(){}

The ICE happens in the same way. For this code:

fntakes_tuple<constN:()>(){}fngeneric_caller<T,constN:u32>(){takes_tuple::<{(N,T::ASSOC)}>;}

the expected tuple type is (), which has zero elements. So zip lowers zero elements. That means T::ASSOC is skipped. Later, privacy still walks the HIR and sees the T, but there is no node_type for it, so we ICE.

I added a check the tuple lengths before using zip. If the number of provided tuple elements does not match the expected tuple type, we emit an error and return an error const instead of silently ignoring elements.

@rust-cloud-vms
rust-cloud-vmsBotforce-pushed the 2026-06-14-remove-strict-invariant-ty-privacy-vist branch from 124feda to cd8c4d0CompareJune 22, 2026 07:13
@rustbot

Copy link
Copy Markdown
Collaborator

HIR ty lowering was modified

cc @fmease

@bit-aloo
bit-aloo requested a review from BoxyUwUJune 22, 2026 09:51
@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 22, 2026
@BoxyUwU

Copy link
Copy Markdown
Member

ah sick yeah that makes a lot of sense, thanks for looking into that for me :)

@bors r+

@rust-bors

rust-borsBot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit cd8c4d0 has been approved by BoxyUwU

It is now in the queue for this repository.

@rust-borsrust-borsBot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 23, 2026
@bit-aloo

Copy link
Copy Markdown
MemberAuthor

ah sick yeah that makes a lot of sense, thanks for looking into that for me :)

@bors r+

Ah!! Thanks for asking those super awesome questions, really helped me to think deeper and find actual bug.

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 23, 2026
…t-invariant-ty-privacy-vist, r=BoxyUwU
Remove strict invariant node_type on hir_type during ty privacy visit
closes: rust-lang#157772
r? @BoxyUwU
rust-borsBot pushed a commit that referenced this pull request Jun 23, 2026
…uwer
Rollup of 16 pull requests
Successful merges:
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #158020 (Update mingw-w64 C toolchain)
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158257 ( fix escaping placeholder check in next solver normalization folder)
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
Failed merges:
- #158256 (Avoid parser panics bubbling out to proc macros)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 23, 2026
…t-invariant-ty-privacy-vist, r=BoxyUwU
Remove strict invariant node_type on hir_type during ty privacy visit
closes: rust-lang#157772
r? @BoxyUwU
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 23, 2026
…t-invariant-ty-privacy-vist, r=BoxyUwU
Remove strict invariant node_type on hir_type during ty privacy visit
closes: rust-lang#157772
r? @BoxyUwU
rust-borsBot pushed a commit that referenced this pull request Jun 23, 2026
…uwer
Rollup of 23 pull requests
Successful merges:
- #158315 (`rust-analyzer` subtree update)
- #155739 (Add temporary scope to assert_eq and assert_ne)
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #157983 (Lift the same-signature restriction for `extern "tail"`)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157527 (Move derive tests into their dedicated folder)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #158020 (Update mingw-w64 C toolchain)
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158257 ( fix escaping placeholder check in next solver normalization folder)
- #158263 (Only load the feature list once in the entire resolver)
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
- #158300 (Improve unknown crate_type diagnostic suggestions)
- #158304 (mailmap: update mu001999)
Failed merges:
- #158256 (Avoid parser panics bubbling out to proc macros)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 24, 2026
…t-invariant-ty-privacy-vist, r=BoxyUwU
Remove strict invariant node_type on hir_type during ty privacy visit
closes: rust-lang#157772
r? @BoxyUwU
@jhprattjhpratt mentioned this pull request Jun 24, 2026
rust-borsBot pushed a commit that referenced this pull request Jun 24, 2026
Rollup of 27 pull requests
Successful merges:
- #158315 (`rust-analyzer` subtree update)
- #155739 (Add temporary scope to assert_eq and assert_ne)
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #157983 (Lift the same-signature restriction for `extern "tail"`)
- #158053 (Optimize network address parser)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157527 (Move derive tests into their dedicated folder)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #158020 (Update mingw-w64 C toolchain)
- #158039 (c-variadic: test that we use equality up to free lifetimes)
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158257 ( fix escaping placeholder check in next solver normalization folder)
- #158263 (Only load the feature list once in the entire resolver)
- #158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
- #158300 (Improve unknown crate_type diagnostic suggestions)
- #158304 (mailmap: update mu001999)
- #158309 (Update `rustc-literal-escaper` version to `0.0.8`)
Failed merges:
- #158256 (Avoid parser panics bubbling out to proc macros)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 24, 2026
…t-invariant-ty-privacy-vist, r=BoxyUwU
Remove strict invariant node_type on hir_type during ty privacy visit
closes: rust-lang#157772
r? @BoxyUwU
This was referenced Jun 24, 2026
rust-borsBot pushed a commit that referenced this pull request Jun 24, 2026
Rollup of 35 pull requests
Successful merges:
- #158315 (`rust-analyzer` subtree update)
- #158336 (Stop excluding `stdarch` test crates from `rust-src`)
- #155739 (Add temporary scope to assert_eq and assert_ne)
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157419 (move rustc_type_ir Term things to term_kind.rs)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #157983 (Lift the same-signature restriction for `extern "tail"`)
- #158053 (Optimize network address parser)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157527 (Move derive tests into their dedicated folder)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #157939 (Reorganize `tests/ui/issues` [8/N])
- #157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- #158003 (Reorganize `tests/ui/issues` [9/N])
- #158020 (Update mingw-w64 C toolchain)
- #158039 (c-variadic: test that we use equality up to free lifetimes)
- #158060 (Reorganize `tests/ui/issues` [10/N])
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158263 (Only load the feature list once in the entire resolver)
- #158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- #158272 (Reorganize `tests/ui/issues` [13/N])
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
- #158300 (Improve unknown crate_type diagnostic suggestions)
- #158304 (mailmap: update mu001999)
- #158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- #158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- #158326 (Add `io::ErrorKind::TooManyOpenFiles`)
rust-borsBot pushed a commit that referenced this pull request Jun 24, 2026
Rollup of 35 pull requests
Successful merges:
- #158315 (`rust-analyzer` subtree update)
- #158336 (Stop excluding `stdarch` test crates from `rust-src`)
- #155739 (Add temporary scope to assert_eq and assert_ne)
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157419 (move rustc_type_ir Term things to term_kind.rs)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #157983 (Lift the same-signature restriction for `extern "tail"`)
- #158053 (Optimize network address parser)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157527 (Move derive tests into their dedicated folder)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #157939 (Reorganize `tests/ui/issues` [8/N])
- #157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- #158003 (Reorganize `tests/ui/issues` [9/N])
- #158020 (Update mingw-w64 C toolchain)
- #158039 (c-variadic: test that we use equality up to free lifetimes)
- #158060 (Reorganize `tests/ui/issues` [10/N])
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158263 (Only load the feature list once in the entire resolver)
- #158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- #158272 (Reorganize `tests/ui/issues` [13/N])
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
- #158300 (Improve unknown crate_type diagnostic suggestions)
- #158304 (mailmap: update mu001999)
- #158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- #158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- #158326 (Add `io::ErrorKind::TooManyOpenFiles`)
rust-borsBot pushed a commit that referenced this pull request Jun 24, 2026
Rollup of 35 pull requests
Successful merges:
- #158315 (`rust-analyzer` subtree update)
- #158336 (Stop excluding `stdarch` test crates from `rust-src`)
- #155739 (Add temporary scope to assert_eq and assert_ne)
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157419 (move rustc_type_ir Term things to term_kind.rs)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #157983 (Lift the same-signature restriction for `extern "tail"`)
- #158053 (Optimize network address parser)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157527 (Move derive tests into their dedicated folder)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #157939 (Reorganize `tests/ui/issues` [8/N])
- #157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- #158003 (Reorganize `tests/ui/issues` [9/N])
- #158020 (Update mingw-w64 C toolchain)
- #158039 (c-variadic: test that we use equality up to free lifetimes)
- #158060 (Reorganize `tests/ui/issues` [10/N])
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158263 (Only load the feature list once in the entire resolver)
- #158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- #158272 (Reorganize `tests/ui/issues` [13/N])
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
- #158300 (Improve unknown crate_type diagnostic suggestions)
- #158304 (mailmap: update mu001999)
- #158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- #158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- #158326 (Add `io::ErrorKind::TooManyOpenFiles`)
rust-borsBot pushed a commit that referenced this pull request Jun 24, 2026
Rollup of 35 pull requests
Successful merges:
- #158315 (`rust-analyzer` subtree update)
- #158336 (Stop excluding `stdarch` test crates from `rust-src`)
- #155739 (Add temporary scope to assert_eq and assert_ne)
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157419 (move rustc_type_ir Term things to term_kind.rs)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #157983 (Lift the same-signature restriction for `extern "tail"`)
- #158053 (Optimize network address parser)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157527 (Move derive tests into their dedicated folder)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #157939 (Reorganize `tests/ui/issues` [8/N])
- #157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- #158003 (Reorganize `tests/ui/issues` [9/N])
- #158020 (Update mingw-w64 C toolchain)
- #158039 (c-variadic: test that we use equality up to free lifetimes)
- #158060 (Reorganize `tests/ui/issues` [10/N])
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158263 (Only load the feature list once in the entire resolver)
- #158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- #158272 (Reorganize `tests/ui/issues` [13/N])
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
- #158300 (Improve unknown crate_type diagnostic suggestions)
- #158304 (mailmap: update mu001999)
- #158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- #158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- #158326 (Add `io::ErrorKind::TooManyOpenFiles`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 24, 2026
…t-invariant-ty-privacy-vist, r=BoxyUwU
Remove strict invariant node_type on hir_type during ty privacy visit
closes: rust-lang#157772
r? @BoxyUwU
rust-borsBot pushed a commit that referenced this pull request Jun 24, 2026
Rollup of 35 pull requests
Successful merges:
- #158315 (`rust-analyzer` subtree update)
- #158336 (Stop excluding `stdarch` test crates from `rust-src`)
- #155739 (Add temporary scope to assert_eq and assert_ne)
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157419 (move rustc_type_ir Term things to term_kind.rs)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #157983 (Lift the same-signature restriction for `extern "tail"`)
- #158053 (Optimize network address parser)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157527 (Move derive tests into their dedicated folder)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #157939 (Reorganize `tests/ui/issues` [8/N])
- #157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- #158003 (Reorganize `tests/ui/issues` [9/N])
- #158020 (Update mingw-w64 C toolchain)
- #158039 (c-variadic: test that we use equality up to free lifetimes)
- #158060 (Reorganize `tests/ui/issues` [10/N])
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158263 (Only load the feature list once in the entire resolver)
- #158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- #158272 (Reorganize `tests/ui/issues` [13/N])
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
- #158300 (Improve unknown crate_type diagnostic suggestions)
- #158304 (mailmap: update mu001999)
- #158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- #158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- #158326 (Add `io::ErrorKind::TooManyOpenFiles`)
rust-borsBot pushed a commit that referenced this pull request Jun 25, 2026
Rollup of 35 pull requests
Successful merges:
- #158315 (`rust-analyzer` subtree update)
- #158336 (Stop excluding `stdarch` test crates from `rust-src`)
- #155739 (Add temporary scope to assert_eq and assert_ne)
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157419 (move rustc_type_ir Term things to term_kind.rs)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #157983 (Lift the same-signature restriction for `extern "tail"`)
- #158053 (Optimize network address parser)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157527 (Move derive tests into their dedicated folder)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #157939 (Reorganize `tests/ui/issues` [8/N])
- #157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- #158003 (Reorganize `tests/ui/issues` [9/N])
- #158020 (Update mingw-w64 C toolchain)
- #158039 (c-variadic: test that we use equality up to free lifetimes)
- #158060 (Reorganize `tests/ui/issues` [10/N])
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158263 (Only load the feature list once in the entire resolver)
- #158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- #158272 (Reorganize `tests/ui/issues` [13/N])
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
- #158300 (Improve unknown crate_type diagnostic suggestions)
- #158304 (mailmap: update mu001999)
- #158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- #158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- #158326 (Add `io::ErrorKind::TooManyOpenFiles`)
rust-borsBot pushed a commit that referenced this pull request Jun 25, 2026
Rollup of 35 pull requests
Successful merges:
- #158315 (`rust-analyzer` subtree update)
- #158336 (Stop excluding `stdarch` test crates from `rust-src`)
- #155739 (Add temporary scope to assert_eq and assert_ne)
- #156885 (Fix misattributed type inference error span for index expressions)
- #157271 (simplify some `proc_macro` things)
- #157419 (move rustc_type_ir Term things to term_kind.rs)
- #157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- #157921 (trait solver: Resolve region vars in max universe)
- #157960 (delegation: add support for infers in generics)
- #157983 (Lift the same-signature restriction for `extern "tail"`)
- #158053 (Optimize network address parser)
- #158105 (Extract all instance shim variants into new `ShimKind` enum)
- #158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- #158279 (Follow goto and drop when linting unreachable code)
- #157527 (Move derive tests into their dedicated folder)
- #157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- #157939 (Reorganize `tests/ui/issues` [8/N])
- #157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- #158003 (Reorganize `tests/ui/issues` [9/N])
- #158020 (Update mingw-w64 C toolchain)
- #158039 (c-variadic: test that we use equality up to free lifetimes)
- #158060 (Reorganize `tests/ui/issues` [10/N])
- #158222 (format: ignore println newline in foreign format hints)
- #158223 (Move target checking for #[lang] to the attribute parser)
- #158252 (Use `cfg_select` in `std::os`)
- #158263 (Only load the feature list once in the entire resolver)
- #158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- #158272 (Reorganize `tests/ui/issues` [13/N])
- #158274 (triagebot: Stop pinging myself)
- #158282 (slice_split_once: bounds check optimization note)
- #158300 (Improve unknown crate_type diagnostic suggestions)
- #158304 (mailmap: update mu001999)
- #158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- #158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- #158326 (Add `io::ErrorKind::TooManyOpenFiles`)
@rust-bors
rust-borsBot merged commit 1def281 into rust-lang:mainJun 25, 2026
13 checks passed
@rustbotrustbot added this to the 1.98.0 milestone Jun 25, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

@rust-timer build c8be92a
Perf run for #158342

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (c8be92a): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
1.0%[0.8%, 1.1%]5
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.2%[-0.2%, -0.2%]1
All ❌✅ (primary)--0

Max RSS (memory usage)

Results (primary 5.8%, secondary -9.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
5.8%[5.8%, 5.8%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-9.8%[-9.8%, -9.8%]1
All ❌✅ (primary)5.8%[5.8%, 5.8%]1

Cycles

Results (secondary 2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
2.2%[2.2%, 2.2%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 503.101s -> 505.582s (0.49%)
Artifact size: 353.51 MiB -> 353.44 MiB (-0.02%)

pullBot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jun 26, 2026
Rollup of 35 pull requests
Successful merges:
- rust-lang/rust#158315 (`rust-analyzer` subtree update)
- rust-lang/rust#158336 (Stop excluding `stdarch` test crates from `rust-src`)
- rust-lang/rust#155739 (Add temporary scope to assert_eq and assert_ne)
- rust-lang/rust#156885 (Fix misattributed type inference error span for index expressions)
- rust-lang/rust#157271 (simplify some `proc_macro` things)
- rust-lang/rust#157419 (move rustc_type_ir Term things to term_kind.rs)
- rust-lang/rust#157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- rust-lang/rust#157921 (trait solver: Resolve region vars in max universe)
- rust-lang/rust#157960 (delegation: add support for infers in generics)
- rust-lang/rust#157983 (Lift the same-signature restriction for `extern "tail"`)
- rust-lang/rust#158053 (Optimize network address parser)
- rust-lang/rust#158105 (Extract all instance shim variants into new `ShimKind` enum)
- rust-lang/rust#158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- rust-lang/rust#158279 (Follow goto and drop when linting unreachable code)
- rust-lang/rust#157527 (Move derive tests into their dedicated folder)
- rust-lang/rust#157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- rust-lang/rust#157939 (Reorganize `tests/ui/issues` [8/N])
- rust-lang/rust#157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- rust-lang/rust#158003 (Reorganize `tests/ui/issues` [9/N])
- rust-lang/rust#158020 (Update mingw-w64 C toolchain)
- rust-lang/rust#158039 (c-variadic: test that we use equality up to free lifetimes)
- rust-lang/rust#158060 (Reorganize `tests/ui/issues` [10/N])
- rust-lang/rust#158222 (format: ignore println newline in foreign format hints)
- rust-lang/rust#158223 (Move target checking for #[lang] to the attribute parser)
- rust-lang/rust#158252 (Use `cfg_select` in `std::os`)
- rust-lang/rust#158263 (Only load the feature list once in the entire resolver)
- rust-lang/rust#158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- rust-lang/rust#158272 (Reorganize `tests/ui/issues` [13/N])
- rust-lang/rust#158274 (triagebot: Stop pinging myself)
- rust-lang/rust#158282 (slice_split_once: bounds check optimization note)
- rust-lang/rust#158300 (Improve unknown crate_type diagnostic suggestions)
- rust-lang/rust#158304 (mailmap: update mu001999)
- rust-lang/rust#158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- rust-lang/rust#158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- rust-lang/rust#158326 (Add `io::ErrorKind::TooManyOpenFiles`)
pullBot pushed a commit to Kokoro2336/rust-analyzer that referenced this pull request Jun 29, 2026
Rollup of 35 pull requests
Successful merges:
- rust-lang/rust#158315 (`rust-analyzer` subtree update)
- rust-lang/rust#158336 (Stop excluding `stdarch` test crates from `rust-src`)
- rust-lang/rust#155739 (Add temporary scope to assert_eq and assert_ne)
- rust-lang/rust#156885 (Fix misattributed type inference error span for index expressions)
- rust-lang/rust#157271 (simplify some `proc_macro` things)
- rust-lang/rust#157419 (move rustc_type_ir Term things to term_kind.rs)
- rust-lang/rust#157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- rust-lang/rust#157921 (trait solver: Resolve region vars in max universe)
- rust-lang/rust#157960 (delegation: add support for infers in generics)
- rust-lang/rust#157983 (Lift the same-signature restriction for `extern "tail"`)
- rust-lang/rust#158053 (Optimize network address parser)
- rust-lang/rust#158105 (Extract all instance shim variants into new `ShimKind` enum)
- rust-lang/rust#158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- rust-lang/rust#158279 (Follow goto and drop when linting unreachable code)
- rust-lang/rust#157527 (Move derive tests into their dedicated folder)
- rust-lang/rust#157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- rust-lang/rust#157939 (Reorganize `tests/ui/issues` [8/N])
- rust-lang/rust#157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- rust-lang/rust#158003 (Reorganize `tests/ui/issues` [9/N])
- rust-lang/rust#158020 (Update mingw-w64 C toolchain)
- rust-lang/rust#158039 (c-variadic: test that we use equality up to free lifetimes)
- rust-lang/rust#158060 (Reorganize `tests/ui/issues` [10/N])
- rust-lang/rust#158222 (format: ignore println newline in foreign format hints)
- rust-lang/rust#158223 (Move target checking for #[lang] to the attribute parser)
- rust-lang/rust#158252 (Use `cfg_select` in `std::os`)
- rust-lang/rust#158263 (Only load the feature list once in the entire resolver)
- rust-lang/rust#158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- rust-lang/rust#158272 (Reorganize `tests/ui/issues` [13/N])
- rust-lang/rust#158274 (triagebot: Stop pinging myself)
- rust-lang/rust#158282 (slice_split_once: bounds check optimization note)
- rust-lang/rust#158300 (Improve unknown crate_type diagnostic suggestions)
- rust-lang/rust#158304 (mailmap: update mu001999)
- rust-lang/rust#158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- rust-lang/rust#158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- rust-lang/rust#158326 (Add `io::ErrorKind::TooManyOpenFiles`)
ghaaj pushed a commit to ghaaj/polygrammar that referenced this pull request Aug 7, 2026
Rollup of 35 pull requests
Successful merges:
- rust-lang/rust#158315 (`rust-analyzer` subtree update)
- rust-lang/rust#158336 (Stop excluding `stdarch` test crates from `rust-src`)
- rust-lang/rust#155739 (Add temporary scope to assert_eq and assert_ne)
- rust-lang/rust#156885 (Fix misattributed type inference error span for index expressions)
- rust-lang/rust#157271 (simplify some `proc_macro` things)
- rust-lang/rust#157419 (move rustc_type_ir Term things to term_kind.rs)
- rust-lang/rust#157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- rust-lang/rust#157921 (trait solver: Resolve region vars in max universe)
- rust-lang/rust#157960 (delegation: add support for infers in generics)
- rust-lang/rust#157983 (Lift the same-signature restriction for `extern "tail"`)
- rust-lang/rust#158053 (Optimize network address parser)
- rust-lang/rust#158105 (Extract all instance shim variants into new `ShimKind` enum)
- rust-lang/rust#158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- rust-lang/rust#158279 (Follow goto and drop when linting unreachable code)
- rust-lang/rust#157527 (Move derive tests into their dedicated folder)
- rust-lang/rust#157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- rust-lang/rust#157939 (Reorganize `tests/ui/issues` [8/N])
- rust-lang/rust#157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- rust-lang/rust#158003 (Reorganize `tests/ui/issues` [9/N])
- rust-lang/rust#158020 (Update mingw-w64 C toolchain)
- rust-lang/rust#158039 (c-variadic: test that we use equality up to free lifetimes)
- rust-lang/rust#158060 (Reorganize `tests/ui/issues` [10/N])
- rust-lang/rust#158222 (format: ignore println newline in foreign format hints)
- rust-lang/rust#158223 (Move target checking for #[lang] to the attribute parser)
- rust-lang/rust#158252 (Use `cfg_select` in `std::os`)
- rust-lang/rust#158263 (Only load the feature list once in the entire resolver)
- rust-lang/rust#158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- rust-lang/rust#158272 (Reorganize `tests/ui/issues` [13/N])
- rust-lang/rust#158274 (triagebot: Stop pinging myself)
- rust-lang/rust#158282 (slice_split_once: bounds check optimization note)
- rust-lang/rust#158300 (Improve unknown crate_type diagnostic suggestions)
- rust-lang/rust#158304 (mailmap: update mu001999)
- rust-lang/rust#158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- rust-lang/rust#158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- rust-lang/rust#158326 (Add `io::ErrorKind::TooManyOpenFiles`)
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 17, 2026
Rollup of 35 pull requests
Successful merges:
- rust-lang/rust#158315 (`rust-analyzer` subtree update)
- rust-lang/rust#158336 (Stop excluding `stdarch` test crates from `rust-src`)
- rust-lang/rust#155739 (Add temporary scope to assert_eq and assert_ne)
- rust-lang/rust#156885 (Fix misattributed type inference error span for index expressions)
- rust-lang/rust#157271 (simplify some `proc_macro` things)
- rust-lang/rust#157419 (move rustc_type_ir Term things to term_kind.rs)
- rust-lang/rust#157883 (Remove strict invariant node_type on hir_type during ty privacy visit)
- rust-lang/rust#157921 (trait solver: Resolve region vars in max universe)
- rust-lang/rust#157960 (delegation: add support for infers in generics)
- rust-lang/rust#157983 (Lift the same-signature restriction for `extern "tail"`)
- rust-lang/rust#158053 (Optimize network address parser)
- rust-lang/rust#158105 (Extract all instance shim variants into new `ShimKind` enum)
- rust-lang/rust#158207 (Resolver: local/external split of `resolve_ident_in_module_non_globs_unadjusted` )
- rust-lang/rust#158279 (Follow goto and drop when linting unreachable code)
- rust-lang/rust#157527 (Move derive tests into their dedicated folder)
- rust-lang/rust#157807 (don't ice on non-lifetime binders under `-Zassumptions-on-binders`)
- rust-lang/rust#157939 (Reorganize `tests/ui/issues` [8/N])
- rust-lang/rust#157946 (Make `char::is_private_use` and `char::is_assigned` unstably public)
- rust-lang/rust#158003 (Reorganize `tests/ui/issues` [9/N])
- rust-lang/rust#158020 (Update mingw-w64 C toolchain)
- rust-lang/rust#158039 (c-variadic: test that we use equality up to free lifetimes)
- rust-lang/rust#158060 (Reorganize `tests/ui/issues` [10/N])
- rust-lang/rust#158222 (format: ignore println newline in foreign format hints)
- rust-lang/rust#158223 (Move target checking for #[lang] to the attribute parser)
- rust-lang/rust#158252 (Use `cfg_select` in `std::os`)
- rust-lang/rust#158263 (Only load the feature list once in the entire resolver)
- rust-lang/rust#158267 (FromUtf8Error::into_utf8_lossy better example and suggest use)
- rust-lang/rust#158272 (Reorganize `tests/ui/issues` [13/N])
- rust-lang/rust#158274 (triagebot: Stop pinging myself)
- rust-lang/rust#158282 (slice_split_once: bounds check optimization note)
- rust-lang/rust#158300 (Improve unknown crate_type diagnostic suggestions)
- rust-lang/rust#158304 (mailmap: update mu001999)
- rust-lang/rust#158309 (Update `rustc-literal-escaper` version to `0.0.8`)
- rust-lang/rust#158314 (Fix incorrect unsafe debug assertion in unchecked_div_exact)
- rust-lang/rust#158326 (Add `io::ErrorKind::TooManyOpenFiles`)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: node_type: no type for node HirId

7 participants

@bit-aloo@BoxyUwU@rustbot@JonathanBrouwer@rust-timer@cjgillot@qaijuang