rust/tests/ui/where-clauses
Matthias Krüger 40c97a9279
Rollup merge of #149501 - lcnr:no-hard-error-on-norm-failure, r=lqd,oli-obk
CTFE: avoid emitting a hard error on generic normalization failures

Fixes rust-lang/rust#149081.

The fix is quite unsatisfying and should not be necessary, cc rust-lang/rust#149283. That change is significantly more involved. This temporary fix introduces some unnecessary complexity and may hide other type system bugs.

cc ````@rust-lang/types```` I think we should try to fix issue rust-lang/rust#149283 in the near future and then remove this hack again.

I originally intended a more targeted fix. I wanted to skip evaluating constants in MIR opts if their body was polymorphic and the current generic arguments still reference generic parameters. Notes from looking into this:
- we only fetch the MIR in the `eval_to_allocation_raw` query
- figuring out which MIR to use is hard
	- dealing with trivial consts is annoying
	- need to resolve instances for associated consts
	- implementing this by hand is hard
- inlining handles this issue by bailing on literally all normalization failures, even the ones that imply an unsoundness
	- `try_normalize_after_erasing_regions` generally does two things
		- deal with ambiguity after inlining
		- deal with error tainting issues (please don't, we should stop doing that)
- CTFE could be changed to always silently ignore normalization failures if we're in a generic body
	- hides actual bugs <- went with this option

r? types
2025-12-04 08:46:20 +01:00
..
auxiliary
cfg-attr-issue-138010-1.rs Retire ast::TyAliasWhereClauses. 2025-10-23 00:40:01 +00:00
cfg-attr-issue-138010-2.rs Retire ast::TyAliasWhereClauses. 2025-10-23 00:40:01 +00:00
cfg-attr-issue-138010-2.stderr Retire ast::TyAliasWhereClauses. 2025-10-23 00:40:01 +00:00
cfg_attribute.a.stderr Implment #[cfg] and #[cfg_attr] in where clauses 2025-03-01 22:02:46 +08:00
cfg_attribute.b.stderr Implment #[cfg] and #[cfg_attr] in where clauses 2025-03-01 22:02:46 +08:00
cfg_attribute.rs Implment #[cfg] and #[cfg_attr] in where clauses 2025-03-01 22:02:46 +08:00
higher-ranked-fn-type.quiet.stderr
higher-ranked-fn-type.rs
higher-ranked-fn-type.verbose.stderr Remove Symbol for Named LateParam/Bound variants 2025-07-04 18:14:22 +00:00
ignore-err-clauses.rs Consider param-env for fast path 2025-07-20 17:45:01 +00:00
ignore-err-clauses.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-50825-1.rs
issue-50825.rs
method-suggestion-no-duplication.rs move (and remove) impl Trait tests 2025-05-09 02:35:18 +00:00
method-suggestion-no-duplication.stderr move (and remove) impl Trait tests 2025-05-09 02:35:18 +00:00
normalization-of-unknown-type.rs
normalization-of-unknown-type.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
projection-bound-unsatisfied-item-bounds-mit-opt-ice.rs add test 2025-12-01 13:00:22 +01:00
self-in-where-clause-allowed.rs
self-in-where-clause-allowed.stderr
unsupported_attribute.rs Update uitests 2025-08-14 18:18:42 +02:00
unsupported_attribute.stderr sort attribute targets for more consistent error messages 2025-10-08 08:32:03 +02:00
where-clause-bounds-inconsistency.rs
where-clause-constraints-are-local-for-inherent-impl.rs
where-clause-constraints-are-local-for-inherent-impl.stderr Use trait name instead of full constraint in suggestion message 2024-12-07 21:29:58 +00:00
where-clause-constraints-are-local-for-trait-impl.rs
where-clause-constraints-are-local-for-trait-impl.stderr Use trait name instead of full constraint in suggestion message 2024-12-07 21:29:58 +00:00
where-clause-early-bound-lifetimes.rs
where-clause-early-bound-lifetimes.stderr bless tests with new lint messages 2025-08-19 21:27:10 +02:00
where-clause-method-substituion-rpass.rs
where-clause-method-substituion-rpass.stderr bless tests with new lint messages 2025-08-19 21:27:10 +02:00
where-clause-method-substituion.rs
where-clause-method-substituion.stderr On E0277, point at type that doesn't implement bound 2025-08-22 17:55:15 +00:00
where-clause-placement-assoc-type-in-impl.fixed
where-clause-placement-assoc-type-in-impl.rs
where-clause-placement-assoc-type-in-impl.stderr
where-clause-placement-assoc-type-in-trait.fixed
where-clause-placement-assoc-type-in-trait.rs
where-clause-placement-assoc-type-in-trait.stderr
where-clause-placement-type-alias.rs
where-clause-placement-type-alias.stderr
where-clause-region-outlives.rs
where-clauses-cross-crate.rs
where-clauses-lifetimes.rs
where-clauses-method-unsatisfied.current.stderr Don't pick T: FnPtr nested goals 2025-01-22 06:55:38 +00:00
where-clauses-method-unsatisfied.next.stderr Don't pick T: FnPtr nested goals 2025-01-22 06:55:38 +00:00
where-clauses-method-unsatisfied.rs Don't pick T: FnPtr nested goals 2025-01-22 06:55:38 +00:00
where-clauses-method.rs
where-clauses-unboxed-closures.rs
where-clauses-unsatisfied.current.stderr Don't pick T: FnPtr nested goals 2025-01-22 06:55:38 +00:00
where-clauses-unsatisfied.next.stderr Don't pick T: FnPtr nested goals 2025-01-22 06:55:38 +00:00
where-clauses-unsatisfied.rs Don't pick T: FnPtr nested goals 2025-01-22 06:55:38 +00:00
where-clauses.rs
where-equality-constraints.rs
where-equality-constraints.stderr
where-for-self-2.rs
where-for-self-2.stderr
where-for-self.rs
where-for-self.stderr
where-lifetime-resolution.rs
where-lifetime-resolution.stderr