Camille GILLOT
028b4745f4
Move SimplifyLocals before ConstProp.
2022-12-25 18:01:07 +00:00
KaDiWa
7b371d2ad9
fix some typos
2022-12-25 00:43:50 +01:00
bors
f5c3dfdbbf
Auto merge of #105085 - oli-obk:stop_promoting_all_the_things, r=RalfJung
...
Stop promoting all the things
fixes #91009
r? `@RalfJung`
2022-12-24 14:00:37 +00:00
Matthias Krüger
a952b61e94
Rollup merge of #105872 - chenyukang:yukang/fix-105494-remove-method-call, r=eholk
...
Suggest remove last method call when type coerce with expected type
Fixes #105494
2022-12-24 08:53:47 +01:00
Matthias Krüger
d23cb738d2
Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk
...
rustc: Remove needless lifetimes
2022-12-24 00:31:41 +01:00
Matthias Krüger
e08dd9d998
Rollup merge of #105970 - Ezrashaw:add-docs+test-e0462, r=GuillaumeGomez
...
docs/test: add UI test and long-form error docs for E0462
Another UI test/ docs combo.
r? ``@GuillaumeGomez``
2022-12-24 00:31:40 +01:00
bors
af3e06f1bf
Auto merge of #106087 - Nilstrieb:rollup-2m3nies, r=Nilstrieb
...
Rollup of 6 pull requests
Successful merges:
- #105661 (implement the skeleton of the updated trait solver)
- #105853 (Make the pre-push script work on directories with spaces)
- #106043 (Move tests)
- #106048 (Run `tidy` in its own job in PR CI)
- #106055 (Check arg expressions properly on error in `confirm_builtin_call`)
- #106067 (A few metadata nits)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-23 19:46:36 +00:00
nils
659c218b3a
Rollup merge of #106067 - Nilstrieb:meta-cleanup, r=petrochenkov
...
A few metadata nits
Found while reading through the code. The `NOTE` is outdated now after #97376 .
2022-12-23 18:02:16 +01:00
nils
de99a87926
Rollup merge of #106055 - compiler-errors:too-many-calls, r=estebank
...
Check arg expressions properly on error in `confirm_builtin_call`
Makes sure we don't regress diagnostic output when we have an expr error nested inside of a bad fn call: https://github.com/rust-lang/rust/pull/105973#issuecomment-1363152232
Fixes #106030
Fixes #105244
2022-12-23 18:02:15 +01:00
nils
fd5af8cc23
Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors
...
implement the skeleton of the updated trait solver
cc ```@rust-lang/initiative-trait-system-refactor```
This is mostly following the architecture discussed in the types team meetup.
After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible.
This somewhat closely mirrors the current `evaluate` implementation with the following notable differences:
- it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive)
- it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful)
- it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality)
- it is implemented to work with lazy normalization
A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work.
r? ```@compiler-errors``` / ```@rust-lang/types``` :3
2022-12-23 18:02:13 +01:00
bors
c2ff8ad035
Auto merge of #105550 - gimbles:master, r=Nilstrieb
...
Use `DepKind` instead of `&'static str` in `QueryStackFrame`
`@rustbot` author
Fixes #105168
2022-12-23 16:57:21 +00:00
Jeremy Stucki
1174aacf59
Indicate anonymous lifetime
2022-12-23 15:59:53 +01:00
gimbles
f8b30084ac
Use DepKind instead of &str
2022-12-23 18:39:49 +05:30
Michael Goulet
81cde69a2f
Eagerly evaluate args
2022-12-23 04:12:30 +00: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
Nilstrieb
d846cf0971
A few metadata nits
2022-12-22 23:21:00 +01:00
Ezra Shaw
66ed1812cf
docs/test: add UI test and long-form error docs for E0462
2022-12-23 10:56:16 +13: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
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
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
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
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
Matthias Krüger
d4aca6bb24
Rollup merge of #106010 - oli-obk:tait_coherence_diagnostic, r=compiler-errors
...
Give opaque types a better coherence error
2022-12-22 11:03:52 +01:00
Matthias Krüger
6a215ab989
Rollup merge of #105966 - compiler-errors:issue-105936, r=eholk
...
Re-enable `Fn` trait call notation error for non-tuple argument
I have no idea why I delayed this bug... but also there doesn't seem to be a UI test that actually shows a change, so maybe that's why.
Fixes #105936
2022-12-22 11:03:51 +01:00
Matthias Krüger
ecdabb490c
Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnr
...
Suggest associated const on possible capitalization mistake
Suggest `i32::MAX` if we typed `i32::max` without making a function call.
Fixes #93844
2022-12-22 11:03:50 +01:00
Matthias Krüger
2cace6aa5d
Rollup merge of #105769 - lyming2007:issue-105177-fix, r=eholk
...
add function to tell the identical errors for ambiguity_errors
if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same we call these 2 ambiguity errors identical
prevent identical ambiguity error from pushing into vector of ambiguity_errors this will fix #105177
2022-12-22 11:03:50 +01:00
Matthias Krüger
0adf9e046b
Rollup merge of #104741 - bryangarza:bug-104588-async-track-caller, r=compiler-errors
...
Switch `#[track_caller]` back to a no-op unless feature gate is enabled
This patch fixes a regression, in which `#[track_caller]`, which was previously a no-op, was changed to actually turn on the behavior. This should instead only happen behind the `closure_track_caller` feature gate.
Also, add a warning for the user to understand how their code will compile depending on the feature gate being turned on or not.
Fixes #104588
2022-12-22 11:03:49 +01:00
yukang
3b38adf568
fix suggest span for #105494
2022-12-22 16:27:16 +08:00
yukang
459b234e6a
fix #105494 , Suggest remove last method call when type coerce with expected
2022-12-22 16:27:12 +08:00
bors
75f4ee8b44
Auto merge of #106025 - matthiaskrgr:rollup-vz5rqah, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- #105837 (Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity)
- #105932 (Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15)
- #105960 (Various cleanups)
- #105985 (Method chain nitpicks)
- #105996 (Test that async blocks are `UnwindSafe`)
- #106012 (Clarify that raw retags are not permitted in Mir)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-22 05:30:00 +00:00
Michael Goulet
20052c83c0
Suggest associated const on capitalization error
2022-12-22 03:07:18 +00:00
bors
8574880108
Auto merge of #106023 - JohnTitor:rollup-k8mettz, r=JohnTitor
...
Rollup of 8 pull requests
Successful merges:
- #105584 (add assert messages if chunks/windows are length 0)
- #105602 (interpret: add read_machine_[ui]size convenience methods)
- #105824 (str.lines() docstring: clarify that line endings are not returned)
- #105980 (Refer to "Waker" rather than "RawWaker" in `drop` comment)
- #105986 (Fix typo in reading_half_a_pointer.rs)
- #105995 (Add regression test for #96530 )
- #106008 (Sort lint_groups in no_lint_suggestion)
- #106014 (Add comment explaining what the scrape-examples-toggle.goml GUI test is about)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-22 02:16:59 +00:00
Eric Holk
f20f86ec4e
Change comment to doc comment
2022-12-21 17:28:42 -08:00
Jakob Degen
0229281d03
Don't run Drop
terminators on types that do not have drop glue in const eval
2022-12-21 16:15:56 -08:00
Matthias Krüger
d0d0ccdca2
Rollup merge of #106012 - JakobDegen:retag-raw, r=RalfJung
...
Clarify that raw retags are not permitted in Mir
Not sure when this changed, but documentation and the validator needed to be updated. This also removes raw retags from custom mir.
cc rust-lang/miri#2735
r? `@RalfJung`
2022-12-22 01:01:15 +01:00
Matthias Krüger
66544b57f4
Rollup merge of #105985 - compiler-errors:method-chain-nitpicks, r=estebank
...
Method chain nitpicks
Just fixing some little things I didn't see in review from that method chain PR.
r? `@estebank`
2022-12-22 01:01:14 +01:00
Matthias Krüger
ec7eb5b5ad
Rollup merge of #105960 - oli-obk:effect_cleanup, r=fee1-dead
...
Various cleanups
This PR pulls changes out of https://github.com/rust-lang/rust/pull/101900 that can land on master immediately
r? ``@fee1-dead``
2022-12-22 01:01:13 +01:00
Matthias Krüger
924a1d4a7a
Rollup merge of #105932 - MasterAwesome:aarch64-bti-llvm-15, r=nikic
...
Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15
When building with Fat LTO and BTI enabled on aarch64, the BTI is set to `Module::Min` for alloc shim but is set to `Module::Error` for the crate. This was fine when we were using LLVM-14 but LLVM-15 changes it's behaviour to support for compiling with different `mbranch-protection` flags.
Refer:
b0343a38a5
fixes https://github.com/rust-lang/rust/issues/102162
2022-12-22 01:01:13 +01:00
Matthias Krüger
3eccc297d4
Rollup merge of #105837 - compiler-errors:issue-105728, r=estebank
...
Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity
These expressions are just used for their spans, so make it best-effort here.
Fixes #105728
2022-12-22 01:01:12 +01:00
Yuki Okushi
4c2dd75af3
Rollup merge of #106008 - uweigand:s390x-lintgroup-order, r=Nilstrieb
...
Sort lint_groups in no_lint_suggestion
The no_lint_suggestion routine passes a vector of lint group names to find_best_match_for_name. That routine depends on the sort order of its input vector, which matters in case multiple inputs are at the same Levenshtein distance to the target name.
However, no_lint_suggestion currently just passes lint_groups.keys() as input vector - this is sorted in hash value order, which is not guaranteed to be stable, and in fact differs between big- and little-endian host platforms, causing test failures on s390x.
To fix this, always sort the lint groups before using their names as input to find_best_match_for_name. In doing so, prefer non- deprecated lint group names over deprecated ones, and then use alphabetical order.
Fixes https://github.com/rust-lang/rust/issues/105379
2022-12-22 08:32:12 +09:00
Yuki Okushi
4f29ca386f
Rollup merge of #105602 - RalfJung:read-convenience, r=oli-obk
...
interpret: add read_machine_[ui]size convenience methods
We have `read_pointer`, so it felt inconsistent to not also have these.
r? ```@oli-obk```
2022-12-22 08:32:10 +09:00