Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always define opaque types outside of trait solver #113572

Closed
wants to merge 1 commit into from

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jul 11, 2023

this matches the intended behavior of the new solver, mostly opening for crater and for some ideas on how to deal with the remaining breakage.

r? @oli-obk @compiler-errors

@lcnr
Copy link
Contributor Author

lcnr commented Jul 11, 2023

@bors try

@rustbot rustbot 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 11, 2023
@bors
Copy link
Contributor

bors commented Jul 11, 2023

⌛ Trying commit 3811f6e with merge 06e92b163d8046d03c6b297a1235f10cd6c3a734...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
##[group]Run git config --global core.autocrlf false
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
  lfs: false
  submodules: false
  set-safe-directory: true
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
##[group]Run src/ci/scripts/setup-environment.sh
src/ci/scripts/setup-environment.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
##[group]Run src/ci/scripts/should-skip-this.sh
src/ci/scripts/should-skip-this.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
##[group]Run src/ci/scripts/verify-channel.sh
src/ci/scripts/verify-channel.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/collect-cpu-stats.sh
src/ci/scripts/collect-cpu-stats.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
##[group]Run src/ci/scripts/install-sccache.sh
src/ci/scripts/install-sccache.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/select-xcode.sh
src/ci/scripts/select-xcode.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/install-clang.sh
src/ci/scripts/install-clang.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/install-wix.sh
src/ci/scripts/install-wix.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/disable-git-crlf-conversion.sh
src/ci/scripts/disable-git-crlf-conversion.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
##[group]Run src/ci/scripts/install-msys2.sh
src/ci/scripts/install-msys2.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/install-mingw.sh
src/ci/scripts/install-mingw.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/install-ninja.sh
src/ci/scripts/install-ninja.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/enable-docker-ipv6.sh
src/ci/scripts/enable-docker-ipv6.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
##[group]Run src/ci/scripts/disable-git-crlf-conversion.sh
src/ci/scripts/disable-git-crlf-conversion.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/verify-line-endings.sh
src/ci/scripts/verify-line-endings.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  IMAGE: x86_64-gnu-tools
##[endgroup]
##[group]Run src/ci/scripts/verify-backported-commits.sh
src/ci/scripts/verify-backported-commits.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
##[group]Run src/ci/scripts/verify-stable-version-number.sh
src/ci/scripts/verify-stable-version-number.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
##[group]Run src/ci/scripts/run-build-from-ci.sh
src/ci/scripts/run-build-from-ci.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  PR_CI_JOB: 1
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
  HEAD_SHA: 3811f6ef1cff738b7ffc46544b4a10a5922f0a31
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
---
   Compiling tracing-tree v0.2.3
error[E0284]: type annotations needed
   --> compiler/rustc_data_structures/src/obligation_forest/mod.rs:362:63
    |
362 |                     None => self.obligation_tree_id_generator.next().unwrap(),
    |
    |
    = note: cannot satisfy `<_ as Iterator>::Item == ObligationTreeId`
    |
    |
362 |                     None => <Self as Iterator>::next(self.obligation_tree_id_generator).unwrap(),

   Compiling rustc_log v0.0.0 (/checkout/compiler/rustc_log)
For more information about this error, try `rustc --explain E0284`.
error: could not compile `rustc_data_structures` (lib) due to previous error

@bors
Copy link
Contributor

bors commented Jul 11, 2023

💔 Test failed - checks-actions

@bors bors 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 Jul 11, 2023
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    # Available options: fast, balanced, best
    compression-profile = 'balanced'
    
    
[2023-07-11T12:45:18.332Z INFO  opt_dist] Skipping building of unimportant components for a try build
[2023-07-11T12:45:18.332Z INFO  opt_dist::utils::io] Copying directory /tmp/rustc-perf to /tmp/tmp-multistage/opt-artifacts/rustc-perf
[2023-07-11T12:45:18.825Z INFO  opt_dist::exec] Executing `RUSTC=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc RUSTC_BOOTSTRAP=1 /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build -p collector [at /tmp/tmp-multistage/opt-artifacts/rustc-perf]`
    Updating crates.io index
    Updating git repository `https://github.com/rust-lang/measureme`
