Skip to content

stepping into where-clauses during normalization may be productive - #155388

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
lcnr:norm-where-bounds-may-be-productive
Jul 26, 2026
Merged

stepping into where-clauses during normalization may be productive#155388
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
lcnr:norm-where-bounds-may-be-productive

Conversation

@lcnr

@lcnrlcnr commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

View all comments

fixesrust-lang/trait-system-refactor-initiative#273, see that issue for more info.

Whether stepping into a where-clause is productive depends not on whether we're proving a NormalizesTo or Trait goal, but instead on how both the impl and the cycle rely on it.

In the example in tests/ui/traits/next-solver/cycles/normalizes-to-is-not-productive-2.rs this is just a productive use given the way @Nadrieril and I are thinking about it right now.

We're changing such cycles to be ambiguous for now, so this does not commit us to anything.

This previously caused a lot of breakage when normalizing where-clauses, e.g. rust-lang/trait-system-refactor-initiative#176, however with #158643 that is no longer an issue. We will need to figure out what to do here if we want to properly fix ParamEnv normalization in the future

r? @BoxyUwU or @nikomatsakis

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Apr 16, 2026
@rust-log-analyzer

This comment has been minimized.

@lcnr
lcnrforce-pushed the norm-where-bounds-may-be-productive branch from 7e15d0a to 7149592CompareApril 17, 2026 07:58
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@lcnr
lcnrforce-pushed the norm-where-bounds-may-be-productive branch from 7149592 to 45934b8CompareApril 17, 2026 09:33
@BoxyUwU

Copy link
Copy Markdown
Member

@rustbot author

pending figuring out how breaking this is

@rustbotrustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 1, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbotrustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 1, 2026
@rust-bors

This comment has been minimized.

@Randl

Copy link
Copy Markdown
Contributor

Not sure if you're already aware but this PR ICEs on the following

//@ revisions: current next//@ ignore-compare-mode-next-solver (explicit revisions)//@[next] compile-flags: -Znext-solver//@ edition: 2021//@ compile-flags: --crate-type=lib//@ build-passuse std::future::Future;use std::pin::Pin;use std::sync::Arc;use std::task::Context;use std::task::Poll;structBuffer;typeResult<T> = std::result::Result<T,()>;typeBoxedFuture<'a,T> = Pin<Box<dynFuture<Output = T> + Send + 'a>>;traitRead:Unpin + Send{fnread(&mutself) -> implFuture<Output = Result<Buffer>>;}traitReadDyn:Unpin + Send + Sync{}typeReader = Box<dynReadDyn>;traitAccess:Send + Sync + Unpin{typeReader;fnread(&self) -> implFuture<Output = Result<(u32,Self::Reader)>> + Send;}traitAccessDyn:Send + Sync + Unpin{fnread_dyn(&self) -> BoxedFuture<'_,Result<(u32,Reader)>>;}implAccessfordynAccessDyn{typeReader = Reader;asyncfnread(&self) -> Result<(u32,Self::Reader)>{self.read_dyn().await}}impl<T:Access + ?Sized>AccessforArc<T>{typeReader = T::Reader;fnread(&self) -> implFuture<Output = Result<(u32,Self::Reader)>> + Send{async{self.as_ref().read().await}}}structReadContext{acc:Arc<dynAccessDyn>,}structReadGenerator{ctx:Arc<ReadContext>,}implReadGenerator{asyncfnnext_reader(&self) -> Result<Option<Reader>>{let(_, r) = self.ctx.acc.read().await?;Ok(Some(r))}}traitStream{typeItem;fnpoll_next(self:Pin<&mutSelf>,cx:&mutContext<'_>) -> Poll<Option<Self::Item>>;}enumTwoWays<A,B>{One(A),Two(B),}impl<A:Read,B:Read>ReadforTwoWays<A,B>{asyncfnread(&mutself) -> Result<Buffer>{matchself{TwoWays::One(v) => v.read().await,TwoWays::Two(v) => v.read().await,}}}structStreamingReader{generator:ReadGenerator,}implReadforStreamingReader{asyncfnread(&mutself) -> Result<Buffer>{let _ = self.generator.next_reader().await;loop{}}}structChunkedReader;implReadforChunkedReader{asyncfnread(&mutself) -> Result<Buffer>{loop{}}}enumState{Idle(Option<TwoWays<StreamingReader,ChunkedReader>>),Reading(Pin<Box<dynFuture<Output = (TwoWays<StreamingReader,ChunkedReader>,Result<Buffer>)> + Send>>),}structBufferStream{state:State,}implStreamforBufferStream{typeItem = Result<()>;fnpoll_next(self:Pin<&mutSelf>,_cx:&mutContext<'_>) -> Poll<Option<Self::Item>>{let this = unsafe{self.get_unchecked_mut()};loop{match&mut this.state{State::Idle(reader) => {letmut reader = reader.take().unwrap();let fut = async{let ret = reader.read().await;(reader, ret)};
this.state = State::Reading(Box::pin(fut));}State::Reading(_) => returnPoll::Pending,}}}}

