about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-04-25vars are ?Michael Goulet-307/+307
2023-04-25Auto merge of #110821 - matthiaskrgr:rollup-mzxrvw7, r=matthiaskrgrbors-145/+495
Rollup of 6 pull requests Successful merges: - #110556 (Switch to `EarlyBinder` for `explicit_item_bounds`) - #110615 (Add `impl_tag!` macro to implement `Tag` for tagged pointer easily) - #110649 (Fix no_global_oom_handling build) - #110671 (Consider polarity in new solver) - #110783 (Fix ICE on --print=... i/o errors) - #110796 (Updating Wake example to use new 'pin!' macro) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-25Rollup merge of #110796 - madsravn:wake-example, r=Mark-SimulacrumMatthias Krüger-1/+2
Updating Wake example to use new 'pin!' macro Closes: https://github.com/rust-lang/rust/issues/109965 I have already had this reviewed and approved here: https://github.com/rust-lang/rust/pull/110026 . But because I had some git issues and chose the "nuke it" option as my solution it didn't get merged. I nuked it too quickly. I am sorry for trouble of reviewing twice.
2023-04-25Rollup merge of #110783 - dtolnay:safeprint, r=petrochenkovMatthias Krüger-40/+68
Fix ICE on --print=... i/o errors `rustc --print=cfg > /dev/full` **Before:** ICE (see below) **After:** exits quietly with code 1. ```console thread 'rustc' panicked at 'failed printing to stdout: No space left on device (os error 28)', library/std/src/io/stdio.rs:1019:9 stack backtrace: 0: 0x7ffa84d68f33 - std::backtrace_rs::backtrace::libunwind::trace::h527d8d64d53ade2d at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7ffa84d68f33 - std::backtrace_rs::backtrace::trace_unsynchronized::hfb55b01517dd6379 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7ffa84d68f33 - std::sys_common::backtrace::_print_fmt::hd134e914eea0bd97 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7ffa84d68f33 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1480db11ec399d77 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7ffa84dc9d4f - core::fmt::write::h67ec4c4171c92b26 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/core/src/fmt/mod.rs:1247:17 5: 0x7ffa84d5bed1 - std::io::Write::write_fmt::h3b12aef0fff2463b at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/io/mod.rs:1712:15 6: 0x7ffa84d68d45 - std::sys_common::backtrace::_print::h584400135abdbd51 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:47:5 7: 0x7ffa84d68d45 - std::sys_common::backtrace::print::hce41d3c8bd91096b at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:34:9 8: 0x7ffa84d6b84f - std::panicking::default_hook::{{closure}}::h2043b657a3791225 9: 0x7ffa84d6b507 - std::panicking::default_hook::h99252b8d3dd5719c at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/panicking.rs:293:9 10: 0x7ffa87fdf915 - <rustc_driver_impl[d30cd2737d9d343a]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[cc19a662f3570270]::ops::function::FnOnce<(&core[cc19a662f3570270]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0} 11: 0x7ffa84d6c005 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h222a2b674b9f4762 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/alloc/src/boxed.rs:1976:9 12: 0x7ffa84d6c005 - std::panicking::rust_panic_with_hook::h7f49b36bf7f8ff77 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/panicking.rs:704:13 13: 0x7ffa84d6bd73 - std::panicking::begin_panic_handler::{{closure}}::haa23a7352589e31e at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/panicking.rs:595:13 14: 0x7ffa84d69376 - std::sys_common::backtrace::__rust_end_short_backtrace::h3d0cf6e3c96e3fe9 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:150:18 15: 0x7ffa84d6ba72 - rust_begin_unwind at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/panicking.rs:584:5 16: 0x7ffa84dc5fe3 - core::panicking::panic_fmt::hf4b4ea11e3fdb110 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/core/src/panicking.rs:67:14 17: 0x7ffa84d5aa07 - std::io::stdio::print_to::h55760b9ede306280 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/io/stdio.rs:1019:9 18: 0x7ffa84d5aa07 - std::io::stdio::_print::h93deb6099db33eab at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/io/stdio.rs:1095:5 19: 0x7ffa871e163b - rustc_driver_impl[d30cd2737d9d343a]::print_crate_info 20: 0x7ffa87fb8e01 - rustc_span[9551eaa044f53f4f]::set_source_map::<(), rustc_interface[c2b70c9b1dae0906]::interface::run_compiler<(), rustc_driver_impl[d30cd2737d9d343a]::run_compiler::{closure#0}>::{closure#0}::{closure#0}> 21: 0x7ffa87fb6d59 - std[71a32ca0600a6a04]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c2b70c9b1dae0906]::util::run_in_thread_pool_with_globals<rustc_interface[c2b70c9b1dae0906]::interface::run_compiler<(), rustc_driver_impl[d30cd2737d9d343a]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()> 22: 0x7ffa87fe25b4 - std[71a32ca0600a6a04]::panicking::try::<(), core[cc19a662f3570270]::panic::unwind_safe::AssertUnwindSafe<<std[71a32ca0600a6a04]::thread::Builder>::spawn_unchecked_<rustc_interface[c2b70c9b1dae0906]::util::run_in_thread_pool_with_globals<rustc_interface[c2b70c9b1dae0906]::interface::run_compiler<(), rustc_driver_impl[d30cd2737d9d343a]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}>> 23: 0x7ffa87fb0cf1 - <<std[71a32ca0600a6a04]::thread::Builder>::spawn_unchecked_<rustc_interface[c2b70c9b1dae0906]::util::run_in_thread_pool_with_globals<rustc_interface[c2b70c9b1dae0906]::interface::run_compiler<(), rustc_driver_impl[d30cd2737d9d343a]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[cc19a662f3570270]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 24: 0x7ffa84d763e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf15d802f31f86225 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/alloc/src/boxed.rs:1962:9 25: 0x7ffa84d763e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hac564355b46c52d6 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/alloc/src/boxed.rs:1962:9 26: 0x7ffa84d763e5 - std::sys::unix::thread::Thread::new::thread_start::h86fb3aedb7811f07 at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys/unix/thread.rs:108:17 27: 0x7ffa84a94b43 - start_thread at ./nptl/pthread_create.c:442:8 28: 0x7ffa84b26a00 - clone3 at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 29: 0x0 - <unknown> error: 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.71.0-nightly (7f94b314c 2023-04-23) running on x86_64-unknown-linux-gnu query stack during panic: end of query stack ```
2023-04-25Rollup merge of #110671 - compiler-errors:polarity, r=lcnrMatthias Krüger-3/+126
Consider polarity in new solver It's kinda ugly to have a polarity check in all of the builtin impls -- I guess I could consider the polarity at the top of assemble-builtin but that would require adding a polarity fn to `GoalKind`... :shrug: putting this up just so i dont forget, since it's needed to bootstrap core during coherence (this alone does not allow core to bootstrap though, additional work is needed!) r? ``@lcnr``
2023-04-25Rollup merge of #110649 - arlosi:fix_no_global_oom_handling, r=Mark-SimulacrumMatthias Krüger-1/+0
Fix no_global_oom_handling build `provide_sorted_batch` in core is incorrectly marked with `#[cfg(not(no_global_oom_handling))]` which prevents core from building with the cfg enabled. Nothing in `core` allocates memory (including this function). The `cfg` gate is incorrect. cc ``@dpaoliello`` r? ``@wesleywiser`` The cfg was added by #107191
2023-04-25Rollup merge of #110615 - WaffleLapkin:impl_tag, r=cjgillotMatthias Krüger-29/+211
Add `impl_tag!` macro to implement `Tag` for tagged pointer easily r? `@Nilstrieb` This should also lifts the need to think about safety from the callers (`impl_tag!` is robust (ish, see the macro issue)) and removes the possibility of making a "weird" `Tag` impl.
2023-04-25Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, ↵Matthias Krüger-71/+88
r=compiler-errors Switch to `EarlyBinder` for `explicit_item_bounds` Part of the work to finish https://github.com/rust-lang/rust/issues/105779. This PR adds `EarlyBinder` to the return type of the `explicit_item_bounds` query and removes `bound_explicit_item_bounds`. r? `@compiler-errors` (hope it's okay to request you, since you reviewed #110299 and #110498 :smiley:)
2023-04-25simplify TrustedLen implsTamir Duberstein-34/+28
Implement on FlattenCompat and delegate from Flatten and FlatMap.
2023-04-25Fix static string lintsclubby789-200/+491
2023-04-25Add deny lint to prevent untranslatable diagnostics using static stringsclubby789-1/+87
2023-04-25Add `#[inline]` in `impl_tag`Maybe Waffle-0/+2
2023-04-25Sprinkle some `#[inline]` in `rustc_data_structures::tagged_ptr`Maybe Waffle-0/+17
2023-04-25Move unstatisfaction check earlier.Camille GILLOT-50/+44
2023-04-25Auto merge of #110518 - loongarch-rs:update-linux-raw-sys, r=Mark-Simulacrumbors-14/+23
Update linux-raw-sys to 0.3.4 To support LoongArch. Changes: ``` Updating errno v0.2.8 -> v0.3.1 Updating is-terminal v0.4.4 -> v0.4.7 Updating linux-raw-sys v0.1.4 -> v0.3.4 Updating rustix v0.36.5 -> v0.37.7 Updating terminal_size v0.2.3 -> v0.2.6 Adding windows-sys v0.48.0 ``` The changes are generated by: ```bash cargo update -p is-terminal -p terminal_size ```
2023-04-25Improve `non-ice-error-on-worker-io-fail.rs` testMaybe Waffle-13/+5
- Remove unrelated code - Use a local dir path
2023-04-25Fix `ui/io-checks/inaccessbile-temp-dir.rs` testMaybe Waffle-43/+32
2023-04-25Fix ICE on --print=... i/o errorsDavid Tolnay-40/+68
2023-04-25pass `unused_extern_crates` in `librustdoc::doctest::make_test`ozkanonur-1/+9
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-25Auto merge of #110325 - obeis:hir-analysis-migrate-diagnostics-4, r=davidtwcobors-85/+254
Migrate `rustc_hir_analysis` to session diagnostic [Part 4] Part 4: Finishing `check/mod.rs` file r? `@compiler-errors`
2023-04-25Updating Wake example to use new 'pin!' macroMads Ravn-1/+2
2023-04-25Auto merge of #103093 - rytheo:linked-list-alloc-api, r=Mark-Simulacrumbors-137/+226
Add support for allocators in `LinkedList` Allows `LinkedList` to use a custom allocator
2023-04-25Auto merge of #101069 - zhaixiaojuan:loongarch64-inline-asm, r=Amanieubors-1/+380
Add loongarch64 asm! support
2023-04-25Use the standard macOS CI runnerRyan Levick-7/+7
2023-04-25Auto merge of #110389 - mazong1123:add-shortcut-for-grisu3, r=Mark-Simulacrumbors-0/+43
Add shortcut for Grisu3 algorithm. While Grisu3 is way more faster for most numbers compare to Dragon4, the fall back to Dragon4 procedure for certain numbers could cause some performance regressions compare to use Dragon4 directly. Mitigating the regression caused by falling back is important for a largely used core library. In Grisu3 algorithm implementation, there's a shortcut to jump out earlier when the fractional or integrals cannot meet the requirement of requested digits. This could significantly improve the performance of converting floating number to string as it falls back even without starting trying the algorithm. The original idea is from the [.NET implementation](https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Number.Grisu3.cs#L602-L615) and the code was originally added in [this PR](https://github.com/dotnet/coreclr/pull/14646#issuecomment-350942050). This shortcut has been shipped long time ago and has been proved working. Fix #110129
2023-04-25Add loongarch64 asm! supportzhaixiaojuan-1/+380
2023-04-25Negative coherence testMichael Goulet-0/+52
2023-04-25Auto merge of #110789 - matthiaskrgr:rollup-92e764u, r=matthiaskrgrbors-579/+1567
Rollup of 5 pull requests Successful merges: - #110563 (Break up long function in trait selection error reporting + clean up nearby code) - #110755 ([LLVM17] Adapt to `ExplicitEmulatedTLS` removal.) - #110775 (Update books) - #110779 (configure.py: add flag for riscv{64,32}gc musl-root) - #110782 (Revert panic oom) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-25Rollup merge of #110782 - matthiaskrgr:revert_panic_oom, r=AmanieuMatthias Krüger-138/+878
Revert panic oom This temporarily reverts https://github.com/rust-lang/rust/pull/109507 until https://github.com/rust-lang/rust/issues/110771 is addressed r? `@Amanieu`
2023-04-25Rollup merge of #110779 - jchzhou:patch, r=albertlarsan68Matthias Krüger-0/+4
configure.py: add flag for riscv{64,32}gc musl-root Add the corresponding flag for detecting `--musl-root-riscv64gc` and `--musl-root-riscv32gc` with ./configure, which is beneficial for downstream Linux distros to create the rust package with the same "recipe" from other architectures.
2023-04-25Rollup merge of #110775 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/book 1 commits in c06006157b14b3d47b5c716fc392b77f3b2e21ce..8fa6b854d515506d825390fe0d817f5ef0c89350 2023-04-13 00:05:30 UTC to 2023-04-13 00:05:30 UTC - Update copyright in LICENSE-APACHE (rust-lang/book#3611) ## rust-embedded/book 1 commits in 701d1551429da4cb609082c0ac99df569e336710..897fcf566f16bf87bf37199bdddec1801fd00532 2023-04-20 13:24:51 UTC to 2023-04-20 13:24:51 UTC - typos (rust-embedded/book#347) ## rust-lang/rustc-dev-guide 5 commits in 6337ed17fb8dcd918d78b7d97d213e923530337c..2a5eb92197e9cf8fe91164dcbf4f9b88c0d7e73d 2023-04-22 11:50:11 UTC to 2023-04-16 11:30:24 UTC - Add docs for compare-output-lines-by-subset flag (rust-lang/rustc-dev-guide#1677) - fix typo (rust-lang/rustc-dev-guide#1674) - Fix links in how-to-build-and-run.md (rust-lang/rustc-dev-guide#1679) - docs: document new `suggest-tests` tool (rust-lang/rustc-dev-guide#1660) - Fix extra slash (rust-lang/rustc-dev-guide#1673)
2023-04-25Rollup merge of #110755 - TimNN:exp-tls, r=durin42Matthias Krüger-0/+5
[LLVM17] Adapt to `ExplicitEmulatedTLS` removal. https://github.com/llvm/llvm-project/commit/0d333bf0e3aa37e2e6ae211e3aa80631c3e01b85 removed the `ExplicitEmulatedTLS` field from `TargetOptions`. Before that commit, `TargetMachine::useEmulatedTLS()` fell back to `TheTriple.hasDefaultEmulatedTLS()` if `ExplicitEmulatedTLS` was `false`/unset. After that commit, `TargetMachine::useEmulatedTLS()` directly returns `Options.EmulatedTLS`, and the fallback to `TheTriple.hasDefaultEmulatedTLS()` was moved to `InitTargetOptionsFromCodeGenFlags`. Since `rustc` does not use `InitTargetOptionsFromCodeGenFlags` (AFAICT) and instead manually builds `TargetOptions`, this PR initializes `EmulatedTLS` to `TheTriple.hasDefaultEmulatedTLS()`. (I'm not really familiar with the details of what this option does, or if there are any tests that depend on `hasDefaultEmulatedTLS` being used correctly, so this PR is mostly untested (it does compile against LLVM17, though)). `@rustbot` label: +llvm-main
2023-04-25Rollup merge of #110563 - ↵Matthias Krüger-441/+680
bryangarza:refactor-trait-selection-error-reporting, r=compiler-errors Break up long function in trait selection error reporting + clean up nearby code - Move blocks of code into their own functions - Replace a few function argument types with their type aliases - Create "AppendConstMessage" enum to replace a nested `Option`.
2023-04-25Add shortcut for Grisu3 algorithm.mazong1123-0/+43
Check requested digit length and the fractional or integral parts of the number. Falls back earlier without trying the Grisu algorithm if the specific condition meets. Fix #110129
2023-04-24Add support for allocators in LinkedListRyan Lowe-137/+226
2023-04-25Auto merge of #110232 - Amanieu:old-llvm-components, r=petrochenkovbors-1/+17
Allow older LLVM versions to have missing components This check was introduced by #77280 to ensure that all tests that are filtered by LLVM component are actually tested in CI. However this causes issues for new targets (e.g. #101069) where support is only available on the latest LLVM version. This PR restricts the tests to only CI jobs that use the latest LLVM version.
2023-04-24Revert "Download the GCC sources insecurely"Josh Stone-2/+1
This reverts commit 3da037f82988b8b3aca2ce13c5c81ba975923cab.
2023-04-24Auto merge of #106152 - SUPERCILEX:lazycell, r=Amanieubors-1/+65
Add LazyCell::into_inner This enables uses cases that need to extract the evaluated value and do something owned with it.
2023-04-25Revert "Report allocation errors as panics"Matthias Krüger-107/+27
This reverts commit c9a6e41026d7aa27d897fb83e995447719753076.
2023-04-25Revert "Remove #[alloc_error_handler] from the compiler and library"Matthias Krüger-22/+842
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
2023-04-25Revert "Rename -Zoom=panic to -Zoom=unwind"Matthias Krüger-8/+8
This reverts commit 4b981c26487ebe56de6b3000fcd98713804beefc.
2023-04-25Revert "Adjust expected result for coverage test"Matthias Krüger-3/+3
This reverts commit 4da05e0b88d8b51fc6912da2d0b93edb2780e76b.
2023-04-24Auto merge of #110718 - flip1995:clippyup, r=Manishearthbors-1405/+2308
Update Clippy r? `@Manishearth` A few days late, I was on a business trip, sorry.
2023-04-24Auto merge of #110778 - JohnTitor:rollup-7f51qwk, r=JohnTitorbors-639/+1150
Rollup of 10 pull requests Successful merges: - #110480 (Add `known-bug` tests for 11 unsound issues) - #110539 (Move around `{Idx, IndexVec, IndexSlice}` adjacent code) - #110590 (Add some tests around (lack of) object safety of associated types and consts) - #110602 (Ignore src/bootstrap formatting commit in .git-blame-ignore-revs) - #110667 (pointer-auth-link-with-c: Fix cross compilation.) - #110681 (drop few unused crates, gate libc under unix for rustc_codegen_ssa) - #110685 (Some cleanups to DataflowConstProp) - #110744 (bootstrap: update paths cargo-credential crate) - #110750 (Add size asserts for MIR `SourceScopeData` & `VarDebugInfo`) - #110760 (rustdoc: Add regression test for #60522) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-24Consider polarity in new solverMichael Goulet-3/+74
2023-04-24Fully clear the body.Camille GILLOT-11/+13
2023-04-25Rollup merge of #110760 - GuillaumeGomez:regression-60522, r=notriddleYuki Okushi-0/+39
rustdoc: Add regression test for #60522 Fixes https://github.com/rust-lang/rust/issues/60522. r? `@notriddle`
2023-04-25Rollup merge of #110750 - scottmcm:vardebug-size, r=cjgillotYuki Okushi-0/+2
Add size asserts for MIR `SourceScopeData` & `VarDebugInfo` There's vectors of both of these in `mir::Body`, so might as well track them. (I was pondering adding something to one or the other, so wanted this to see the memory impact.)
2023-04-25Rollup merge of #110744 - weihanglo:cargo-credential-install, r=ehussYuki Okushi-3/+3
bootstrap: update paths cargo-credential crate This should be done in #110653 but forgot. Fixes #110742 ## How to verify this patch Run `./x.py build cargo`. Previously it would fail with ```console error: manifest path `/projects/rust/src/tools/cargo/crates/credential/cargo-credential-1password/Cargo.toml` does not exist ```
2023-04-25Rollup merge of #110685 - cjgillot:clean-dcp, r=oli-obkYuki Okushi-73/+52
Some cleanups to DataflowConstProp Mostly moving code around and short-circuiting useless cases.