---
[RUSTC-TIMING] yoke test:false 0.196
error[E0284]: type annotations needed
   --> compiler/rustc_data_structures/src/obligation_forest/mod.rs:362:63
    |
362 |                     None => self.obligation_tree_id_generator.next().unwrap(),
    |
    |
    = note: cannot satisfy `<_ as Iterator>::Item == ObligationTreeId`
    |
    |
362 |                     None => <Self as Iterator>::next(self.obligation_tree_id_generator).unwrap(),

   Compiling tracing-tree v0.2.3
   Compiling rustc_log v0.0.0 (/checkout/compiler/rustc_log)
[RUSTC-TIMING] regex test:false 7.938
---
Caused by:
    Command RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --rust-profile-generate /tmp/tmp-multistage/opt-artifacts/rustc-pgo [at /checkout/obj] has failed with exit code Some(1)

Stack backtrace:
   0: <opt_dist::exec::CmdBuilder>::run
             at /rustc/06e92b163d8046d03c6b297a1235f10cd6c3a734/src/tools/opt-dist/src/exec.rs:78:17
   1: <opt_dist::exec::Bootstrap>::run
             at /rustc/06e92b163d8046d03c6b297a1235f10cd6c3a734/src/tools/opt-dist/src/exec.rs:164:9
   2: opt_dist::execute_pipeline::{closure#0}::{closure#0}
             at /rustc/06e92b163d8046d03c6b297a1235f10cd6c3a734/src/tools/opt-dist/src/main.rs:39:13
      <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#0}::{closure#0}, ()>
             at /rustc/06e92b163d8046d03c6b297a1235f10cd6c3a734/src/tools/opt-dist/src/timer.rs:111:22
      opt_dist::execute_pipeline::{closure#0}
             at /rustc/06e92b163d8046d03c6b297a1235f10cd6c3a734/src/tools/opt-dist/src/main.rs:38:9
      <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#0}, opt_dist::training::RustcPGOProfile>
             at /rustc/06e92b163d8046d03c6b297a1235f10cd6c3a734/src/tools/opt-dist/src/timer.rs:111:22
   3: opt_dist::execute_pipeline
             at /rustc/06e92b163d8046d03c6b297a1235f10cd6c3a734/src/tools/opt-dist/src/main.rs:35:29
             at /rustc/06e92b163d8046d03c6b297a1235f10cd6c3a734/src/tools/opt-dist/src/main.rs:169:18
   4: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/eff24c06d8f4397802b546aa2e52450e1022fc02/library/core/src/ops/function.rs:250:5
             at /rustc/eff24c06d8f4397802b546aa2e52450e1022fc02/library/core/src/ops/function.rs:250:5
      std::sys_common::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
   5: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/eff24c06d8f4397802b546aa2e52450e1022fc02/library/std/src/rt.rs:166:18
             at /rustc/eff24c06d8f4397802b546aa2e52450e1022fc02/library/std/src/rt.rs:166:18
   6: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
      std::panicking::try::do_call
             at /rustc/eff24c06d8f4397802b546aa2e52450e1022fc02/library/std/src/panicking.rs:500:40
      std::panicking::try
             at /rustc/eff24c06d8f4397802b546aa2e52450e1022fc02/library/std/src/panicking.rs:464:19

@lcnr
Copy link
Contributor Author

lcnr commented Jul 11, 2023

this fails because the following pattern stops working:

#![feature(type_alias_impl_trait)]
fn main() {
    assert_eq!(foo().to_string(), "foo");
}

type Foo = impl std::fmt::Display;
fn foo() -> Foo {
    "foo"
}

not yet 100% sure why

@bors
Copy link
Contributor

bors commented Jul 13, 2023

☔ The latest upstream changes (presumably #113637) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC
Copy link
Member

@lcnr any updates on that?

@lcnr
Copy link
Contributor Author

lcnr commented Sep 12, 2023

closing as it causes significant breakage and undesirable behavior

@lcnr lcnr closed this Sep 12, 2023
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. labels Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants