rust icon indicating copy to clipboard operation
rust copied to clipboard

remove `sub_relations` from the `InferCtxt`

Open lcnr opened this issue 1 year ago • 21 comments

While doing so, I tried to remove the delay_span_bug in rematch_impl again, which lead me to discover another freshen bug, fixing that one in the second commit. See commit descriptions for the reasoning behind each change.

r? @compiler-errors

lcnr avatar Jan 15 '24 10:01 lcnr

Type relation code was changed

cc @compiler-errors, @lcnr

rustbot avatar Jan 15 '24 10:01 rustbot

@bors try @rust-timer queue

lcnr avatar Jan 15 '24 10:01 lcnr

Awaiting bors try build completion.

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

rust-timer avatar Jan 15 '24 10:01 rust-timer

:hourglass: Trying commit d99a07d58ef3f2b316ca02d2affbf3c385ca7239 with merge 5d004039df46bb665b8ed6385386e3b1b007a6a8...

bors avatar Jan 15 '24 10:01 bors

:sunny: Try build successful - checks-actions Build commit: 5d004039df46bb665b8ed6385386e3b1b007a6a8 (5d004039df46bb665b8ed6385386e3b1b007a6a8)

bors avatar Jan 15 '24 12:01 bors

Queued 5d004039df46bb665b8ed6385386e3b1b007a6a8 with parent 73252d51d13c0e4f872c3c51defcf48174860ef6, future comparison URL. There are currently 3 preceding artifacts in the queue. It will probably take at least ~4.3 hours until the benchmark run finishes.

rust-timer avatar Jan 15 '24 12:01 rust-timer

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

rustbot avatar Jan 15 '24 14:01 rustbot

