Ralf Jung
d0f404d77a
fix IntoIter::drop on high-alignment ZST
2022-12-23 15:18:18 +01:00
bors
62cc869245
Auto merge of #106053 - compiler-errors:incr-test-revision, r=Mark-Simulacrum
...
Take revision into account in non-incremental-mode `// incremental` tests
A UI test I added in #105983 confusingly [failed](https://github.com/rust-lang/rust/pull/106031#issuecomment-1362558067 ) in a merge because two different revisions raced with each other for the same incremental directory for a (non-incremental-mode, i.e. `src/test/ui`) UI test.
Let's take the revision name into account when generating an incremental directory so that other UI tests that combine `// incremental` and `// revisions` won't race and cause possible flakiness in CI.
2022-12-23 13:37:11 +00:00
Michal Nazarewicz
28162ad970
char: µoptimise UTF-16 surrogates decoding
...
According to Godbolt¹, on x86_64 using binary and produces slightly
better code than using subtraction. Readability of both is pretty
much equivalent so might just as well use the shorter option.
¹ https://rust.godbolt.org/z/9jM3ejbMx
2022-12-23 14:15:33 +01:00
gimbles
f8b30084ac
Use DepKind instead of &str
2022-12-23 18:39:49 +05:30
Caio
d4344d2f91
Move tests
2022-12-23 08:05:12 -03:00
bors
14e2fe4039
Auto merge of #106033 - ChrisDenton:bump-cfg-if, r=Mark-Simulacrum
...
Remove old version of `cfg-if` by bumping `packed_simd_2` and `getrandom v0.2` versions
```console
> cargo update --package packed_simd_2 --package getrandom@0.2.0
Updating crates.io index
Removing cfg-if v0.1.10
Updating getrandom v0.2.0 -> v0.2.8
Updating packed_simd_2 v0.3.4 -> v0.3.8
```
`packed_simd_2` is only used as a dependency of `bytecount` which in turn is only used by `rustfmt`. I can't see any issue with the minor version bump.
The bigger jump is `getrandom@0.2.0` which is used by a number of things, but 0.2.8 is still semver compatible and there doesn't seem to be any worrying changes (see the [changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md )). The only breaking change are the removal of XP, stdweb and CloudAbi support but these are not host targets and rustc lacks support for them in any case (stdweb development was [abandonded](https://rustsec.org/advisories/RUSTSEC-2020-0056.html ), XP is [tier 3 and `no_std`](https://doc.rust-lang.org/beta/rustc/platform-support.html#tier-3 ) and CloubAbi is [no longer supported](https://github.com/rust-lang/rust/pull/78439 )).
Note that this doesn't affect `getrandom@0.1.16` which is what std depends on and which is already using the latest version of `cfg-if` (besides, there are already plans to remove that entirely).
2022-12-23 10:46:58 +00:00
Ayush Singh
51fe24873f
Use u32 methods instead of manual shifting
...
Switch to `to_be_bytes()` and `from_be_bytes()` instead of manual
shifting
This was suggested [`here`](https://github.com/rust-lang/rust/pull/105145#discussion_r1051418964 )
Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-12-23 16:08:23 +05:30
Nikita Popov
a0b9c5a9bf
Provide more context on FileCheck failures
...
FileCheck provides 5 lines of context by default. This is often
insufficient to analyze failures that happen in CI. Increase the
amount of context to 100 lines.
2022-12-23 09:40:24 +01:00
Michael Goulet
69abe4458e
Add tests
2022-12-23 04:12:30 +00:00
Michael Goulet
81cde69a2f
Eagerly evaluate args
2022-12-23 04:12:30 +00:00
bors
5e656baf8b
Auto merge of #106070 - matthiaskrgr:rollup-jv9ctkl, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- #105978 (Mark `proc_macro_decls_static` as always used)
- #106051 (Allow building std with cranelift)
- #106056 (Make `sess.bug` much less noisy)
- #106057 (Give a more helpful error for "trimmed_def_paths constructed")
- #106058 (Fix the issue number in comment for as_local_call_operand)
- #106059 (Avoid running the `Profile` step twice on `x setup`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-23 02:44:32 +00:00
Michael Howell
7c6aa7c59d
rustdoc: fix race condition in GUI test
2022-12-22 18:01:46 -07:00
Michael Howell
d60309b311
rustdoc: use a more evocative name for CSS/JS #titles
...
This renames the ID, which is only used in search results, to
`#search-tabs`. Also changes the `.count` to a span, so it doesn't need its
display mode to be overridden.
2022-12-22 18:01:46 -07:00
Matthias Krüger
fa1e34fbaf
Rollup merge of #106059 - jyn514:setup-twice, r=Nilstrieb
...
Avoid running the `Profile` step twice on `x setup`
Prevents runs like the following:
```
$ x setup
Welcome to the Rust project! What do you want to do with x.py?
a) library: Contribute to the standard library
b) compiler: Contribute to the compiler itself
c) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): b
To get started, try one of the following commands:
- `x.py check`
- `x.py build`
- `x.py test`
For more suggestions, see https://rustc-dev-guide.rust-lang.org/building/suggested.html
`x.py` will now use the configuration at /home/nilsh/projects/rustfast/src/bootstrap/defaults/config.compiler.toml
Welcome to the Rust project! What do you want to do with x.py?
...
```
r? `@Nilstrieb`
2022-12-23 01:17:52 +01:00
Matthias Krüger
bbde21303a
Rollup merge of #106058 - tmiasko:68304, r=compiler-errors
...
Fix the issue number in comment for as_local_call_operand
2022-12-23 01:17:52 +01:00
Matthias Krüger
da370fe25a
Rollup merge of #106057 - jyn514:trimmed-def-paths-ice, r=compiler-errors
...
Give a more helpful error for "trimmed_def_paths constructed"
cc https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/ice.20debugging/near/315928294 , https://github.com/rust-lang/rust/pull/106056
`@mejrs` do you think this would have helped you figure out the problem faster?
2022-12-23 01:17:51 +01:00
Matthias Krüger
15a0daca00
Rollup merge of #106056 - jyn514:quiet-bug, r=compiler-errors
...
Make `sess.bug` much less noisy
cc https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/ice.20debugging/near/315929150
Before:
<details>
```
Compiling core v0.0.0 (C:\Users\Joshua Nelson\src\rust2\library\core)
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued
error: internal compiler error: oops
|
= note: delayed at 0: std::backtrace_rs::backtrace::trace_unsynchronized
1: std::backtrace::Backtrace::disabled
2: std::backtrace::Backtrace::force_capture
3: <rustc_errors::Handler>::delay_good_path_bug::<&str>
4: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#2}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
5: RINvMs2_NtCsiwHPejSviHg_15rustc_interface7queriesNtNtB8_9interface8Compiler5enterNCNCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0s0_0INtNtCslM5znELOk5i_4core6result6ResultINtNtB2f_6option6OptionNtB6_6LinkerENtCshthk7JDUYGg_12rustc_errors15ErrorGuarante
6: RINvCs6uSsza6NDuD_10rustc_span15with_source_mapINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerBJ_NCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0E00EB
7: RINvMs_Cs9yvsqs6YnUZ_10scoped_tlsINtB5_9ScopedKeyNtCs6uSsza6NDuD_10rustc_span14SessionGlobalsE3setNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNvCs7P
8: RINvNtNtCs5xszGlR5JQw_3std10sys_common9backtrace28___rust_begin_short_backtraceNCNCINvNtCsiwHPejSviHg_15rustc_interface4util31run_in_thread_pool_with_globalsNCINvNtB1o_9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_
9: RINvNtCs5xszGlR5JQw_3std9panicking3tryINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedEINtNtNtBF_5panic11unwind_safe16AssertUnwindSafeNCNCINvMNtB4_6threadNtB2S_7Builder16spawn_unchecked_NCNCINvNtCsiwHPejSviHg_15rustc_
10: <std:🧵 :Builder>::spawn_scoped::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
11: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
12: std::sys::windows:🧵 :Thread::new
13: BaseThreadInitThunk
14: RtlUserThreadStart
thread 'rustc' panicked at 'Box<dyn Any>', compiler\rustc_errors\src\lib.rs:1610:13
stack backtrace:
0: 0x7fffbe935a15 - std::backtrace_rs::backtrace::trace_unsynchronized::h2a29ea0a35c1f799
1: 0x7fffbe968811 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5e4ca8af47bfbcc0
2: 0x7fffbe98aeab - core::fmt::write::h152a9de2569e7dc7
3: 0x7fffbe961059 - std::io::Write::write_fmt::h2452e19093defac4
4: 0x7fffbe96866b - std::sys_common::backtrace::print::h550d034f7b77d60a
5: 0x7fffbe93be1b - std::panicking::default_hook::h3969ead74039b801
6: 0x7fffbe93bbad - std::panicking::default_hook::h3969ead74039b801
7: 0x7fffa5f0abe3 - rustc_driver[5b2ae43fbecaf219]::handle_options
8: 0x7fffbe93c25b - std::panicking::rust_panic_with_hook::h32bbe3ce24999160
9: 0x7fffa82baee5 - std[4086331e48bff2f6]::sys_common::backtrace::__rust_end_short_backtrace::<std[4086331e48bff2f6]::panicking::begin_panic<&str>::{closure#0}, !>
10: 0x7fffa82bae89 - std[4086331e48bff2f6]::sys_common::backtrace::__rust_end_short_backtrace::<std[4086331e48bff2f6]::panicking::begin_panic<rustc_errors[cb829533098ec0fe]::ExplicitBug>::{closure#0}, !>
11: 0x7fffa867ed89 - std[4086331e48bff2f6]::panicking::begin_panic::<rustc_errors[cb829533098ec0fe]::ExplicitBug>
12: 0x7fffa8298de9 - <alloc[284c8fe3a98c29c4]::string::String as core[fda266aeadfb153a]::fmt::Write>::write_fmt
13: 0x7fffa829b7e2 - <rustc_errors[cb829533098ec0fe]::HandlerInner>::flush_delayed::<core[fda266aeadfb153a]::iter::adapters::map::Map<alloc[284c8fe3a98c29c4]::vec::into_iter::IntoIter<rustc_errors[cb829533098ec0fe]::DelayedDiagnostic>, <rustc_errors[cb829533098ec0fe]::DelayedDiagnostic>::decorate>, &str>
14: 0x7fffa8288638 - <rustc_errors[cb829533098ec0fe]::HandlerInner as core[fda266aeadfb153a]::ops::drop::Drop>::drop
15: 0x7fffa5eb90e1 - core[fda266aeadfb153a]::ptr::drop_in_place::<rustc_errors[cb829533098ec0fe]::Handler>
16: 0x7fffa5ebe9fd - core[fda266aeadfb153a]::ptr::drop_in_place::<rustc_session[e703468b2407e34a]::cgu_reuse_tracker::CguReuseTracker>
17: 0x7fffa5ec0d7c - core[fda266aeadfb153a]::ptr::drop_in_place::<rustc_session[e703468b2407e34a]::session::Session>
18: 0x7fffa5ebe41c - core[fda266aeadfb153a]::ptr::drop_in_place::<rustc_interface[d7cd35f07e7e6ecc]::interface::Compiler>
19: 0x7fffa5eea05f - RINvCs6uSsza6NDuD_10rustc_span15with_source_mapINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerBJ_NCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0E00EB
20: 0x7fffa5edbe3a - RINvMs_Cs9yvsqs6YnUZ_10scoped_tlsINtB5_9ScopedKeyNtCs6uSsza6NDuD_10rustc_span14SessionGlobalsE3setNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNvCs7P
21: 0x7fffa5ef4ec9 - RINvNtNtCs5xszGlR5JQw_3std10sys_common9backtrace28___rust_begin_short_backtraceNCNCINvNtCsiwHPejSviHg_15rustc_interface4util31run_in_thread_pool_with_globalsNCINvNtB1o_9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_
22: 0x7fffa5ee9935 - RINvNtCs5xszGlR5JQw_3std9panicking3tryINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedEINtNtNtBF_5panic11unwind_safe16AssertUnwindSafeNCNCINvMNtB4_6threadNtB2S_7Builder16spawn_unchecked_NCNCINvNtCsiwHPejSviHg_15rustc_
23: 0x7fffa5f0d770 - <std[4086331e48bff2f6]:🧵 :Builder>::spawn_scoped::<rustc_interface[d7cd35f07e7e6ecc]::util::run_in_thread_pool_with_globals<rustc_interface[d7cd35f07e7e6ecc]::interface::run_compiler<(), rustc_driver[5b2ae43fbecaf219]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
24: 0x7fffbe95b35b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfcd927f7aebafa45
25: 0x7fffbe9331d3 - std::sys::windows:🧵 :Thread:🆕 :hf8f4c920eaebd965
26: 0x7ff815877614 - BaseThreadInitThunk
27: 0x7ff8166e26a1 - RtlUserThreadStart
note: the compiler unexpectedly panicked. this is a bug.
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.68.0-dev running on x86_64-pc-windows-msvc
note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=legacy -Z unstable-options -Z unstable-options -Z macro-backtrace -C split-debuginfo=packed -C target-feature=+crt-static -C prefer-dynamic -C embed-bitcode=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/ ") -Z binary-dep-depinfo -Z force-unstable-if-unmarked
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `core`
```
</details>
After:
<details>
```
Compiling core v0.0.0 (C:\Users\Joshua Nelson\src\rust2\library\core)
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued
error: internal compiler error: oops
|
= note: delayed at 0: std::backtrace_rs::backtrace::trace_unsynchronized
1: std::backtrace::Backtrace::disabled
2: std::backtrace::Backtrace::force_capture
3: <rustc_errors::Handler>::delay_good_path_bug::<&str>
4: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#2}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
5: RINvMs2_NtCsiwHPejSviHg_15rustc_interface7queriesNtNtB8_9interface8Compiler5enterNCNCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0s0_0INtNtCslM5znELOk5i_4core6result6ResultINtNtB2f_6option6OptionNtB6_6LinkerENtCshthk7JDUYGg_12rustc_errors15ErrorGuarante
6: RINvCs6uSsza6NDuD_10rustc_span15with_source_mapINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerBJ_NCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0E00EB
7: RINvMs_Cs9yvsqs6YnUZ_10scoped_tlsINtB5_9ScopedKeyNtCs6uSsza6NDuD_10rustc_span14SessionGlobalsE3setNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNvCs7P
8: RINvNtNtCs5xszGlR5JQw_3std10sys_common9backtrace28___rust_begin_short_backtraceNCNCINvNtCsiwHPejSviHg_15rustc_interface4util31run_in_thread_pool_with_globalsNCINvNtB1o_9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_
9: RINvNtCs5xszGlR5JQw_3std9panicking3tryINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedEINtNtNtBF_5panic11unwind_safe16AssertUnwindSafeNCNCINvMNtB4_6threadNtB2S_7Builder16spawn_unchecked_NCNCINvNtCsiwHPejSviHg_15rustc_
10: <std:🧵 :Builder>::spawn_scoped::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
11: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
12: std::sys::windows:🧵 :Thread::new
13: BaseThreadInitThunk
14: RtlUserThreadStart
note: the compiler unexpectedly panicked. this is a bug.
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.68.0-dev running on x86_64-pc-windows-msvc
note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=legacy -Z unstable-options -Z unstable-options -Z macro-backtrace -C split-debuginfo=packed -C target-feature=+crt-static -C prefer-dynamic -C embed-bitcode=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/ ") -Z binary-dep-depinfo -Z force-unstable-if-unmarked
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `core`
```
</details>
2022-12-23 01:17:51 +01:00
Matthias Krüger
49287a4095
Rollup merge of #106051 - jyn514:cranelift-std, r=bjorn3
...
Allow building std with cranelift
- Don't pass llvm-specific args when using cranelift
- Don't use `asm` in compiler_builtins when using cranelift
r? `@bjorn3` cc `@Mark-Simulacrum`
2022-12-23 01:17:50 +01:00
Matthias Krüger
3e58de240c
Rollup merge of #105978 - jyn514:unused_proc_macro_decl, r=tmiasko
...
Mark `proc_macro_decls_static` as always used
This would have avoided a bug in https://github.com/rust-lang/rust/pull/104860 .
In practice this shouldn't matter since nothing uses the query other than the `dead_code` lint, but this isn't documented as an internal-only query so it seems nice for it to be accurate. I think for `dead_code` it doesn't matter because the relevant code is generated by `rustc_builtin_macros` and isn't linted.
I think `@tmiasko` or `@bjorn3` would be a good reviewer?
r? `@tmiasko`
2022-12-23 01:17:50 +01:00
bors
daccb3d974
Auto merge of #105036 - jyn514:cargo-docs, r=Mark-Simulacrum
...
Support documenting cargo
The primary motivation is to have the cargo docs show up on https://doc.rust-lang.org/nightly/nightly-rustc/cargo , but as a nice side effect this makes `x doc cargo` work locally.
cc `@rust-lang/cargo`
2022-12-23 00:02:15 +00:00
Nilstrieb
d846cf0971
A few metadata nits
2022-12-22 23:21:00 +01:00
Yuki Okushi
668d9fd7bc
Always suggest as MachineApplicable
in recover_intersection_pat
...
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-23 07:18:48 +09:00
Ezra Shaw
66ed1812cf
docs/test: add UI test and long-form error docs for E0462
2022-12-23 10:56:16 +13:00
Lukas Markeffsky
94d6245003
Fix explicit_outlives_requirements
lint in macros
...
Show the suggestion if and only if the bounds are from the same source context.
2022-12-22 22:04:40 +01:00
bors
8a97b4812a
Auto merge of #106054 - matthiaskrgr:rollup-38epsfh, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- #105567 (KCFI test: Also support LLVM 16 output)
- #105847 (Ensure param-env is const before calling `eval_to_valtree`)
- #105983 (Add a missing early return in drop tracking `handle_uninhabited_return`)
- #106027 (rustdoc: simplify CSS and DOM for more-scraped-examples)
- #106035 (Migrate search tab title color to CSS variable)
- #106037 (Add regression test for #94293 )
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-22 20:48:33 +00:00
Joshua Nelson
f94c926aec
Support documenting Cargo
...
The primary motivation is to have the cargo docs show up on https://doc.rust-lang.org/nightly/nightly-rustc/cargo , but as a nice side effect this makes `x doc cargo` work locally.
2022-12-22 14:33:22 -06:00
Ben Kimock
f4165be780
Add a (1) and (2) to the data race errors
2022-12-22 14:24:10 -05:00
Joshua Nelson
103816d704
Avoid running the Profile
step twice on x setup
...
Prevents runs like the following:
```
$ x setup
Welcome to the Rust project! What do you want to do with x.py?
a) library: Contribute to the standard library
b) compiler: Contribute to the compiler itself
c) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): b
To get started, try one of the following commands:
- `x.py check`
- `x.py build`
- `x.py test`
For more suggestions, see https://rustc-dev-guide.rust-lang.org/building/suggested.html
`x.py` will now use the configuration at /home/nilsh/projects/rustfast/src/bootstrap/defaults/config.compiler.toml
Welcome to the Rust project! What do you want to do with x.py?
...
```
2022-12-22 13:23:56 -06:00
Joshua Nelson
e4330295d9
Give a more helpful error for "trimmed_def_paths construted"
2022-12-22 13:12:15 -06:00
Tomasz Miąsko
898b702695
Fix the issue number in comment for as_local_call_operand
2022-12-22 20:06:53 +01:00
Joshua Nelson
c01985387d
Make sess.bug
much less noisy
...
Before:
```
Compiling core v0.0.0 (C:\Users\Joshua Nelson\src\rust2\library\core)
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued
error: internal compiler error: oops
|
= note: delayed at 0: std::backtrace_rs::backtrace::trace_unsynchronized
1: std::backtrace::Backtrace::disabled
2: std::backtrace::Backtrace::force_capture
3: <rustc_errors::Handler>::delay_good_path_bug::<&str>
4: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#2}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
5: RINvMs2_NtCsiwHPejSviHg_15rustc_interface7queriesNtNtB8_9interface8Compiler5enterNCNCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0s0_0INtNtCslM5znELOk5i_4core6result6ResultINtNtB2f_6option6OptionNtB6_6LinkerENtCshthk7JDUYGg_12rustc_errors15ErrorGuarante
6: RINvCs6uSsza6NDuD_10rustc_span15with_source_mapINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerBJ_NCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0E00EB
7: RINvMs_Cs9yvsqs6YnUZ_10scoped_tlsINtB5_9ScopedKeyNtCs6uSsza6NDuD_10rustc_span14SessionGlobalsE3setNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNvCs7P
8: RINvNtNtCs5xszGlR5JQw_3std10sys_common9backtrace28___rust_begin_short_backtraceNCNCINvNtCsiwHPejSviHg_15rustc_interface4util31run_in_thread_pool_with_globalsNCINvNtB1o_9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_
9: RINvNtCs5xszGlR5JQw_3std9panicking3tryINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedEINtNtNtBF_5panic11unwind_safe16AssertUnwindSafeNCNCINvMNtB4_6threadNtB2S_7Builder16spawn_unchecked_NCNCINvNtCsiwHPejSviHg_15rustc_
10: <std:🧵 :Builder>::spawn_scoped::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
11: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
12: std::sys::windows:🧵 :Thread::new
13: BaseThreadInitThunk
14: RtlUserThreadStart
thread 'rustc' panicked at 'Box<dyn Any>', compiler\rustc_errors\src\lib.rs:1610:13
stack backtrace:
0: 0x7fffbe935a15 - std::backtrace_rs::backtrace::trace_unsynchronized::h2a29ea0a35c1f799
1: 0x7fffbe968811 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5e4ca8af47bfbcc0
2: 0x7fffbe98aeab - core::fmt::write::h152a9de2569e7dc7
3: 0x7fffbe961059 - std::io::Write::write_fmt::h2452e19093defac4
4: 0x7fffbe96866b - std::sys_common::backtrace::print::h550d034f7b77d60a
5: 0x7fffbe93be1b - std::panicking::default_hook::h3969ead74039b801
6: 0x7fffbe93bbad - std::panicking::default_hook::h3969ead74039b801
7: 0x7fffa5f0abe3 - rustc_driver[5b2ae43fbecaf219]::handle_options
8: 0x7fffbe93c25b - std::panicking::rust_panic_with_hook::h32bbe3ce24999160
9: 0x7fffa82baee5 - std[4086331e48bff2f6]::sys_common::backtrace::__rust_end_short_backtrace::<std[4086331e48bff2f6]::panicking::begin_panic<&str>::{closure#0}, !>
10: 0x7fffa82bae89 - std[4086331e48bff2f6]::sys_common::backtrace::__rust_end_short_backtrace::<std[4086331e48bff2f6]::panicking::begin_panic<rustc_errors[cb829533098ec0fe]::ExplicitBug>::{closure#0}, !>
11: 0x7fffa867ed89 - std[4086331e48bff2f6]::panicking::begin_panic::<rustc_errors[cb829533098ec0fe]::ExplicitBug>
12: 0x7fffa8298de9 - <alloc[284c8fe3a98c29c4]::string::String as core[fda266aeadfb153a]::fmt::Write>::write_fmt
13: 0x7fffa829b7e2 - <rustc_errors[cb829533098ec0fe]::HandlerInner>::flush_delayed::<core[fda266aeadfb153a]::iter::adapters::map::Map<alloc[284c8fe3a98c29c4]::vec::into_iter::IntoIter<rustc_errors[cb829533098ec0fe]::DelayedDiagnostic>, <rustc_errors[cb829533098ec0fe]::DelayedDiagnostic>::decorate>, &str>
14: 0x7fffa8288638 - <rustc_errors[cb829533098ec0fe]::HandlerInner as core[fda266aeadfb153a]::ops::drop::Drop>::drop
15: 0x7fffa5eb90e1 - core[fda266aeadfb153a]::ptr::drop_in_place::<rustc_errors[cb829533098ec0fe]::Handler>
16: 0x7fffa5ebe9fd - core[fda266aeadfb153a]::ptr::drop_in_place::<rustc_session[e703468b2407e34a]::cgu_reuse_tracker::CguReuseTracker>
17: 0x7fffa5ec0d7c - core[fda266aeadfb153a]::ptr::drop_in_place::<rustc_session[e703468b2407e34a]::session::Session>
18: 0x7fffa5ebe41c - core[fda266aeadfb153a]::ptr::drop_in_place::<rustc_interface[d7cd35f07e7e6ecc]::interface::Compiler>
19: 0x7fffa5eea05f - RINvCs6uSsza6NDuD_10rustc_span15with_source_mapINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerBJ_NCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0E00EB
20: 0x7fffa5edbe3a - RINvMs_Cs9yvsqs6YnUZ_10scoped_tlsINtB5_9ScopedKeyNtCs6uSsza6NDuD_10rustc_span14SessionGlobalsE3setNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNvCs7P
21: 0x7fffa5ef4ec9 - RINvNtNtCs5xszGlR5JQw_3std10sys_common9backtrace28___rust_begin_short_backtraceNCNCINvNtCsiwHPejSviHg_15rustc_interface4util31run_in_thread_pool_with_globalsNCINvNtB1o_9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_
22: 0x7fffa5ee9935 - RINvNtCs5xszGlR5JQw_3std9panicking3tryINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedEINtNtNtBF_5panic11unwind_safe16AssertUnwindSafeNCNCINvMNtB4_6threadNtB2S_7Builder16spawn_unchecked_NCNCINvNtCsiwHPejSviHg_15rustc_
23: 0x7fffa5f0d770 - <std[4086331e48bff2f6]:🧵 :Builder>::spawn_scoped::<rustc_interface[d7cd35f07e7e6ecc]::util::run_in_thread_pool_with_globals<rustc_interface[d7cd35f07e7e6ecc]::interface::run_compiler<(), rustc_driver[5b2ae43fbecaf219]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
24: 0x7fffbe95b35b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfcd927f7aebafa45
25: 0x7fffbe9331d3 - std::sys::windows:🧵 :Thread:🆕 :hf8f4c920eaebd965
26: 0x7ff815877614 - BaseThreadInitThunk
27: 0x7ff8166e26a1 - RtlUserThreadStart
note: the compiler unexpectedly panicked. this is a bug.
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.68.0-dev running on x86_64-pc-windows-msvc
note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=legacy -Z unstable-options -Z unstable-options -Z macro-backtrace -C split-debuginfo=packed -C target-feature=+crt-static -C prefer-dynamic -C embed-bitcode=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/ ") -Z binary-dep-depinfo -Z force-unstable-if-unmarked
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `core`
```
After:
```
Compiling core v0.0.0 (C:\Users\Joshua Nelson\src\rust2\library\core)
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued
error: internal compiler error: oops
|
= note: delayed at 0: std::backtrace_rs::backtrace::trace_unsynchronized
1: std::backtrace::Backtrace::disabled
2: std::backtrace::Backtrace::force_capture
3: <rustc_errors::Handler>::delay_good_path_bug::<&str>
4: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#2}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
5: RINvMs2_NtCsiwHPejSviHg_15rustc_interface7queriesNtNtB8_9interface8Compiler5enterNCNCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0s0_0INtNtCslM5znELOk5i_4core6result6ResultINtNtB2f_6option6OptionNtB6_6LinkerENtCshthk7JDUYGg_12rustc_errors15ErrorGuarante
6: RINvCs6uSsza6NDuD_10rustc_span15with_source_mapINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerBJ_NCNvCs7PhwInflpyf_12rustc_driver12run_compilers_0E00EB
7: RINvMs_Cs9yvsqs6YnUZ_10scoped_tlsINtB5_9ScopedKeyNtCs6uSsza6NDuD_10rustc_span14SessionGlobalsE3setNCINvNtCsiwHPejSviHg_15rustc_interface9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedENCNvCs7P
8: RINvNtNtCs5xszGlR5JQw_3std10sys_common9backtrace28___rust_begin_short_backtraceNCNCINvNtCsiwHPejSviHg_15rustc_interface4util31run_in_thread_pool_with_globalsNCINvNtB1o_9interface12run_compilerINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_
9: RINvNtCs5xszGlR5JQw_3std9panicking3tryINtNtCslM5znELOk5i_4core6result6ResultuNtCshthk7JDUYGg_12rustc_errors15ErrorGuaranteedEINtNtNtBF_5panic11unwind_safe16AssertUnwindSafeNCNCINvMNtB4_6threadNtB2S_7Builder16spawn_unchecked_NCNCINvNtCsiwHPejSviHg_15rustc_
10: <std:🧵 :Builder>::spawn_scoped::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
11: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
12: std::sys::windows:🧵 :Thread::new
13: BaseThreadInitThunk
14: RtlUserThreadStart
note: the compiler unexpectedly panicked. this is a bug.
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.68.0-dev running on x86_64-pc-windows-msvc
note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C incremental=[REDACTED] -C symbol-mangling-version=legacy -Z unstable-options -Z unstable-options -Z macro-backtrace -C split-debuginfo=packed -C target-feature=+crt-static -C prefer-dynamic -C embed-bitcode=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/ ") -Z binary-dep-depinfo -Z force-unstable-if-unmarked
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `core`
```
2022-12-22 12:44:13 -06:00
Matthias Krüger
ee43f34700
Rollup merge of #106037 - JohnTitor:issue-94293, r=lcnr
...
Add regression test for #94293
Closes #94293
r? ```@lcnr```
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-22 19:36:15 +01:00
Matthias Krüger
9cd140e7a1
Rollup merge of #106035 - GuillaumeGomez:migrate-css-var-search-tab-title-color, r=notriddle
...
Migrate search tab title color to CSS variable
r? ```@notriddle```
2022-12-22 19:36:14 +01:00
Matthias Krüger
4a5cecec56
Rollup merge of #106027 - notriddle:notriddle/more-scraped-examples-inner, r=GuillaumeGomez
...
rustdoc: simplify CSS and DOM for more-scraped-examples
This gets rid of the more-scraped-examples-inner wrapper, instead nesting the children directly and using absolute positioning for the toggle line.
2022-12-22 19:36:14 +01:00
Matthias Krüger
273fe60269
Rollup merge of #105983 - compiler-errors:issue-105981, r=tmiasko
...
Add a missing early return in drop tracking `handle_uninhabited_return`
This return is needed so we don't call `Ty::is_inhabited_from` from a type with ty/ct vars in it.
Fixes #105981
2022-12-22 19:36:13 +01:00
Matthias Krüger
548d49c789
Rollup merge of #105847 - compiler-errors:issue-104396, r=oli-obk
...
Ensure param-env is const before calling `eval_to_valtree`
Other queries call `ParamEnv::with_const` *inside* of the query itself (e.g. `const_eval_global_id_for_typeck`), so this could alternatively be moved into the provider of `eval_to_valtree` instead. I don't have a particularly strong opinion, though *theoretically* caching is better if we make the query keys more constrained.
I'm not exactly sure how this is an effect of the `-Zmir-opt-level=3` flag. Maybe something about the inliner causes us to inline an unevaluated const into a body where it can be evaluated, but where it has not yet been normalized.
This seems likely, since we're inlining `from_fn_1::<{ N / 2 }, _>` in `from_fn_2`, which means that we will need to evaluate that constant during the const prop pass after inlining.
Fixes #104396
2022-12-22 19:36:13 +01:00
Matthias Krüger
17b3b97e08
Rollup merge of #105567 - TimNN:kcfi16, r=nikic
...
KCFI test: Also support LLVM 16 output
With a regex we can support the LLVM 16 output now already (and there are some third-party build bots that test Rust with LLVM head, like https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds?branch=master ).
cc ```@rcvalle```
2022-12-22 19:36:12 +01:00
Michael Goulet
e5b278b702
Deduplicate check_expr in builtin calls with error
2022-12-22 18:17:29 +00:00
Joshua Nelson
164e22109b
Mark proc_macro_decls_static
as always used
...
This would have avoided a bug in https://github.com/rust-lang/rust/pull/104860 .
In practice this shouldn't matter since nothing uses the query other than the `dead_code` lint,
but this isn't documented as an internal-only query so it seems nice for it to be accurate.
I think for `dead_code` it doesn't matter because the relevant code is generated by `rustc_builtin_macros` and isn't linted.
2022-12-22 12:02:53 -06:00
Michael Goulet
f38bf5399d
Take revision into account in src/test/ui incremental tests
2022-12-22 17:59:52 +00:00
Michael Goulet
51ba7b4e43
Use separate files instead of revisions
2022-12-22 17:51:45 +00:00
Deadbeef
4566db3359
Run tidy
in its own job in PR CI
...
This duplicates mingw-check into two jobs where one job
runs `tidy` only while the other job does not. The tidy
job will not cancel other jobs on failure.
2022-12-22 17:50:56 +00:00
Joshua Nelson
0b3ffcbb0b
Allow building std with cranelift
...
- Don't pass llvm-specific args when using cranelift
- Don't use `asm` in compiler_builtins when using cranelift
2022-12-22 11:50:19 -06:00
bors
cca80b9a81
Auto merge of #103957 - JakobDegen:drop-retag, r=RalfJung
...
Retag as FnEntry on `drop_in_place`
This commit changes the mir drop shim to always retag its argument as if it were a `&mut`.
cc rust-lang/unsafe-code-guidelines#373
2022-12-22 17:48:43 +00:00
Ralf Jung
9f241b3a26
abort immediately on bad mem::zeroed/uninit
2022-12-22 16:37:42 +01:00
bors
e5e4eef02d
Auto merge of #106000 - nikic:lld-build, r=Mark-Simulacrum
...
Make LLD build forward-compatible with LLVM 16
Switch to using the cmake module instead of llvm-config. I believe this also removes the need for llvm-config-wrapper.
2022-12-22 13:59:15 +00:00
Nikita Popov
59b3157c45
Use LLVM_CMAKE_DIR for lld build
...
LLVM_CONFIG_PATH is no longer supported as of LLVM 16, switch to
using the cmake module instead.
We separately return the llvm-config and cmake directory paths,
because llvm-config always refers to the host binary, while
the cmake directory is for the target triple.
2022-12-22 12:48:57 +01:00
Yuki Okushi
34ae96868f
Add regression test for #94293
...
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-22 20:29:20 +09:00
bors
2d8651a927
Auto merge of #106034 - matthiaskrgr:rollup-2zpql33, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- #104741 (Switch `#[track_caller]` back to a no-op unless feature gate is enabled)
- #105769 (add function to tell the identical errors for ambiguity_errors)
- #105843 (Suggest associated const on possible capitalization mistake)
- #105966 (Re-enable `Fn` trait call notation error for non-tuple argument)
- #106002 (codegen tests: adapt patterns to also work with v0 symbol mangling)
- #106010 (Give opaque types a better coherence error)
- #106016 (rustdoc: simplify link anchor to section expand JS)
- #106024 (Fix ICE due to `todo!()` in `rustdoc` for `Term`s)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-22 11:06:51 +00:00
Guillaume Gomez
faebd7a788
Extend search GUI test to include search tab title color check
2022-12-22 11:38:59 +01:00