about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-04-25Fix static string lintsclubby789-200/+491
2023-04-25Add deny lint to prevent untranslatable diagnostics using static stringsclubby789-1/+87
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-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-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-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-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-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.
2023-04-25Rollup merge of #110681 - klensy:cut-dep, r=lcnrYuki Okushi-23/+3
drop few unused crates, gate libc under unix for rustc_codegen_ssa Small cleanup.
2023-04-25Rollup merge of #110667 - pcc:fix-pointer-auth-link-with-c, r=Mark-SimulacrumYuki Okushi-2/+2
pointer-auth-link-with-c: Fix cross compilation.
2023-04-25Rollup merge of #110602 - jyn514:ignore-fmt, r=Mark-SimulacrumYuki Okushi-0/+2
Ignore src/bootstrap formatting commit in .git-blame-ignore-revs https://github.com/rust-lang/rust/commit/b39a1d6f1a30ba29f25d7141038b9a5bf0126e36
2023-04-25Rollup merge of #110590 - oli-obk:object_safe_assoc_types, r=jackh726Yuki Okushi-0/+141
Add some tests around (lack of) object safety of associated types and consts See https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/.60where.20Self.3ASized.60.20on.20assoc.20types/near/351260928 for some discussion around why this isn't allowed. We didn't have any tests for these, so I decided to add them now, even if we don't end up doing anything about it.
2023-04-25Rollup merge of #110539 - WaffleLapkin:split_index_vec&slice, r=cjgillotYuki Okushi-538/+558
Move around `{Idx, IndexVec, IndexSlice}` adjacent code r? ``@scottmcm``
2023-04-25Rollup merge of #110480 - whtahy:105107/known-bug-tests-for-unsound-issues, ↵Yuki Okushi-0/+348
r=jackh726 Add `known-bug` tests for 11 unsound issues r? ``@jackh726`` Should tests for other issues be in separate PRs? Thanks. Edit: Partially addresses #105107. This PR adds `known-bug` tests for 11 unsound issues: - #25860 - #49206 - #57893 - #84366 - #84533 - #84591 - #85099 - #98117 - #100041 - #100051 - #104005
2023-04-25configure.py: add flag for riscv{64,32}gc musl-rootjchzhou-0/+4
2023-04-24Auto merge of #110713 - cjgillot:track-mir-opt, r=scottmcmbors-170/+757
Add mir-opt tests to track MIR quality. cc `@scottmcm` `@saethlin` If you have other ideas, please say so.
2023-04-24Update booksrustbot-0/+0
2023-04-24Fix `rustc_index` imports outside the compilerMaybe Waffle-25/+27
2023-04-24Decorative changes to `IndexVec`Maybe Waffle-13/+12
2023-04-24`const`-ify some `{IndexVec, IndexSlice}` methodsMaybe Waffle-11/+11
2023-04-24move index code aroundMaybe Waffle-99/+100
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-454/+472
2023-04-24Auto merge of #110672 - Ezrashaw:allow-array-simd-in-inline-asm, ↵bors-13/+50
r=workingjubilee allow array-style simd in inline asm Required for [MCP#621](https://github.com/rust-lang/compiler-team/issues/621) to be implemented. r? `@workingjubilee`
2023-04-24Add regression test for #60522Guillaume Gomez-0/+39
2023-04-24Auto merge of #110752 - matthiaskrgr:rollup-959s77u, r=matthiaskrgrbors-395/+509
Rollup of 6 pull requests Successful merges: - #110255 (Suggest using integration tests for test crate using own proc-macro) - #110514 (Remove `find_map_relevant_impl`) - #110566 (Don't create projection ty for const projection) - #110637 (Group some sections of our logs in github actions) - #110706 (Add `intrinsics::transmute_unchecked`) - #110714 (Normalize types and consts in MIR opts.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-24[LLVM17] Adapt to `ExplicitEmulatedTLS` removal.Tim Neumann-0/+5
2023-04-24Clippy book: hotfix for broken linkPhilipp Krones-1/+1
2023-04-24Rollup merge of #110714 - cjgillot:reveal-consts, r=oli-obkMatthias Krüger-9/+23
Normalize types and consts in MIR opts. Some passes were using a non-RevealAll param_env, which is needlessly restrictive in mir-opts. As a drive-by, we normalize all constants, since just normalizing their types is not enough.
2023-04-24Rollup merge of #110706 - scottmcm:transmute_unchecked, r=oli-obkMatthias Krüger-54/+43
Add `intrinsics::transmute_unchecked` This takes a whole 3 lines in `compiler/` since it lowers to `CastKind::Transmute` in MIR *exactly* the same as the existing `intrinsics::transmute` does, it just doesn't have the fancy checking in `hir_typeck`. Added to enable experimenting with the request in <https://github.com/rust-lang/rust/pull/106281#issuecomment-1496648190> and because the portable-simd folks might be interested for dependently-sized array-vector conversions. It also simplifies a couple places in `core`. See also https://github.com/rust-lang/rust/pull/108442#issuecomment-1474777273, where `CastKind::Transmute` was added having exactly these semantics before the lang meeting (which I wasn't in) independently expressed interest.
2023-04-24Rollup merge of #110637 - oli-obk:gha, r=jyn514Matthias Krüger-177/+190
Group some sections of our logs in github actions This makes logs a little bit more readable as you can now collapse all the parts that don't interest you (and they get collapsed automatically) Obviously there's a lot more sites where we can/need to do this, too, but this is already helpful imo r? ```@jyn514```
2023-04-24Rollup merge of #110566 - compiler-errors:bad-projection-term, ↵Matthias Krüger-8/+56
r=cjgillot,BoxyUwU Don't create projection ty for const projection Fixes #110549