with

error: internal compiler error: compiler/rustc_mir_transform/src/validate.rs:81:25: broken MIR in Item(DefId(0:86 ~ async_block_box_pin_unsize_broken_mir[e897]::{impl#6}::poll_next)) (after phase change to runtime-optimized) at bb8[0]:
Unsize coercion, but `std::pin::Pin<std::boxed::Box<{async block@/Users/evgeniizh/RustroverProjects/rust/tests/ui/traits/next-solver/async-block-box-pin-unsize-broken-mir.rs:131:31: 131:36}>>` isn't coercible to `std::pin::Pin<std::boxed::Box<dyn std::future::Future<Output = (TwoWays<StreamingReader, ChunkedReader>, std::result::Result<Buffer, ()>)> + std::marker::Send>>`
--> /Users/evgeniizh/RustroverProjects/rust/tests/ui/traits/next-solver/async-block-box-pin-unsize-broken-mir.rs:135:49
|
LL | this.state = State::Reading(Box::pin(fut));
| ^^^^^^^^^^^^^
thread 'rustc' (4832989) panicked at compiler/rustc_mir_transform/src/validate.rs:81:25:

while current main doesn't.

@Randl

Copy link
Copy Markdown
Contributor

Hm never mind looks like it passes after rebase on main

@lcnr
lcnrforce-pushed the norm-where-bounds-may-be-productive branch from 45934b8 to 20b2ce1CompareJuly 16, 2026 07:46
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@lcnr
lcnrforce-pushed the norm-where-bounds-may-be-productive branch from 20b2ce1 to e4c693dCompareJuly 16, 2026 09:10
@lcnrlcnr changed the title stepping into NormalizesTo where-clauses may be productivestepping into where-clauses during normalization may be productiveJul 22, 2026
@BoxyUwU

Copy link
Copy Markdown
Member

@bors delegate+

r=me after rebasing

@rustbot author

@rust-bors

rust-borsBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

✌️ @lcnr, you can now approve this pull request!

If @BoxyUwU told you to "r=me" after making some further change, then please make that change and post @bors r=BoxyUwU.

View changes since this delegation.

@lcnr
lcnrforce-pushed the norm-where-bounds-may-be-productive branch from e4c693d to 66d0fb8CompareJuly 22, 2026 11:02
@rustbot

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@lcnr

lcnr commented Jul 24, 2026

Copy link
Copy Markdown
ContributorAuthor

@bors r=BoxyUwU rollup (next-solver only)

@jhprattjhpratt mentioned this pull request Jul 25, 2026
rust-borsBot pushed a commit that referenced this pull request Jul 25, 2026
Rollup of 20 pull requests
Successful merges:
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158404 (trait_solver: normalize next-gen region constraints)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
- #159826 (Remove redundant `#[rustc_paren_sugar]` feature gate)
- #159853 (Updated expect messages for `CString` struct and method documentation)
- #159877 (Revert "Export `derive` at `core::derive` and `std::derive`")
rust-borsBot pushed a commit that referenced this pull request Jul 25, 2026
Rollup of 20 pull requests
Successful merges:
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158404 (trait_solver: normalize next-gen region constraints)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
- #159826 (Remove redundant `#[rustc_paren_sugar]` feature gate)
- #159853 (Updated expect messages for `CString` struct and method documentation)
- #159877 (Revert "Export `derive` at `core::derive` and `std::derive`")
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 25, 2026
…uctive, r=BoxyUwU
stepping into where-clauses during normalization may be productive
fixesrust-lang/trait-system-refactor-initiative#273, see that issue for more info.
Whether stepping into a where-clause is productive depends not on whether we're proving a `NormalizesTo` or `Trait` goal, but instead on how both the impl and the cycle rely on it.
In the example in tests/ui/traits/next-solver/cycles/normalizes-to-is-not-productive-2.rs this is just a productive use given the way @Nadrieril and I are thinking about it right now.
We're changing such cycles to be ambiguous for now, so this does not commit us to anything.
This previously caused a lot of breakage when normalizing where-clauses, e.g. rust-lang/trait-system-refactor-initiative#176, however with rust-lang#158643 that is no longer an issue. We will need to figure out what to do here if we want to properly fix `ParamEnv` normalization in the future
r? @BoxyUwU or @nikomatsakis
rust-borsBot pushed a commit that referenced this pull request Jul 25, 2026
Rollup of 23 pull requests
Successful merges:
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159411 ([rustdoc] Correctly handle output options with --show-coverage)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
- #159810 (Add tuple never coercion collection regression test)
- #159826 (Remove redundant `#[rustc_paren_sugar]` feature gate)
- #159853 (Updated expect messages for `CString` struct and method documentation)
- #159877 (Revert "Export `derive` at `core::derive` and `std::derive`")
- #159878 (bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`)
- #159882 (Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide)
- #159891 (Split multiline derives into std/rustc macros)
- #159895 (rustc-dev-guide subtree update)
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 25, 2026
…uctive, r=BoxyUwU
stepping into where-clauses during normalization may be productive
fixesrust-lang/trait-system-refactor-initiative#273, see that issue for more info.
Whether stepping into a where-clause is productive depends not on whether we're proving a `NormalizesTo` or `Trait` goal, but instead on how both the impl and the cycle rely on it.
In the example in tests/ui/traits/next-solver/cycles/normalizes-to-is-not-productive-2.rs this is just a productive use given the way @Nadrieril and I are thinking about it right now.
We're changing such cycles to be ambiguous for now, so this does not commit us to anything.
This previously caused a lot of breakage when normalizing where-clauses, e.g. rust-lang/trait-system-refactor-initiative#176, however with rust-lang#158643 that is no longer an issue. We will need to figure out what to do here if we want to properly fix `ParamEnv` normalization in the future
r? @BoxyUwU or @nikomatsakis
rust-borsBot pushed a commit that referenced this pull request Jul 25, 2026
Rollup of 23 pull requests
Successful merges:
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159411 ([rustdoc] Correctly handle output options with --show-coverage)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
- #159810 (Add tuple never coercion collection regression test)
- #159826 (Remove redundant `#[rustc_paren_sugar]` feature gate)
- #159853 (Updated expect messages for `CString` struct and method documentation)
- #159878 (bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`)
- #159882 (Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide)
- #159891 (Split multiline derives into std/rustc macros)
- #159895 (rustc-dev-guide subtree update)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 25, 2026
…uctive, r=BoxyUwU
stepping into where-clauses during normalization may be productive
fixesrust-lang/trait-system-refactor-initiative#273, see that issue for more info.
Whether stepping into a where-clause is productive depends not on whether we're proving a `NormalizesTo` or `Trait` goal, but instead on how both the impl and the cycle rely on it.
In the example in tests/ui/traits/next-solver/cycles/normalizes-to-is-not-productive-2.rs this is just a productive use given the way @Nadrieril and I are thinking about it right now.
We're changing such cycles to be ambiguous for now, so this does not commit us to anything.
This previously caused a lot of breakage when normalizing where-clauses, e.g. rust-lang/trait-system-refactor-initiative#176, however with rust-lang#158643 that is no longer an issue. We will need to figure out what to do here if we want to properly fix `ParamEnv` normalization in the future
r? @BoxyUwU or @nikomatsakis
rust-borsBot pushed a commit that referenced this pull request Jul 25, 2026
…uwer
Rollup of 25 pull requests
Successful merges:
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158404 (trait_solver: normalize next-gen region constraints)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159174 (Fix implicit_provenance_casts warnings on Xous)
- #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159785 (Share _Unwind_Exception definition between native and wasm)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
rust-borsBot pushed a commit that referenced this pull request Jul 25, 2026
…uwer
Rollup of 25 pull requests
Successful merges:
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158404 (trait_solver: normalize next-gen region constraints)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159174 (Fix implicit_provenance_casts warnings on Xous)
- #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159785 (Share _Unwind_Exception definition between native and wasm)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
rust-borsBot pushed a commit that referenced this pull request Jul 25, 2026
…uwer
Rollup of 25 pull requests
Successful merges:
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158404 (trait_solver: normalize next-gen region constraints)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159174 (Fix implicit_provenance_casts warnings on Xous)
- #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159785 (Share _Unwind_Exception definition between native and wasm)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 25, 2026
…uctive, r=BoxyUwU
stepping into where-clauses during normalization may be productive
fixesrust-lang/trait-system-refactor-initiative#273, see that issue for more info.
Whether stepping into a where-clause is productive depends not on whether we're proving a `NormalizesTo` or `Trait` goal, but instead on how both the impl and the cycle rely on it.
In the example in tests/ui/traits/next-solver/cycles/normalizes-to-is-not-productive-2.rs this is just a productive use given the way @Nadrieril and I are thinking about it right now.
We're changing such cycles to be ambiguous for now, so this does not commit us to anything.
This previously caused a lot of breakage when normalizing where-clauses, e.g. rust-lang/trait-system-refactor-initiative#176, however with rust-lang#158643 that is no longer an issue. We will need to figure out what to do here if we want to properly fix `ParamEnv` normalization in the future
r? @BoxyUwU or @nikomatsakis
rust-borsBot pushed a commit that referenced this pull request Jul 25, 2026
…uwer
Rollup of 25 pull requests
Successful merges:
- #159825 (codegen: handle OperandValue::Uninit in codegen_return_terminator)
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158404 (trait_solver: normalize next-gen region constraints)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159174 (Fix implicit_provenance_casts warnings on Xous)
- #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
rust-borsBot pushed a commit that referenced this pull request Jul 25, 2026
…uwer
Rollup of 25 pull requests
Successful merges:
- #159825 (codegen: handle OperandValue::Uninit in codegen_return_terminator)
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158404 (trait_solver: normalize next-gen region constraints)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159174 (Fix implicit_provenance_casts warnings on Xous)
- #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 26, 2026
…uctive, r=BoxyUwU
stepping into where-clauses during normalization may be productive
fixesrust-lang/trait-system-refactor-initiative#273, see that issue for more info.
Whether stepping into a where-clause is productive depends not on whether we're proving a `NormalizesTo` or `Trait` goal, but instead on how both the impl and the cycle rely on it.
In the example in tests/ui/traits/next-solver/cycles/normalizes-to-is-not-productive-2.rs this is just a productive use given the way @Nadrieril and I are thinking about it right now.
We're changing such cycles to be ambiguous for now, so this does not commit us to anything.
This previously caused a lot of breakage when normalizing where-clauses, e.g. rust-lang/trait-system-refactor-initiative#176, however with rust-lang#158643 that is no longer an issue. We will need to figure out what to do here if we want to properly fix `ParamEnv` normalization in the future
r? @BoxyUwU or @nikomatsakis
This was referenced Jul 26, 2026
rust-borsBot pushed a commit that referenced this pull request Jul 26, 2026
Rollup of 25 pull requests
Successful merges:
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159174 (Fix implicit_provenance_casts warnings on Xous)
- #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #152439 (Fix typos and grammar in library documentation)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
- #159878 (bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`)
rust-borsBot pushed a commit that referenced this pull request Jul 26, 2026
Rollup of 25 pull requests
Successful merges:
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159174 (Fix implicit_provenance_casts warnings on Xous)
- #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #152439 (Fix typos and grammar in library documentation)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
- #159878 (bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`)
rust-borsBot pushed a commit that referenced this pull request Jul 26, 2026
Rollup of 25 pull requests
Successful merges:
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159174 (Fix implicit_provenance_casts warnings on Xous)
- #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #152439 (Fix typos and grammar in library documentation)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
- #159878 (bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`)
rust-borsBot pushed a commit that referenced this pull request Jul 26, 2026
Rollup of 25 pull requests
Successful merges:
- #138618 (Support using const pointers in asm `const` operand)
- #157962 (Lower paths to functions in const args as ConstKind::Error)
- #158709 (rustdoc: warn on improperly interleaved HTML/MD)
- #159174 (Fix implicit_provenance_casts warnings on Xous)
- #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- #159720 (document #[global_allocator] constraints)
- #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- #159738 (implement `CovariantUnsafeCell`)
- #159740 (reuse regular exported_non_generic_symbols logic in Miri)
- #159780 (check `extern "custom"` function pointers)
- #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- #152439 (Fix typos and grammar in library documentation)
- #155388 (stepping into where-clauses during normalization may be productive)
- #155914 (when bailing on ambiguity, don't force other results to ambig)
- #159204 (Add support to caller_location to rustc_public)
- #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- #159676 (Update wasm-component-ld to 0.5.27)
- #159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- #159730 (allow accessing the contents of UnsafeCell without going through get)
- #159809 (Avoid `#[target_features]`)
- #159878 (bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`)
@rust-bors
rust-borsBot merged commit a0b15f3 into rust-lang:mainJul 26, 2026
13 of 14 checks passed
@rustbotrustbot added this to the 1.99.0 milestone Jul 26, 2026
rust-timer added a commit that referenced this pull request Jul 26, 2026
Rollup merge of #155388 - lcnr:norm-where-bounds-may-be-productive, r=BoxyUwU
stepping into where-clauses during normalization may be productive
fixesrust-lang/trait-system-refactor-initiative#273, see that issue for more info.
Whether stepping into a where-clause is productive depends not on whether we're proving a `NormalizesTo` or `Trait` goal, but instead on how both the impl and the cycle rely on it.
In the example in tests/ui/traits/next-solver/cycles/normalizes-to-is-not-productive-2.rs this is just a productive use given the way @Nadrieril and I are thinking about it right now.
We're changing such cycles to be ambiguous for now, so this does not commit us to anything.
This previously caused a lot of breakage when normalizing where-clauses, e.g. rust-lang/trait-system-refactor-initiative#176, however with #158643 that is no longer an issue. We will need to figure out what to do here if we want to properly fix `ParamEnv` normalization in the future
r? @BoxyUwU or @nikomatsakis
pullBot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jul 27, 2026
Rollup of 25 pull requests
Successful merges:
- rust-lang/rust#138618 (Support using const pointers in asm `const` operand)
- rust-lang/rust#157962 (Lower paths to functions in const args as ConstKind::Error)
- rust-lang/rust#158709 (rustdoc: warn on improperly interleaved HTML/MD)
- rust-lang/rust#159174 (Fix implicit_provenance_casts warnings on Xous)
- rust-lang/rust#159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group)
- rust-lang/rust#159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>)
- rust-lang/rust#159673 (bootstrap: forward -fdebug-prefix-map when using cc)
- rust-lang/rust#159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint)
- rust-lang/rust#159720 (document #[global_allocator] constraints)
- rust-lang/rust#159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
- rust-lang/rust#159738 (implement `CovariantUnsafeCell`)
- rust-lang/rust#159740 (reuse regular exported_non_generic_symbols logic in Miri)
- rust-lang/rust#159780 (check `extern "custom"` function pointers)
- rust-lang/rust#159786 (rustdoc-js: ignore editor temp files in test folder discovery)
- rust-lang/rust#159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
- rust-lang/rust#152439 (Fix typos and grammar in library documentation)
- rust-lang/rust#155388 (stepping into where-clauses during normalization may be productive)
- rust-lang/rust#155914 (when bailing on ambiguity, don't force other results to ambig)
- rust-lang/rust#159204 (Add support to caller_location to rustc_public)
- rust-lang/rust#159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
- rust-lang/rust#159676 (Update wasm-component-ld to 0.5.27)
- rust-lang/rust#159695 (proc_macro: Fix cfg_attr inner attrs in file modules)
- rust-lang/rust#159730 (allow accessing the contents of UnsafeCell without going through get)
- rust-lang/rust#159809 (Avoid `#[target_features]`)
- rust-lang/rust#159878 (bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`)
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.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

entering normalization where-bounds incorrectly considered non-productive

6 participants

@lcnr@rust-log-analyzer@rustbot@BoxyUwU@Randl@jhpratt