about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-03-02Stabilize movbe target featureCaleb Zulawski-4/+4
2023-03-02Auto merge of #108654 - LeSeulArtichaut:revert-99767, r=compiler-errorsbors-78/+151
Revert stabilization of `#![feature(target_feature_11)]` This reverts #99767 due to the presence of bugs #108645 and #108646. cc `@joshtriplett` cc tracking issue #69098 r? `@ghost`
2023-03-02Auto merge of #108640 - matthiaskrgr:rollup-rii4t5t, r=matthiaskrgrbors-64/+252
Rollup of 5 pull requests Successful merges: - #108516 (Restrict `#[rustc_box]` to `Box::new` calls) - #108575 (Erase **all** regions when probing for associated types on ambiguity in astconv) - #108585 (Run compiler test suite in parallel on Fuchsia) - #108606 (Add test case for mismatched open/close delims) - #108609 (Highlight whole expression for E0599) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-02Revert "Stabilize `#![feature(target_feature_11)]`"Léo Lanteri Thauvin-78/+151
This reverts commit b379d216eefaba083a0627b1724d73f99d4bdf5c.
2023-03-02Rollup merge of #108609 - clubby789:e0599-highlight, r=estebankMatthias Krüger-15/+31
Highlight whole expression for E0599 Fixes #108603 This adds a secondary label to highlight the whole expression leading to the error. It also prevents empty labels being recognised as 'unexpected' by compiletest - otherwise, tests with NOTE annotations would pick up empty labels. `@rustbot` label +A-diagnostics
2023-03-02Rollup merge of #108606 - chenyukang:yukang/fix-104367, r=compiler-errorsMatthias Krüger-0/+57
Add test case for mismatched open/close delims Fixes #104367 Fixes #105209 After landing https://github.com/rust-lang/rust/pull/108297, these issues are resolved.
2023-03-02Rollup merge of #108585 - djkoloski:parallel_fuchsia_test_runner, r=tmandryMatthias Krüger-18/+28
Run compiler test suite in parallel on Fuchsia This also adds file locking around calls to `pm publish` as these calls are not thread-safe.
2023-03-02Rollup merge of #108575 - compiler-errors:erase, r=estebankMatthias Krüger-2/+21
Erase **all** regions when probing for associated types on ambiguity in astconv Fixes #108562
2023-03-02Rollup merge of #108516 - clubby789:rustc-box-restrict, r=compiler-errorsMatthias Krüger-29/+115
Restrict `#[rustc_box]` to `Box::new` calls Currently, `#[rustc_box]` can be applied to any call expression with a single argument. This PR only allows it to be applied to calls to `Box::new`
2023-03-02Auto merge of #107879 - icedrocket:update-llvm, r=cuviperbors-9/+34
Update LLVM submodule Fixes #105626
2023-03-02Restrict `#[rustc_box]` to `Box::new` callsclubby789-29/+115
2023-03-02Auto merge of #106673 - flba-eb:add_qnx_nto_stdlib, r=workingjubileebors-81/+603
Add support for QNX Neutrino to standard library This change: - adds standard library support for QNX Neutrino (7.1). - upgrades `libc` to version `0.2.139` which supports QNX Neutrino `@gh-tr` ⚠️ Backtraces on QNX require https://github.com/rust-lang/backtrace-rs/pull/507 which is not yet merged! (But everything else works without these changes) ⚠️ Tested mainly with a x86_64 virtual machine (see qnx-nto.md) and partially with an aarch64 hardware (some tests fail due to constrained resources).
2023-03-01Auto merge of #108483 - scottmcm:unify-bytewise-eq-traits, r=the8472bors-94/+182
Merge two different equality specialization traits in `core` Arrays and slices each had their own version of this, without a matching set of `impl`s. Merge them into one (still-`pub(crate)`) `cmp::BytewiseEq` trait, so we can stop doing all these things twice. And that means that the `[T]::eq` → `memcmp` specialization picks up a bunch of types where that previously only worked for arrays, so examples like <https://rust.godbolt.org/z/KjsG8MGGT> will use it now instead of emitting loops. r? the8472
2023-03-01Merge two different equality specialization traits in `core`Scott McMurray-94/+182
2023-03-01Run compiler test suite in parallel on FuchsiaDavid Koloski-18/+28
2023-03-01Auto merge of #108620 - Dylan-DPC:rollup-o5c4evy, r=Dylan-DPCbors-72/+642
Rollup of 7 pull requests Successful merges: - #108143 (rustdoc: search by macro when query ends with `!`) - #108394 (Make `x doc --open` work on every book) - #108427 (Recover from for-else and while-else) - #108462 (Fix `VecDeque::append` capacity overflow for ZSTs) - #108568 (Make associated_item_def_ids for traits use an unstable option to also return associated types for RPITITs) - #108604 (Add regression test for #107280) - #108605 (Add regression test for #105821) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-01Rollup merge of #108605 - JohnTitor:issue-105821, r=compiler-errorsDylan DPC-0/+23
Add regression test for #105821 Closes #105821 r? compiler-errors
2023-03-01Rollup merge of #108604 - JohnTitor:issue-107280, r=compiler-errorsDylan DPC-0/+97
Add regression test for #107280 Closes #107280 r? compiler-errors
2023-03-01Rollup merge of #108568 - spastorino:new-rpitit-flag, r=compiler-errorsDylan DPC-9/+132
Make associated_item_def_ids for traits use an unstable option to also return associated types for RPITITs r? `@compiler-errors`
2023-03-01Rollup merge of #108462 - pommicket:fix-vecdeque-zst-overflow, r=AmanieuDylan DPC-1/+15
Fix `VecDeque::append` capacity overflow for ZSTs Fixes #108454.
2023-03-01Rollup merge of #108427 - y21:for-else-diagnostic, r=compiler-errorsDylan DPC-22/+218
Recover from for-else and while-else This recovers from attempts at writing for-else or while-else loops, which might help users coming from e.g. Python. ```rs for _ in 0..0 { // ... } else { // ... } ``` Combined with trying to store it in a let binding, the current diagnostic can be a bit confusing. It mentions let-else and suggests wrapping the loop in parentheses, which the user probably doesn't want. let-else doesn't make sense for `for` and `while` loops, as they are of type `()` (which already is an irrefutable pattern and doesn't need let-else). <details> <summary>Current diagnostic</summary> ```rs error: right curly brace `}` before `else` in a `let...else` statement not allowed --> src/main.rs:4:5 | 4 | } else { | ^ | help: wrap the expression in parentheses | 2 ~ let _x = (for _ in 0..0 { 3 | 4 ~ }) else { | ``` </details> Some questions: - Can the wording for the error message be improved? Would "for...else loops are not allowed" fit better? - Should we be more "conservative" in case we want to support this in the future (i.e. say "for...else loops are **currently** not allowed/supported")? - Is there a better way than storing a `&'static str` for the loop type? It is used for substituting the placeholder in the locale file (since it can emit either `for...else` or `while...else`). Maybe there is an enum I could use that I couldn't find
2023-03-01Rollup merge of #108394 - ferrocene:pa-open, r=ozkanonurDylan DPC-15/+20
Make `x doc --open` work on every book Before this PR, the `--open` flag had to be configured explicitly for every book, and most of them didn't configure it, resulting in the flag silently failing in all but two books. In this PR, the code to check for the `--open` flag is in the underlying `RustbookSrc` step rather than all the individual steps. This is done by passing the parent step as a field of `RustbookSrc`, so that we can check for the correct step in `maybe_open_in_browser`. This was part of a larger change that in the end wasn't worth it. Still, I think it could be useful as-is.
2023-03-01Rollup merge of #108143 - notriddle:notriddle/filter-exclamation-macro, ↵Dylan DPC-25/+137
r=GuillaumeGomez rustdoc: search by macro when query ends with `!` Related to #96399 Note: the `never` type alias is tested in [`/tests/rustdoc-js-std/alias-3.js`](https://github.com/notriddle/rust/blob/08ad401633037cc226b3806a3c5f48c2f34703bf/tests/rustdoc-js-std/alias-3.js) ## Before ![image](https://user-images.githubusercontent.com/1593513/219504192-54cc0753-ff97-4a37-ad4a-8ae915181325.png) ## After ![image](https://user-images.githubusercontent.com/1593513/219504251-589a7e11-1e7b-4b7b-879d-1b564080017c.png)
2023-03-01Properly implement should_encode_fn_impl_trait_in_trait using new unstable ↵Santiago Pastorino-3/+12
option
2023-03-01Highlight whole expression for E0599clubby789-15/+31
2023-03-01Make associated_item_def_ids for traits use an unstable option to also ↵Santiago Pastorino-5/+100
return associated types for RPITITs
2023-03-01Fix typo in docsSantiago Pastorino-1/+1
2023-03-01Add unstable option new_rpitit to be used for new RPITIT lowering systemSantiago Pastorino-0/+4
2023-03-01Add opt_rpitit_info querySantiago Pastorino-0/+15
2023-03-01Auto merge of #108446 - Zoxc:named-allocs, r=oli-obkbors-5/+11
Name LLVM anonymous constants by a hash of their contents This makes the names stable between different versions of a crate unlike the `AllocId` naming, making LLVM IR comparisons with `llvm-diff` more practical.
2023-03-01Add testcase for issue 105209yukang-0/+25
2023-03-01Fix #104367, add test case for mismatched open/close delimsyukang-0/+32
2023-03-01Add regression test for #105821Yuki Okushi-0/+23
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-03-01Add regression test for #107280Yuki Okushi-0/+97
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-03-01Auto merge of #105871 - llogiq:option-as-slice, r=scottmcmbors-0/+148
Add `Option::as_`(`mut_`)`slice` This adds the following functions: * `Option<T>::as_slice(&self) -> &[T]` * `Option<T>::as_mut_slice(&mut self) -> &[T]` The `as_slice` and `as_mut_slice_mut` functions benefit from an optimization that makes them completely branch-free. ~~Unfortunately, this optimization is not available on by-value Options, therefore the `into_slice` implementations use the plain `match` + `slice::from_ref` approach.~~ Note that the optimization's soundness hinges on the fact that either the niche optimization makes the offset of the `Some(_)` contents zero or the mempory layout of `Option<T>` is equal to that of `Option<MaybeUninit<T>>`. The idea has been discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Option.3A.3Aas_slice). Notably the idea for the `as_slice_mut` and `into_slice´ methods came from `@cuviper` and `@Sp00ph` hardened the optimization against niche-optimized Options. The [rust playground](https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=74f8e4239a19f454c183aaf7b4a969e0) shows that the generated assembly of the optimized method is basically only a copy while the naive method generates code containing a `test dx, dx` on x86_64. --- EDIT from reviewer: ACP is https://github.com/rust-lang/libs-team/issues/150
2023-03-01recover from for-else and while-elsey21-22/+218
2023-03-01Auto merge of #108476 - saethlin:remove-library-rustc-box, r=thomccbors-9/+7
Remove or document uses of #[rustc_box] in library r? `@thomcc` Only one of these uses is tested for in the rustc-perf benchmark suite. The impact there on compile time is somewhat dramatic, but I am inclined to make this change as a simplification to the library and wait for people to complain if it explodes their compilation time. I think in the absence of data or reports from users about what code paths really matter, if we are optimizing for compilation time, it's hard to argue against using `#[rustc_box]` everywhere we currently call `Box::new`.
2023-03-01Auto merge of #108587 - matthiaskrgr:rollup-rw6po59, r=matthiaskrgrbors-227/+343
Rollup of 10 pull requests Successful merges: - #108376 (compiler/rustc_session: fix sysroot detection logic) - #108400 (add llvm cgu instructions stats to perf) - #108496 (fix #108495, postfix decrement and prefix decrement has no warning) - #108505 (Further unify validity intrinsics) - #108520 (Small cleanup to `one_bound_for_assoc_type`) - #108560 (Some `infer/mod.rs` cleanups) - #108563 (Make mailmap more correct) - #108564 (Fix `x clean` with specific paths) - #108571 (Add contains_key to SortedIndexMultiMap) - #108578 (Update Fuchsia platform team members) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-01Update library/std/src/os/nto/mod.rsFlorian Bartels-1/+1
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2023-03-01Auto merge of #108586 - matthiaskrgr:rollup-ry9u2ou, r=matthiaskrgrbors-1729/+550
Rollup of 8 pull requests Successful merges: - #108297 (Exit when there are unmatched delims to avoid noisy diagnostics) - #108531 (rustdoc: Show that repeated expression arrays can be made with constant values) - #108536 (Update books) - #108550 (Remove the `capture_disjoint_fields` feature) - #108551 (Descriptive error when users try to combine RPITIT/AFIT with specialization) - #108554 (Only look for param in item's generics if it actually comes from generics) - #108555 (Fix a race in the query system) - #108558 (add missing feature in core/tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-01Rollup merge of #108578 - djkoloski:update_fuchsia_team, r=tmandryMatthias Krüger-1/+0
Update Fuchsia platform team members r? `@tmandry`
2023-03-01Rollup merge of #108571 - Jesse-Bakker:sorted_index_multi_map_contains_key, ↵Matthias Krüger-0/+9
r=Nilstrieb Add contains_key to SortedIndexMultiMap
2023-03-01Rollup merge of #108564 - clubby789:patch-1, r=jyn514Matthias Krüger-0/+1
Fix `x clean` with specific paths Fixes #108517 `cargo clean` takes package names to clean with `-p`, rather than as free args
2023-03-01Rollup merge of #108563 - albertlarsan68:patch-1, r=compiler-errorsMatthias Krüger-1/+1
Make mailmap more correct
2023-03-01Rollup merge of #108560 - Nilstrieb:infer-cleanup, r=compiler-errorsMatthias Krüger-39/+11
Some `infer/mod.rs` cleanups
2023-03-01Rollup merge of #108520 - compiler-errors:one-bound-nit, r=jackh726Matthias Krüger-20/+16
Small cleanup to `one_bound_for_assoc_type` Use fewer closures :)
2023-03-01Rollup merge of #108505 - Nilstrieb:further-unify-validity-intrinsics, ↵Matthias Krüger-163/+119
r=michaelwoerister Further unify validity intrinsics Also merges the inhabitedness check into the query to further unify the code paths. Depends on #108364
2023-03-01Rollup merge of #108496 - nx2k3:issue-108495-dec, r=WaffleLapkinMatthias Krüger-2/+134
fix #108495, postfix decrement and prefix decrement has no warning Fixes #108495
2023-03-01Rollup merge of #108400 - csmoe:cgu-instr-perf, r=bjorn3Matthias Krüger-0/+41
add llvm cgu instructions stats to perf r? ```@bjorn3```
2023-03-01Rollup merge of #108376 - liushuyu:fix-sysroot-infer-103660, r=ozkanonurMatthias Krüger-1/+11
compiler/rustc_session: fix sysroot detection logic This pull request fixes the sysroot detection logic on systems where `/usr/lib` contains a multi-arch structure (e.g. installs `rustc_driver` into `/usr/lib/x86_64-linux-gnu` folder). This fixes a regression for various Linux systems introduced in #103660. On Debian and Ubuntu systems, the logic in the pull request, as mentioned earlier, will resolve the sysroot to `/usr/lib`, making `rustc --print target-libdir` to return `/usr/lib/lib/rustlib/x86_64-unknown-linux-gnu/lib` (notice the extra `lib` at the beginning). The fix is not very "clean" according to the standard. If you have any suggestions on improving the logic, you are more than welcome to comment below!