add a few new solver normalization tests#156250
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
want to add a new "traits/normalize" folder, we already have one with the new solver but seems useful in general
can you change all tests to use #[rustc_no_implicit_bounds] 😅
the fact we have to prove MetaSized here breaks the thing we actually want to test 😅
done, I've also moved a handful of
I've done that for the one test where it mattered, do you want it for all tests? |
| //@ ignore-compare-mode-next-solver (explicit revisions) | ||
| //@ [next] compile-flags: -Znext-solver | ||
|
|
||
| trait Trait { |
There was a problem hiding this comment.
can you also add #[rustc_no_implicit_bounds] to all of the other "do we try to normalize aliases tests"?
There was a problem hiding this comment.
alright, I've added it for the tests modified/added/moved in this PR.
There were fixed by rust-lang#140672
Another example from rust-lang/trait-system-refactor-initiative#139 and which was likely fixed by rust-lang#140672 as well.
Another example from rust-lang/trait-system-refactor-initiative#139 and which was fixed in 1.89 `nightly-2025-06-18`.
| //[feature]~^^ ERROR: overflow normalizing the type alias `X2` | ||
| //[gated_old,gated_new]~^ ERROR cycle detected when expanding type alias `X1` | ||
| //[feature_old]~^^ ERROR: overflow normalizing the type alias `X2` | ||
| //[feature_new]~^^^ ERROR: type mismatch resolving `X3 normalizes-to _` |
There was a problem hiding this comment.
just a note of the slightly suboptimal diagnostics here compared to the old solver mentioning X1 or X2
|
@bors r+ rollup |
add a few new solver normalization tests As discussed [on zulip](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/ask.20for.20help/near/593097133), this PR adds the handful of new solver revisions and tests from rust-lang/trait-system-refactor-initiative#139. Most cases that issue mentions were already fixed by rust-lang#140672 in 1.88, and some cases, we expect, by rust-lang#155767. The issue about defaulted type parameters applies to both solvers and will be tracked in rust-lang#156271 instead. Closes rust-lang/trait-system-refactor-initiative#139. r? lcnr I'm not sure where the best place for the tests would be, do you have a better location in mind?
…uwer Rollup of 10 pull requests Successful merges: - #146273 (lint ImproperCTypes: refactor linting architecture (part 2)) - #154025 (Add `keepalive`, `set_keepalive` to `TcpStream` implementations) - #156024 (CFI: Fix LTO for `#![no_builtins]` crates with CFI) - #156243 (Move CrateInfo computation after codegen_crate) - #154846 (Add better default spans for the `Ty` impl of `QueryKey`) - #155220 (cg_clif: Don't show verbose run-make cmd output for passing tests) - #156204 (Implemented `PathBuf::into_string`) - #156245 (Move invocation_temp into OutputFilenames) - #156250 (add a few new solver normalization tests) - #156265 (Remove unused `ToStableHashKey` impls.)
As discussed on zulip, this PR adds the handful of new solver revisions and tests from rust-lang/trait-system-refactor-initiative#139. Most cases that issue mentions were already fixed by #140672 in 1.88, and some cases, we expect, by #155767.
The issue about defaulted type parameters applies to both solvers and will be tracked in #156271 instead.
Closes rust-lang/trait-system-refactor-initiative#139.
r? lcnr
I'm not sure where the best place for the tests would be, do you have a better location in mind?