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

bootstrap: Add and use -Z absolute-file-paths #112812

Closed
wants to merge 2 commits into from

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jun 19, 2023

It's unfortunate that this hack is necessary. A short summary of the background here:

  • Rust-Analyzer uses x check --json-output to show red underlines in the editor.
  • There are several different Cargo workspaces in rust-lang/rust, including src/bootstrap and src/tools/miri.
  • Cargo runs each invocation of rustc relative to the workspace, not to the current working directory of cargo itself.
  • Rustc prints file paths relative to its current working directory. As a result, it would print things like config.rs:43:14 instead of src/bootstrap/config.rs.

This adds a new flag to rustc to print the files as an absolute path instead of a relative path. I went with this approach instead of one of the wrapping tools for the following reasons:

  1. Cargo considers changing the working directory to be a breaking change:
    Using --manifest-path, the filenames in error messages are relative to the manifest, not the current working directory cargo#11007 (comment). They have open feature
    requests for adding a flag to print absolute paths, but none have been implemented.
  2. Bootstrap would potentially be able to parse and rewrite the paths that cargo emits, but I don't
    want to hard-code Cargo's JSON output format in both bootstrap.py and rustbuild; unlike rustbuild,
    bootstrap.py can't use cargo_metadata as a library.
  3. Rust-Analyzer could potentially rewrite this output, but that wouldn't fix ctrl+click on the relative path when someone runs cargo check.

In addition to adding and using the new flag, this also adds local_rebuild detection to bootstrap.py, so that I could test the change.

Before:

error[E0425]: cannot find value `MIRI_DEFAULT_ARGS` in crate `miri`
   --> src/bin/miri.rs:269:33
    |
269 |         args.splice(1..1, miri::MIRI_DEFAULT_ARGS.iter().map(ToString::to_string));
    |                                 ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `MIRI_DEFLT_ARGS`
    |
   ::: src/lib.rs:128:1
    |