Finished benchmarking commit (5d004039df46bb665b8ed6385386e3b1b007a6a8): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never @rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.4%, -0.2%] 20
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.2%] 19
All ❌✅ (primary) -0.2% [-0.4%, -0.2%] 20

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [0.8%, 2.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 669.714s -> 667.26s (-0.37%) Artifact size: 308.18 MiB -> 308.20 MiB (0.01%)

rust-timer avatar Jan 15 '24 17:01 rust-timer

@craterbot check

lcnr avatar Jan 16 '24 07:01 lcnr

:ok_hand: Experiment pr-119989 created and queued. :robot: Automatically detected try build 5d004039df46bb665b8ed6385386e3b1b007a6a8 :warning: Try build based on commit d99a07d58ef3f2b316ca02d2affbf3c385ca7239, but latest commit is 344cd47740ee1b600fb67c3c489956d94acdad35. Did you forget to make a new try build? :mag: You can check out the queue and this experiment's details.

:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Jan 16 '24 07:01 craterbot

:construction: Experiment pr-119989 is now running

:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Jan 17 '24 14:01 craterbot

:umbrella: The latest upstream changes (presumably #120089) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Jan 18 '24 19:01 bors

:tada: Experiment pr-119989 is completed! :bar_chart: 53 regressed and 5 fixed (408433 total) :newspaper: Open the full report.

:warning: If you notice any spurious failure please add them to the blacklist! :information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Jan 19 '24 09:01 craterbot

@craterbot check p=1 crates=https://crater-reports.s3.amazonaws.com/pr-119989/retry-regressed-list.txt

lcnr avatar Jan 19 '24 13:01 lcnr

:ok_hand: Experiment pr-119989-1 created and queued. :robot: Automatically detected try build 5d004039df46bb665b8ed6385386e3b1b007a6a8 :warning: Try build based on commit d99a07d58ef3f2b316ca02d2affbf3c385ca7239, but latest commit is 42a38164e6e5cb4905fff380760bfd6437813c54. Did you forget to make a new try build? :mag: You can check out the queue and this experiment's details.

:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Jan 19 '24 13:01 craterbot

one of the regression is a (slightly more sensible looking) variant of

fn main() {
    let x = &Default::default();
    let mut y = x;
    y = &x;
    let _: &usize = x;
}

I still think we should land this and hope that the actual regression count isn't too big.

lcnr avatar Jan 19 '24 14:01 lcnr

:construction: Experiment pr-119989-1 is now running

:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Jan 21 '24 02:01 craterbot

:tada: Experiment pr-119989-1 is completed! :bar_chart: 8 regressed and 0 fixed (53 total) :newspaper: Open the full report.

:warning: If you notice any spurious failure please add them to the blacklist! :information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Jan 21 '24 04:01 craterbot

alright: we have the following regressions:

paint

https://github.com/DeMille/paint and https://crates.io/crates/paint/0.1.0

fn parse_selection(lines: Option<&str>) -> Option<(usize, usize)> {
    match lines {
        None => None,
        Some(s) => {
            let ns = s.split('-').map(|n| n.parse().unwrap()).collect::<Vec<_>>();
            let start = ns.get(0).expect("Problem parsing selection number");
            let end = ns.get(1).unwrap_or(&start);
            // Fixed by changing this to `unwrap_or(start);`

            // This incorrectly equates `&start` with `ns.get(1)`.
            // Previously failed as `start` and `ns.get(1)` shared
            // a subtype, resulting in an occurs check failure and an
            // auto-deref step.

            Some((*start,  *end))
        }
    }
}

lu_packets

https://github.com/lcdr/lu_packets

caused by https://github.com/rust-lang/rust/issues/120371. A change in the StableCrateId ends up changing the order of impls which now causes overflow when building the specialization graph. Adding the following to the Cargo.toml file causes this crate to fail with overflow with the current nightly:

[profile.dev]
codegen-units = 1 # You may have to try a few numbers until you get a bad ordering

lasso with the serialize feature enabled

https://github.com/Kixiron/lasso

fn ret_string() -> &'static str {
    let slice = &[];
    
    let temp = if false {
        slice[0]
    } else {
        unsafe { slice.get_unchecked(0) }
        // Fixed by changing it to `*slice.get_unchecked(0)`.
        //
        // This again relies on a relate failure resulting in an auto-deref step.
    };

    temp
}

lcnr avatar Jan 22 '24 10:01 lcnr

This PR removes the sub_relations from the InferCtxt. sub_relations was used to more eagerly detect cyclic types of infinite size which are caused indirectly due to subtyping.

To summarize: when instantiating an inference variable ?0 with Rigid<Arg1, Arg2> we first generalize Rigid and then store the generalized type it in the type variable table for ?0. While generalizing, we check whether ?0 would end up resolving to a type containing itself, e.g. ?0 == Vec<?0>. If so, we fail to relate and return an error.

Right now, we use the sub_relations to remember type inference variables which are related via subtyping, even if they are not equal. If we relate ?a with Vec<?b> where ?a and ?b are subtypes of another, we also eagerly fail. This is correct as subtyping does not impact rigid types. This makes it both a bit easier to emit useful error messages and the earlier relate failures can impact coercions, auto-deref, or any other kind of candidate selection.

Why I want to remove them

There are multiple reasons to remove the sub_relations. They add unnecessary complexity to our core type system and are currently not handled correctly by the cache (rematch can happen in a probe in which case this span_delayed_bug could cause an ICE)

https://github.com/rust-lang/rust/blob/1fc46f3a8f12622c077f533da9e6dc3c227bbbb2/compiler/rustc_trait_selection/src/traits/select/mod.rs#L2411-L2426

It also adds an issue for canonicalization. Tracking sub_relations during canonicalization adds complexity and a significant perf cost. Not tracking sub_relations means that just because we were able to unify types inside of a canonical query, we still don't know whether we can do so in the callers scope. This causes issues for the new solver:

The fix for case 3 of https://github.com/rust-lang/trait-system-refactor-initiative/issues/8 relies on us being able to differentiate between rigid and non-rigid aliases when instantiating inference variables. This is possible inside of AliasRelate, but we are unable to access this information if we have to use a type relation on the returned inference contraints from canonical queries. Not using equate when instantiating canonical queries - skipping over some subtleties here - also greatly simplifies the code https://github.com/rust-lang/rust/commit/c9a2563a1ff3a5897f0e6502318fa957fba52177. Will explain this in more detail after fully implementing that new approach in the new solver. This has been partially implemented in #119106.

Impact of removing them

It slightly worsens some error messages, though we can get pretty close to the original quality by improving the overflow mesages. It also breaks 2 crates, see the above comments. I consider this breakage to be acceptable and would like to go ahead with this PR. I will open PRs fixing the affected crates before merging this.

@rfcbot fcp merge

lcnr avatar Jan 26 '24 13:01 lcnr

Team member @lcnr has proposed to merge this. The next step is review by the rest of the tagged team members:

  • [x] @BoxyUwU
  • [ ] @aliemjay
  • [x] @compiler-errors
  • [x] @jackh726
  • [x] @lcnr
  • [ ] @nikomatsakis
  • [x] @oli-obk
  • [x] @spastorino

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

rfcbot avatar Jan 26 '24 13:01 rfcbot

:bell: This is now entering its final comment period, as per the review above. :bell:

rfcbot avatar Feb 05 '24 15:02 rfcbot

:umbrella: The latest upstream changes (presumably #120715) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Feb 06 '24 21:02 bors

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

rfcbot avatar Feb 15 '24 15:02 rfcbot

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_1988028f-bbf5-4c6b-9a5d-8b3bf8b2544a
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=sub_relations-bye-bye
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_1988028f-bbf5-4c6b-9a5d-8b3bf8b2544a
GITHUB_REF=refs/pull/119989/merge
GITHUB_REF_NAME=119989/merge
GITHUB_REF_PROTECTED=false
---
#12 writing image sha256:e76972112c100486232aaf77e855450467e06c9dda15b3a20a9e4d8dfda7c1b9 done
#12 naming to docker.io/library/rust-ci done
#12 DONE 10.3s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Thu Feb 15 17:29:06 UTC 2024
  network time: Thu, 15 Feb 2024 17:29:07 GMT
  network time: Thu, 15 Feb 2024 17:29:07 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
diff of stderr:

2   --> $DIR/issue-62742.rs:4:5
3    |
4 LL |     WrongImpl::foo(0i32);
-    |     ^^^^^^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>`
+    |     ^^^^^^^^^^^^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>`
6    |
7    = help: the trait `Raw<[_]>` is implemented for `RawImpl<_>`
8 note: required by a bound in `SafeImpl::<T, A>::foo`

26 LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
27    |                                   ^^^^^^ required by this bound in `SafeImpl`
28 
- error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
-    |
-    |
- LL |     WrongImpl::foo(0i32);
-    |     ^^^^^^^^^^^^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>`
-    |
-    = help: the trait `Raw<[_]>` is implemented for `RawImpl<_>`
- 
37 error[E0599]: the function or associated item `foo` exists for struct `SafeImpl<(), RawImpl<()>>`, but its trait bounds were not satisfied
39    |


73 LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
74    |                                   ^^^^^^ required by this bound in `SafeImpl`
- error: aborting due to 5 previous errors
+ error: aborting due to 4 previous errors
77 
78 Some errors have detailed explanations: E0277, E0599.
---
To only update this specific test, also pass `--test-args impl-trait/issues/issue-62742.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/issues/issue-62742.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/issues/issue-62742" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/issues/issue-62742/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
   |
   |
LL |     WrongImpl::foo(0i32);
   |     ^^^^^^^^^^^^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>`
   |
   = help: the trait `Raw<[_]>` is implemented for `RawImpl<_>`
note: required by a bound in `SafeImpl::<T, A>::foo`
   |
   |
LL | impl<T: ?Sized, A: Raw<T>> SafeImpl<T, A> {
   |                    ^^^^^^ required by this bound in `SafeImpl::<T, A>::foo`
LL |     pub fn foo(value: A::Value) {}


error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
   |
   |
LL |     WrongImpl::foo(0i32);
   |     ^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>`
   |
   = help: the trait `Raw<[_]>` is implemented for `RawImpl<_>`
note: required by a bound in `SafeImpl`
   |
   |
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   |                                   ^^^^^^ required by this bound in `SafeImpl`

error[E0599]: the function or associated item `foo` exists for struct `SafeImpl<(), RawImpl<()>>`, but its trait bounds were not satisfied
   |
   |
LL |     WrongImpl::<()>::foo(0i32);
   |                      ^^^ function or associated item cannot be called on `SafeImpl<(), RawImpl<()>>` due to unsatisfied trait bounds
...
LL | pub struct RawImpl<T>(PhantomData<T>);
   | --------------------- doesn't satisfy `RawImpl<()>: Raw<()>`
...
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   | ----------------------------------------- function or associated item `foo` not found for this struct
   |
note: trait bound `RawImpl<()>: Raw<()>` was not satisfied
   |
   |
LL | impl<T: ?Sized, A: Raw<T>> SafeImpl<T, A> {
   |                    ^^^^^^  --------------
   |                    unsatisfied trait bound introduced here
note: the trait `Raw` must be implemented
  --> /checkout/tests/ui/impl-trait/issues/issue-62742.rs:14:1
   |
   |
LL | pub trait Raw<T: ?Sized> {


error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied
   |
   |
LL |     WrongImpl::<()>::foo(0i32);
   |     ^^^^^^^^^^^^^^^ the trait `Raw<()>` is not implemented for `RawImpl<()>`
   |
   = help: the trait `Raw<[()]>` is implemented for `RawImpl<()>`
   = help: for that trait implementation, expected `[()]`, found `()`
note: required by a bound in `SafeImpl`
   |
   |
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   |                                   ^^^^^^ required by this bound in `SafeImpl`
error: aborting due to 4 previous errors

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.

rust-log-analyzer avatar Feb 15 '24 17:02 rust-log-analyzer

opened PRs fixing the regression to the two affected crates, this should now be ready for merge

lcnr avatar Feb 15 '24 18:02 lcnr

:umbrella: The latest upstream changes (presumably #120881) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Feb 16 '24 23:02 bors

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_e5566d54-148b-49d3-b0b1-ae567761d71f
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=sub_relations-bye-bye
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_e5566d54-148b-49d3-b0b1-ae567761d71f
GITHUB_REF=refs/pull/119989/merge
GITHUB_REF_NAME=119989/merge
GITHUB_REF_PROTECTED=false
---
#12 writing image sha256:7e859f154a56accc04811e70f968fe4640207fd8ca752fe3c826dd9add60a17c done
#12 naming to docker.io/library/rust-ci done
#12 DONE 10.1s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Mon Feb 19 10:20:43 UTC 2024
  network time: Mon, 19 Feb 2024 10:20:43 GMT
  network time: Mon, 19 Feb 2024 10:20:43 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
3    |
4 LL | type Loop = Loop;

6    |
7    = note: in case this is a recursive type alias, consider using a struct, enum, or union instead
- error[E0275]: overflow evaluating the requirement `Loop`
+ error[E0275]: overflow normalizing the type alias `Loop`
10   --> $DIR/inherent-impls-overflow.rs:9:1
11    |
11    |
12 LL | impl Loop {}

14    |
15    = note: in case this is a recursive type alias, consider using a struct, enum, or union instead
16 
- error[E0275]: overflow evaluating the requirement `Poly0<((((((...,),),),),),)>`
+ error[E0275]: overflow normalizing the type alias `Poly0<(((((((...,),),),),),),)>`
19    |
19    |
20 LL | type Poly0<T> = Poly1<(T,)>;
22    |
22    |
23    = note: in case this is a recursive type alias, consider using a struct, enum, or union instead
24 
- error[E0275]: overflow evaluating the requirement `Poly1<((((((...,),),),),),)>`
+ error[E0275]: overflow normalizing the type alias `Poly1<(((((((...,),),),),),),)>`
27    |
27    |
28 LL | type Poly1<T> = Poly0<(T,)>;
30    |
30    |
31    = note: in case this is a recursive type alias, consider using a struct, enum, or union instead
32 
- error[E0275]: overflow evaluating the requirement `Poly1<((((((...,),),),),),)>`
+ error[E0275]: overflow normalizing the type alias `Poly1<(((((((...,),),),),),),)>`
35    |
35    |
36 LL | impl Poly0<()> {}

The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lazy-type-alias/inherent-impls-overflow.classic/inherent-impls-overflow.classic.stderr
To only update this specific test, also pass `--test-args lazy-type-alias/inherent-impls-overflow.rs`


error in revision `classic`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "classic" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lazy-type-alias/inherent-impls-overflow.classic" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lazy-type-alias/inherent-impls-overflow.classic/auxiliary"
--- stderr -------------------------------
error[E0275]: overflow normalizing the type alias `Loop`
##[error]  --> /checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs:7:13
   |
   |
LL | type Loop = Loop; //[classic]~ ERROR overflow evaluating the requirement
   |
   |
   = note: in case this is a recursive type alias, consider using a struct, enum, or union instead
error[E0275]: overflow normalizing the type alias `Loop`
##[error]  --> /checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs:9:1
   |
   |
LL | impl Loop {} //~ ERROR overflow evaluating the requirement
   |
   |
   = note: in case this is a recursive type alias, consider using a struct, enum, or union instead

error[E0275]: overflow normalizing the type alias `Poly0<(((((((...,),),),),),),)>`
   |
   |
LL | type Poly0<T> = Poly1<(T,)>;
   |
   |
   = note: in case this is a recursive type alias, consider using a struct, enum, or union instead

error[E0275]: overflow normalizing the type alias `Poly1<(((((((...,),),),),),),)>`
   |
   |
LL | type Poly1<T> = Poly0<(T,)>;
   |
   |
   = note: in case this is a recursive type alias, consider using a struct, enum, or union instead

error[E0275]: overflow normalizing the type alias `Poly1<(((((((...,),),),),),),)>`
   |
   |
LL | impl Poly0<()> {} //~ ERROR overflow evaluating the requirement
   |
   |
   = note: in case this is a recursive type alias, consider using a struct, enum, or union instead
error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0275`.
------------------------------------------

rust-log-analyzer avatar Feb 19 '24 10:02 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #120463) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Feb 19 '24 18:02 bors

:umbrella: The latest upstream changes (presumably #121211) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Feb 20 '24 00:02 bors