128 | pub const MIRI_DEFLT_ARGS: &[&str] = &[
    | ---------------------------------- similarly named constant `MIRI_DEFLT_ARGS` defined here

After:

error[E0425]: cannot find value `MIRI_DEFAULT_ARGS` in crate `miri`
   --> /home/jyn/src/rust/src/tools/miri/src/bin/miri.rs:269:33
    |
269 |         args.splice(1..1, miri::MIRI_DEFAULT_ARGS.iter().map(ToString::to_string));
    |                                 ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `MIRI_DEFLT_ARGS`
    |
   ::: /home/jyn/src/rust/src/tools/miri/src/lib.rs:128:1
    |
128 | pub const MIRI_DEFLT_ARGS: &[&str] = &[
    | ---------------------------------- similarly named constant `MIRI_DEFLT_ARGS` defined here

Fixes #80541 and https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/missing.20errors.20for.20bootstrap.20itself.


I am not convinced this is the right approach; i could be convinced to make the change in cargo instead, but it was easier to do this than to wait the 6 weeks.

It's unfortunate that this hack is necessary. A short summary of the background here:
- Rust-Analyzer uses `x check --json-output` to show red underlines in the editor.
- There are several different Cargo workspaces in rust-lang/rust, including src/bootstrap and src/tools/miri.
- Cargo runs each invocation of rustc relative to the *workspace*, not to the current working directory of cargo itself.
- Rustc prints file paths relative to its current working directory. As a result, it would print things like `config.rs:43:14` instead of `src/bootstrap/config.rs`.

This adds a new flag to rustc to print the files as an absolute path instead of a relative path. I went with this approach instead of one of the wrapping tools for the following reasons:
1. Cargo considers changing the working directory to be a breaking change:
   rust-lang/cargo#11007 (comment). They have open feature
   requests for adding a flag to print absolute paths, but none have been implemented.
2. Bootstrap would potentially be able to parse and rewrite the paths that cargo emits, but I don't
   want to hard-code Cargo's JSON output format in both bootstrap.py and rustbuild; unlike rustbuild,
   bootstrap.py can't use `cargo_metadata` as a library.
3. Rust-Analyzer could potentially rewrite this output, but that wouldn't fix ctrl+click on the relative path when someone runs `cargo check`.

In addition to adding and using the new flag, this also adds `local_rebuild` detection to bootstrap.py, so that I could test the change.

Before:
```
error[E0425]: cannot find value `MIRI_DEFAULT_ARGS` in crate `miri`
   --> src/bin/miri.rs:269:33
    |
269 |         args.splice(1..1, miri::MIRI_DEFAULT_ARGS.iter().map(ToString::to_string));
    |                                 ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `MIRI_DEFLT_ARGS`
    |
   ::: src/lib.rs:128:1
    |
128 | pub const MIRI_DEFLT_ARGS: &[&str] = &[
    | ---------------------------------- similarly named constant `MIRI_DEFLT_ARGS` defined here
```

After:
```
error[E0425]: cannot find value `MIRI_DEFAULT_ARGS` in crate `miri`
   --> /home/jyn/src/rust/src/tools/miri/src/bin/miri.rs:269:33
    |
269 |         args.splice(1..1, miri::MIRI_DEFAULT_ARGS.iter().map(ToString::to_string));
    |                                 ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `MIRI_DEFLT_ARGS`
    |
   ::: /home/jyn/src/rust/src/tools/miri/src/lib.rs:128:1
    |
128 | pub const MIRI_DEFLT_ARGS: &[&str] = &[
    | ---------------------------------- similarly named constant `MIRI_DEFLT_ARGS` defined here
```
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2023

r? @ozkanonur

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 19, 2023
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
........................................................................................ 13112/15177
........................................................................................ 13200/15177
.....................................................................................i.. 13288/15177
........i........i.....i..........................i..................................... 13376/15177
.....................................................................FF.FF..F.F......... 13464/15177
........................................................................................ 13640/15177
........................................................................................ 13728/15177
........................................................................................ 13816/15177
........................................................................................ 13904/15177
---

---- [ui] tests/ui/chalkify/bugs/async.rs stdout ----
diff of stderr:

7    = help: the trait `Future` is not implemented for `[async fn body@$DIR/async.rs:23:29: 25:2]`
8    = note: [async fn body@$DIR/async.rs:23:29: 25:2] must be a future or must implement `IntoFuture` to be awaited
9 
- error: internal compiler error: projection clauses should be implied from elsewhere. obligation: `Obligation(predicate=Binder(ProjectionPredicate(AliasTy { substs: [[async fn body@$DIR/async.rs:23:29: 25:2]], def_id: ... }, Term::Ty(u32)), []), depth=0)`
+ error: internal compiler error: /checkout/projection clauses should be implied from elsewhere. obligation: `Obligation(predicate=Binder(ProjectionPredicate(AliasTy { substs: [[async fn body@$DIR/async.rs:23:29: 25:2]], def_id: ... }, Term::Ty(u32)), []), depth=0)`
12    |
12    |
13 LL | async fn foo(x: u32) -> u32 {

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/chalkify/bugs/async/async.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args chalkify/bugs/async.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/chalkify/bugs/async.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--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" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/chalkify/bugs/async" "-A" "unused" "-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/chalkify/bugs/async/auxiliary" "--edition=2021" "-Z" "trait-solver=chalk"
stdout: none
--- stderr -------------------------------
error[E0277]: `[async fn body@fake-test-src-base/chalkify/bugs/async.rs:23:29: 25:2]` is not a future
  --> fake-test-src-base/chalkify/bugs/async.rs:23:25
   |
LL | async fn foo(x: u32) -> u32 {
   |                         ^^^ `[async fn body@fake-test-src-base/chalkify/bugs/async.rs:23:29: 25:2]` is not a future
   |
   = help: the trait `Future` is not implemented for `[async fn body@fake-test-src-base/chalkify/bugs/async.rs:23:29: 25:2]`
   = note: [async fn body@fake-test-src-base/chalkify/bugs/async.rs:23:29: 25:2] must be a future or must implement `IntoFuture` to be awaited

error: internal compiler error: /checkout/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs:1034:25: projection clauses should be implied from elsewhere. obligation: `Obligation(predicate=Binder(ProjectionPredicate(AliasTy { substs: [[async fn body@fake-test-src-base/chalkify/bugs/async.rs:23:29: 25:2]], def_id: DefId(2:12299 ~ core[6da3]::future::future::Future::Output) }, Term::Ty(u32)), []), depth=0)`
  --> fake-test-src-base/chalkify/bugs/async.rs:23:25
   |
LL | async fn foo(x: u32) -> u32 {

thread 'rustc' panicked at 'Box<dyn Any>', /checkout/compiler/rustc_errors/src/lib.rs:994:33
stack backtrace:
stack backtrace:
   0:     0x7f088debb531 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4f985ee459317cfb
   1:     0x7f088df24608 - core::fmt::write::h714589121b173ae8
   2:     0x7f088deafa81 - std::io::Write::write_fmt::h92fa63b8e37c915c
   3:     0x7f088debb341 - std::sys_common::backtrace::print::ha235b388965ec133
   4:     0x7f088debe4da - std::panicking::default_hook::{{closure}}::h90193a0da7568c4e
   5:     0x7f088debe1c3 - std::panicking::default_hook::h69d076a49f034c16
   6:     0x7f088eb813ab - rustc_driver_impl[217a1709490488d1]::install_ice_hook::{closure#0}
   7:     0x7f088debec1e - std::panicking::rust_panic_with_hook::hca4c02b763e54aed
   8:     0x7f0891400083 - std[4d97cbd6ca986589]::panicking::begin_panic::<rustc_errors[cf372328540340af]::ExplicitBug>::{closure#0}
   9:     0x7f08913d2106 - std[4d97cbd6ca986589]::sys_common::backtrace::__rust_end_short_backtrace::<std[4d97cbd6ca986589]::panicking::begin_panic<rustc_errors[cf372328540340af]::ExplicitBug>::{closure#0}, !>
  10:     0x7f088ea7e046 - std[4d97cbd6ca986589]::panicking::begin_panic::<rustc_errors[cf372328540340af]::ExplicitBug>
  11:     0x7f0891318711 - <rustc_errors[cf372328540340af]::HandlerInner>::span_bug::<rustc_span[cf1322ffcf42cf10]::span_encoding::Span, alloc[5dbc674ca53e0f7f]::string::String>
  12:     0x7f0891318520 - <rustc_errors[cf372328540340af]::Handler>::span_bug::<rustc_span[cf1322ffcf42cf10]::span_encoding::Span, alloc[5dbc674ca53e0f7f]::string::String>
  13:     0x7f08914001f8 - rustc_middle[a9dece272f2f9f57]::util::bug::opt_span_bug_fmt::<rustc_span[cf1322ffcf42cf10]::span_encoding::Span>::{closure#0}
  14:     0x7f089140047c - rustc_middle[a9dece272f2f9f57]::ty::context::tls::with_opt::<rustc_middle[a9dece272f2f9f57]::util::bug::opt_span_bug_fmt<rustc_span[cf1322ffcf42cf10]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  15:     0x7f08913edba4 - rustc_middle[a9dece272f2f9f57]::ty::context::tls::with_context_opt::<rustc_middle[a9dece272f2f9f57]::ty::context::tls::with_opt<rustc_middle[a9dece272f2f9f57]::util::bug::opt_span_bug_fmt<rustc_span[cf1322ffcf42cf10]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  16:     0x7f088ea85f47 - rustc_middle[a9dece272f2f9f57]::util::bug::span_bug_fmt::<rustc_span[cf1322ffcf42cf10]::span_encoding::Span>
  17:     0x7f089155ae1b - <rustc_infer[60e53cfe9e855a14]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[e086531144a8ff43]::traits::error_reporting::TypeErrCtxtExt>::report_selection_error
  18:     0x7f089156a2a7 - <rustc_infer[60e53cfe9e855a14]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[e086531144a8ff43]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  19:     0x7f08915569bb - <rustc_infer[60e53cfe9e855a14]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[e086531144a8ff43]::traits::error_reporting::TypeErrCtxtExt>::report_fulfillment_errors
  20:     0x7f088f08da00 - <rustc_hir_typeck[e3b3a9417027b08a]::fn_ctxt::FnCtxt>::check_return_expr
  21:     0x7f088f26bca2 - rustc_hir_typeck[e3b3a9417027b08a]::check::check_fn
  22:     0x7f088f245d8c - rustc_hir_typeck[e3b3a9417027b08a]::typeck
  23:     0x7f08906144cc - rustc_query_impl[3285e407dde38e16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3285e407dde38e16]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 8usize]>>
  24:     0x7f089085bfec - <rustc_query_impl[3285e407dde38e16]::query_impl::typeck::dynamic_query::{closure#2} as core[6da36a599f6b2f1a]::ops::function::FnOnce<(rustc_middle[a9dece272f2f9f57]::ty::context::TyCtxt, rustc_span[cf1322ffcf42cf10]::def_id::LocalDefId)>>::call_once
  25:     0x7f089081d188 - rustc_query_system[beb7e899e22b78d5]::query::plumbing::try_execute_query::<rustc_query_impl[3285e407dde38e16]::DynamicConfig<rustc_query_system[beb7e899e22b78d5]::query::caches::VecCache<rustc_span[cf1322ffcf42cf10]::def_id::LocalDefId, rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[3285e407dde38e16]::plumbing::QueryCtxt, false>
  26:     0x7f08908976e6 - rustc_query_impl[3285e407dde38e16]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7f088f50d929 - rustc_middle[a9dece272f2f9f57]::query::plumbing::query_get_at::<rustc_query_system[beb7e899e22b78d5]::query::caches::VecCache<rustc_span[cf1322ffcf42cf10]::def_id::LocalDefId, rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 8usize]>>>
  28:     0x7f088f528bc0 - rustc_hir_analysis[6e819ee4b092c14a]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
  29:     0x7f088f4004a0 - rustc_hir_analysis[6e819ee4b092c14a]::collect::type_of::type_of
  30:     0x7f089061450e - rustc_query_impl[3285e407dde38e16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3285e407dde38e16]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 8usize]>>
  31:     0x7f089085c4b0 - <rustc_query_impl[3285e407dde38e16]::query_impl::type_of::dynamic_query::{closure#2} as core[6da36a599f6b2f1a]::ops::function::FnOnce<(rustc_middle[a9dece272f2f9f57]::ty::context::TyCtxt, rustc_span[cf1322ffcf42cf10]::def_id::DefId)>>::call_once
  32:     0x7f08907dcb48 - rustc_query_system[beb7e899e22b78d5]::query::plumbing::try_execute_query::<rustc_query_impl[3285e407dde38e16]::DynamicConfig<rustc_query_system[beb7e899e22b78d5]::query::caches::DefaultCache<rustc_span[cf1322ffcf42cf10]::def_id::DefId, rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[3285e407dde38e16]::plumbing::QueryCtxt, false>
  33:     0x7f0890892067 - rustc_query_impl[3285e407dde38e16]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  34:     0x7f088f43bb5d - rustc_middle[a9dece272f2f9f57]::query::plumbing::query_get_at::<rustc_query_system[beb7e899e22b78d5]::query::caches::DefaultCache<rustc_span[cf1322ffcf42cf10]::def_id::DefId, rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 8usize]>>>
  35:     0x7f088f448591 - rustc_hir_analysis[6e819ee4b092c14a]::check::check::check_opaque
  36:     0x7f088f44e305 - rustc_hir_analysis[6e819ee4b092c14a]::check::check::check_item_type
  37:     0x7f088f458cda - rustc_hir_analysis[6e819ee4b092c14a]::check::check::check_mod_item_types
  38:     0x7f089061242c - rustc_query_impl[3285e407dde38e16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3285e407dde38e16]::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 0usize]>>
  39:     0x7f08908e336c - <rustc_query_impl[3285e407dde38e16]::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core[6da36a599f6b2f1a]::ops::function::FnOnce<(rustc_middle[a9dece272f2f9f57]::ty::context::TyCtxt, rustc_span[cf1322ffcf42cf10]::def_id::LocalDefId)>>::call_once
  40:     0x7f0890812bbb - rustc_query_system[beb7e899e22b78d5]::query::plumbing::try_execute_query::<rustc_query_impl[3285e407dde38e16]::DynamicConfig<rustc_query_system[beb7e899e22b78d5]::query::caches::VecCache<rustc_span[cf1322ffcf42cf10]::def_id::LocalDefId, rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[3285e407dde38e16]::plumbing::QueryCtxt, false>
  41:     0x7f0890896f6c - rustc_query_impl[3285e407dde38e16]::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  42:     0x7f088f507b24 - <rustc_middle[a9dece272f2f9f57]::hir::map::Map>::for_each_module::<rustc_hir_analysis[6e819ee4b092c14a]::check_crate::{closure#6}::{closure#0}>
  43:     0x7f088f431de5 - <rustc_session[8034214da584d815]::session::Session>::time::<(), rustc_hir_analysis[6e819ee4b092c14a]::check_crate::{closure#6}>
  44:     0x7f088f50428a - rustc_hir_analysis[6e819ee4b092c14a]::check_crate
  45:     0x7f088eca81d7 - rustc_interface[51df12cd4fcf1785]::passes::analysis
  46:     0x7f089061451a - rustc_query_impl[3285e407dde38e16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3285e407dde38e16]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 1usize]>>
  47:     0x7f08908f3718 - <rustc_query_impl[3285e407dde38e16]::query_impl::analysis::dynamic_query::{closure#2} as core[6da36a599f6b2f1a]::ops::function::FnOnce<(rustc_middle[a9dece272f2f9f57]::ty::context::TyCtxt, ())>>::call_once
  48:     0x7f0890790dde - rustc_query_system[beb7e899e22b78d5]::query::plumbing::try_execute_query::<rustc_query_impl[3285e407dde38e16]::DynamicConfig<rustc_query_system[beb7e899e22b78d5]::query::caches::SingleCache<rustc_middle[a9dece272f2f9f57]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[3285e407dde38e16]::plumbing::QueryCtxt, false>
  49:     0x7f089089241d - rustc_query_impl[3285e407dde38e16]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  50:     0x7f088ec109ad - <rustc_middle[a9dece272f2f9f57]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[217a1709490488d1]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>>
  51:     0x7f088eb98db8 - <rustc_interface[51df12cd4fcf1785]::interface::Compiler>::enter::<rustc_driver_impl[217a1709490488d1]::run_compiler::{closure#1}::{closure#2}, core[6da36a599f6b2f1a]::result::Result<core[6da36a599f6b2f1a]::option::Option<rustc_interface[51df12cd4fcf1785]::queries::Linker>, rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>>
  52:     0x7f088ebeaf40 - rustc_span[cf1322ffcf42cf10]::set_source_map::<core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>, rustc_interface[51df12cd4fcf1785]::interface::run_compiler<core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>, rustc_driver_impl[217a1709490488d1]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  53:     0x7f088eb8d0f9 - <scoped_tls[98e9cbe128012c71]::ScopedKey<rustc_span[cf1322ffcf42cf10]::SessionGlobals>>::set::<rustc_interface[51df12cd4fcf1785]::interface::run_compiler<core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>, rustc_driver_impl[217a1709490488d1]::run_compiler::{closure#1}>::{closure#0}, core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>>
  54:     0x7f088ebf1396 - std[4d97cbd6ca986589]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[51df12cd4fcf1785]::util::run_in_thread_pool_with_globals<rustc_interface[51df12cd4fcf1785]::interface::run_compiler<core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>, rustc_driver_impl[217a1709490488d1]::run_compiler::{closure#1}>::{closure#0}, core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>>
  55:     0x7f088ec10ca6 - std[4d97cbd6ca986589]::panicking::try::<core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>, core[6da36a599f6b2f1a]::panic::unwind_safe::AssertUnwindSafe<<std[4d97cbd6ca986589]::thread::Builder>::spawn_unchecked_<rustc_interface[51df12cd4fcf1785]::util::run_in_thread_pool_with_globals<rustc_interface[51df12cd4fcf1785]::interface::run_compiler<core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>, rustc_driver_impl[217a1709490488d1]::run_compiler::{closure#1}>::{closure#0}, core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>>::{closure#1}::{closure#0}>>
  56:     0x7f088ebb19ff - <<std[4d97cbd6ca986589]::thread::Builder>::spawn_unchecked_<rustc_interface[51df12cd4fcf1785]::util::run_in_thread_pool_with_globals<rustc_interface[51df12cd4fcf1785]::interface::run_compiler<core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>, rustc_driver_impl[217a1709490488d1]::run_compiler::{closure#1}>::{closure#0}, core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[6da36a599f6b2f1a]::result::Result<(), rustc_span[cf1322ffcf42cf10]::ErrorGuaranteed>>::{closure#1} as core[6da36a599f6b2f1a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  57:     0x7f088decb45d - std::sys::unix::thread::Thread::new::thread_start::he376d95b84bfef1b
  58:     0x7f088dc66b43 - <unknown>
  59:     0x7f088dcf8a00 - <unknown>
  60:                0x0 - <unknown>
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.72.0-nightly (73bc04a71 2023-06-19) running on x86_64-unknown-linux-gnu


note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z trait-solver=chalk
query stack during panic:
query stack during panic:
#0 [typeck] type-checking `foo`
#1 [type_of] computing type of `foo::{opaque#0}`
#2 [check_mod_item_types] checking item types in top-level module
#3 [analysis] running analysis passes on this crate
error: aborting due to 2 previous errors

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


---- [ui] tests/ui/hygiene/panic-location.rs stdout ----
diff of run.stderr:

- thread 'main' panicked at 'capacity overflow', library/alloc/src/raw_vec.rs:524:5
+ thread 'main' panicked at 'capacity overflow', /checkout/library/alloc/src/raw_vec.rs:524:5
3 


The actual run.stderr differed from the expected run.stderr.
The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/hygiene/panic-location/panic-location.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/hygiene/panic-location" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/hygiene/panic-location/a"
stdout: none
thread 'main' panicked at 'capacity overflow', /checkout/library/alloc/src/raw_vec.rs:524:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------



---- [ui] tests/ui/impl-trait/normalize-tait-in-const.rs stdout ----
diff of stderr:

- error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:LL:CC: Failed to normalize <for<'a, 'b> fn(&'a Alias<'b>) {foo} as std::ops::FnOnce<(&&S,)>>::Output, maybe try to call `try_normalize_erasing_regions` instead
+ error: internal compiler error: /checkout/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:LL:CC: Failed to normalize <for<'a, 'b> fn(&'a Alias<'b>) {foo} as std::ops::FnOnce<(&&S,)>>::Output, maybe try to call `try_normalize_erasing_regions` instead
3 query stack during panic:
3 query stack during panic:
4 #0 [eval_to_allocation_raw] const-evaluating + checking `BAR`

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/normalize-tait-in-const/normalize-tait-in-const.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args impl-trait/normalize-tait-in-const.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/normalize-tait-in-const.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--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" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/normalize-tait-in-const" "-A" "unused" "-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/normalize-tait-in-const/auxiliary"
stdout: none
--- stderr -------------------------------
error: internal compiler error: /checkout/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:195:90: Failed to normalize <for<'a, 'b> fn(&'a Alias<'b>) {foo} as std::ops::FnOnce<(&&S,)>>::Output, maybe try to call `try_normalize_erasing_regions` instead
thread 'rustc' panicked at 'Box<dyn Any>', /checkout/compiler/rustc_errors/src/lib.rs:1650:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.72.0-nightly (73bc04a71 2023-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [eval_to_allocation_raw] const-evaluating + checking `BAR`
#1 [eval_to_const_value_raw] simplifying constant for the type system `BAR`
error: aborting due to previous error
------------------------------------------



---- [ui] tests/ui/track-diagnostics/track4.rs stdout ----
diff of stderr:

3    |
4 LL | pub onion {
5    |    ^
- -Ztrack-diagnostics: created at compiler/rustc_parse/src/parser/item.rs:LL:CC
+ -Ztrack-diagnostics: created at /checkout/compiler/rustc_parse/src/parser/item.rs:LL:CC
7    |
8 help: add `struct` here to parse `onion` as a public struct


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track4/track4.stderr
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track4/track4.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args track-diagnostics/track4.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/track-diagnostics/track4.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--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" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track4" "-A" "unused" "-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/track-diagnostics/track4/auxiliary" "-Z" "track-diagnostics"
stdout: none
error: missing `struct` for struct definition
  --> fake-test-src-base/track-diagnostics/track4.rs:8:4
   |
   |
LL | pub onion {
-Ztrack-diagnostics: created at /checkout/compiler/rustc_parse/src/parser/item.rs:434:21
   |
   |
help: add `struct` here to parse `onion` as a public struct
   |
LL | pub struct onion {

error: aborting due to previous error
------------------------------------------



---- [ui] tests/ui/track-diagnostics/track.rs stdout ----
diff of stderr:

3    |
4 LL |     break rust
5    |           ^^^^ not found in this scope
- -Ztrack-diagnostics: created at compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
+ -Ztrack-diagnostics: created at /checkout/compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
7 
8 error[E0268]: `break` outside of a loop or labeled block

10    |
11 LL |     break rust
11 LL |     break rust
12    |     ^^^^^^^^^^ cannot `break` outside of a loop or labeled block
- -Ztrack-diagnostics: created at compiler/rustc_passes/src/loops.rs:LL:CC
+ -Ztrack-diagnostics: created at /checkout/compiler/rustc_passes/src/loops.rs:LL:CC
14 
15 error: internal compiler error: It looks like you're trying to break rust; would you like some ICE?


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track/track.stderr
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track/track.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args track-diagnostics/track.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/track-diagnostics/track.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--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" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track" "-A" "unused" "-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/track-diagnostics/track/auxiliary" "-Z" "track-diagnostics"
stdout: none
error[E0425]: cannot find value `rust` in this scope
  --> fake-test-src-base/track-diagnostics/track.rs:10:11
   |
LL |     break rust
LL |     break rust
   |           ^^^^ not found in this scope
-Ztrack-diagnostics: created at /checkout/compiler/rustc_resolve/src/late/diagnostics.rs:334:39

error[E0268]: `break` outside of a loop or labeled block
  --> fake-test-src-base/track-diagnostics/track.rs:10:5
LL |     break rust
LL |     break rust
   |     ^^^^^^^^^^ cannot `break` outside of a loop or labeled block
-Ztrack-diagnostics: created at /checkout/compiler/rustc_passes/src/loops.rs:200:27

error: internal compiler error: It looks like you're trying to break rust; would you like some ICE?
note: the compiler expectedly panicked. this is a feature.


note: we would appreciate a joke overview: https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675
note: rustc 1.72.0-nightly (73bc04a71 2023-06-19) running on x86_64-unknown-linux-gnu

error: aborting due to 3 previous errors

---
---- [ui] tests/ui/track-diagnostics/track3.rs stdout ----
diff of stderr:

3    |
4 LL |     let _unimported = Blah { field: u8 };
5    |                       ^^^^ not found in this scope
- -Ztrack-diagnostics: created at compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
+ -Ztrack-diagnostics: created at /checkout/compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
8 error[E0423]: expected value, found builtin type `u8`
9   --> $DIR/track3.rs:LL:CC

10    |
10    |
11 LL |     let _unimported = Blah { field: u8 };
12    |                                     ^^ not a value
- -Ztrack-diagnostics: created at compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
+ -Ztrack-diagnostics: created at /checkout/compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
15 error: aborting due to 2 previous errors
16 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track3/track3.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args track-diagnostics/track3.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/track-diagnostics/track3.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--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" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track3" "-A" "unused" "-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/track-diagnostics/track3/auxiliary" "-Z" "track-diagnostics"
stdout: none
--- stderr -------------------------------
error[E0422]: cannot find struct, variant or union type `Blah` in this scope
  --> fake-test-src-base/track-diagnostics/track3.rs:9:23
   |
LL |     let _unimported = Blah { field: u8 };
-Ztrack-diagnostics: created at /checkout/compiler/rustc_resolve/src/late/diagnostics.rs:334:39

error[E0423]: expected value, found builtin type `u8`
  --> fake-test-src-base/track-diagnostics/track3.rs:9:37
  --> fake-test-src-base/track-diagnostics/track3.rs:9:37
   |
LL |     let _unimported = Blah { field: u8 };
-Ztrack-diagnostics: created at /checkout/compiler/rustc_resolve/src/late/diagnostics.rs:334:39

error: aborting due to 2 previous errors

---
diff of stderr:

6    |         |        |
7    |         |        value moved here
8    |         value used here after move
- -Ztrack-diagnostics: created at compiler/rustc_borrowck/src/borrowck_errors.rs:LL:CC
+ -Ztrack-diagnostics: created at /checkout/compiler/rustc_borrowck/src/borrowck_errors.rs:LL:CC
11 help: borrow this binding in the pattern to avoid moving the value
12    |



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track2/track2.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args track-diagnostics/track2.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/track-diagnostics/track2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--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" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track2" "-A" "unused" "-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/track-diagnostics/track2/auxiliary" "-Z" "track-diagnostics"
stdout: none
error[E0382]: use of moved value
  --> fake-test-src-base/track-diagnostics/track2.rs:9:9
   |
   |
LL |     let _moved @ _from = String::from("foo");
   |         ^^^^^^   -----   ------------------- move occurs because value has type `String`, which does not implement the `Copy` trait
   |         |        value moved here
   |         value used here after move
   |         value used here after move
-Ztrack-diagnostics: created at /checkout/compiler/rustc_borrowck/src/borrowck_errors.rs:335:9
help: borrow this binding in the pattern to avoid moving the value
   |
   |
LL |     let ref _moved @ ref _from = String::from("foo");

error: aborting due to previous error

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

3    |
4 LL | }
5    | ^ unexpected closing delimiter
- -Ztrack-diagnostics: created at compiler/rustc_parse/src/lexer/tokentrees.rs:LL:CC
+ -Ztrack-diagnostics: created at /checkout/compiler/rustc_parse/src/lexer/tokentrees.rs:LL:CC
8 error: aborting due to previous error
9 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track5/track5.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args track-diagnostics/track5.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/track-diagnostics/track5.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--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" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track5" "-A" "unused" "-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/track-diagnostics/track5/auxiliary" "-Z" "track-diagnostics"
stdout: none
error: unexpected closing delimiter: `}`
  --> fake-test-src-base/track-diagnostics/track5.rs:8:1
   |
LL | }
LL | }
   | ^ unexpected closing delimiter
-Ztrack-diagnostics: created at /checkout/compiler/rustc_parse/src/lexer/tokentrees.rs:202:63
error: aborting due to previous error
------------------------------------------



---- [ui] tests/ui/track-diagnostics/track6.rs stdout ----
diff of stderr:

3    |
4 LL |     default fn bar() {}
5    |     ^^^^^^^^^^^^^^^^^^^
- -Ztrack-diagnostics: created at compiler/rustc_ast_passes/src/feature_gate.rs:LL:CC
+ -Ztrack-diagnostics: created at /checkout/compiler/rustc_ast_passes/src/feature_gate.rs:LL:CC
8    = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
8    = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
9    = help: add `#![feature(specialization)]` to the crate attributes to enable

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track6/track6.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args track-diagnostics/track6.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/track-diagnostics/track6.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--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" "-Cstrip=debuginfo" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track6" "-A" "unused" "-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/track-diagnostics/track6/auxiliary" "-Z" "track-diagnostics"
stdout: none
error[E0658]: specialization is unstable
  --> fake-test-src-base/track-diagnostics/track6.rs:14:5
   |
LL |     default fn bar() {}
LL |     default fn bar() {}
   |     ^^^^^^^^^^^^^^^^^^^
-Ztrack-diagnostics: created at /checkout/compiler/rustc_ast_passes/src/feature_gate.rs:492:13
   |
   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
   = help: add `#![feature(specialization)]` to the crate attributes to enable
error: aborting due to previous error

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

@onur-ozkan
Copy link
Member

due to CI error:

@rustbot author

@rustbot rustbot 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 Jun 20, 2023
@albertlarsan68
Copy link
Member

It seems to me like the first one is a bug in rustc wrt this feature.

Also, tests may need reblessing

@jyn514
Copy link
Member Author

jyn514 commented Jun 25, 2023

i think this should be in cargo and not rustc tbh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

./x.py: cranelift source paths not mapped to repo root
5 participants