about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-11-07core: move intrinsics.rs into intrinsics folderRalf Jung-6/+6
2024-11-07Auto merge of #132722 - joboet:rollup-0q67jyo, r=joboetbors-76/+150
Rollup of 6 pull requests Successful merges: - #132057 (miri: update ABI compat checks to accept Option-like types) - #132665 (Implement `div_ceil` for `NonZero<unsigned>`) - #132694 (fix(x): fix a regex used to find python executable) - #132707 (Add --diagnostic-width to some tests failing after 1a0c5021838) - #132715 (fix `LazyLock::get` and `LazyLock::get_mut` document) - #132716 (chore(issue-template): fix branch name) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-07Rollup merge of #132716 - ismailarilik:chore/issue-template/fix-branch-name, ↵Jonas Böttiger-1/+1
r=tgross35 chore(issue-template): fix branch name It was renamed to "main" from "master". It might seem not important (actually it is not important) but I think there is no need to see this every time when we clicked this link: ![image](https://github.com/user-attachments/assets/145dc587-c365-47e6-83da-69c17f409f71) And this way is faster I guess.
2024-11-07Rollup merge of #132715 - tabokie:fix-lazy-lock-doc, r=NoratriebJonas Böttiger-2/+2
fix `LazyLock::get` and `LazyLock::get_mut` document
2024-11-07Rollup merge of #132707 - zmodem:tests_vs_diagnostic_width, r=jieyouxuJonas Böttiger-54/+58
Add --diagnostic-width to some tests failing after 1a0c5021838 Otherwise the tests would fail depending on the execution environment.
2024-11-07Rollup merge of #132694 - ↵Jonas Böttiger-1/+1
ismailarilik:fix/x/fix-a-regex-used-to-find-python-executable, r=jieyouxu fix(x): fix a regex used to find python executable Isn't the regex `^python[2-3]\.[0-9]\+$` wrong? It doesn't match, for example, with `python2.8`. There should be a plus sign at the end for a match, like `python2.8+`. I think `[0-9]+` is meant here instead of `[0-9]\+`. In that case a string like `python2.8` would match. This wasn't noticed because the script probably find and run the Python executable before this line.
2024-11-07Rollup merge of #132665 - tyilo:nonzero-u-div-ceil, r=joboetJonas Böttiger-0/+29
Implement `div_ceil` for `NonZero<unsigned>` ACP: https://github.com/rust-lang/libs-team/issues/471
2024-11-07Rollup merge of #132057 - RalfJung:miri-abi-compat, r=wesleywiserJonas Böttiger-18/+59
miri: update ABI compat checks to accept Option-like types This implements the t-lang decision described [here](https://github.com/rust-lang/rust/pull/130628#issuecomment-2402761599). Fixes https://github.com/rust-lang/miri/issues/3983
2024-11-07Auto merge of #132635 - kiike:fix/dots_in_target, r=onur-ozkanbors-3/+11
bootstrap: add quoting support to avoid splitting With this change, it is now possible to pass quotes to the configure script, such as `./configure.py --set=target.\"thumbv8m.main-none-eabi\".linker=/linker` or `./configure.py '--set=target."thumbv8m.main-none-eabi".linker=/linker'` , which will treat `thumbv8.main-none-eabi` as a whole part. Currently, the string would be split into two elements: `thumbv8`, and `main-none-eabi`. The approach taken is to perform custom splitting instead of using `str.split()` and then repairing the split. Also, There are numerous corner cases not handled: the custom split doesn't differentiate between single quotes or double quotes, so it is perfectly possible to pass `./configure.py --set=target.\"thumbv8m.main-none-eabi\'.linker=/linker` and the behaviour would be the same as with all double quotes or single quotes. As for the code, i'm unsure on whether to delimit strings with double or single quotes. I've seen both single quotes and double quotes used to delimit strings, like in ```py err("Option '{}' provided more than once".format(key)) ``` and this a handful of lines down: ```py if option.name == 'sccache': set('llvm.ccache', 'sccache', config) ``` Please advise on the wanted one. Fixes #130602 r? `@onur-ozkan` Thanks in advance for the feedback!
2024-11-07Auto merge of #132710 - matthiaskrgr:padautz, r=jieyouxubors-0/+94
more crash tests r? `@jieyouxu`
2024-11-07chore(issue-template): fix branch nameismailarilik-1/+1
It was renamed to "main" from "master".
2024-11-07Auto merge of #132705 - kornelski:inline-repeat, r=tgross35bors-0/+1
Inline str::repeat `str` is non-generic and `str.repeat()` doesn't get inlined, which makes it use a slower algorithm in case of 1-char repetitions. Equivalent byte slice does get inlined: https://rust.godbolt.org/z/4arvh97r4
2024-11-07fix lazylock commentXinye-2/+2
Signed-off-by: Xinye <xinye.tao@metabit-trading.com>
2024-11-07Auto merge of #131888 - ChrisDenton:deopt, r=ibraheemdevbors-57/+12
Revert using `HEAP` static in Windows alloc Fixes #131468 This does the minimum to remove the `HEAP` static that was causing chromium issues. It would be worth having a more substantial look at this module but for now I think this addresses the immediate issue. cc `@danakj`
2024-11-06Auto merge of #132625 - compiler-errors:cache-only-if-opaque, r=lcnrbors-6/+18
Only disable cache if predicate has opaques within it This is an alternative to https://github.com/rust-lang/rust/pull/132075. This refines the check implemented in https://github.com/rust-lang/rust/pull/126024 to only disable the global cache if the predicate being considered has opaques in it. This is still theoretically unsound, since goals can indirectly rely on opaques in the defining scope, but we're much less likely to hit it. It doesn't totally fix https://github.com/rust-lang/rust/issues/132064: for example, `lemmy` goes from 1:29 (on rust 1.81) to 9:53 (on nightly) to 4:07 (after this PR). But I think it's at least *more* sound than a total revert :/ r? lcnr
2024-11-06more crash testsMatthias Krüger-0/+94
2024-11-06bootstrap: add quoting support to avoid splittingEnric Morales-3/+11
With this change, it is now possible to pass quotes to the configure script, such as `./configure.py --set=target.\"thumbv8m.main-none-eabi\".linker=/linker` , which will treat `thumbv8.main-none-eabi` as a whole part. Currently, the string would be split into two elements: `thumbv8`, and `main-none-eabi`.
2024-11-06Add --diagnostic-width to some tests failing after 1a0c5021838Hans Wennborg-54/+58
Otherwise the tests would fail depending on the execution environment.
2024-11-06Inline str::repeatKornel-0/+1
2024-11-06Auto merge of #132703 - GuillaumeGomez:rollup-tfuef34, r=GuillaumeGomezbors-14/+10
Rollup of 3 pull requests Successful merges: - #132617 (Fix an extra newline in rendered std doc) - #132698 (Remove unneeded fields in `scrape_examples::FindCalls`) - #132700 (add note not to re-report crashes from `crashes` tests) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-07Rollup merge of #132700 - matthiaskrgr:plzno, r=fmeaseGuillaume Gomez-1/+3
add note not to re-report crashes from `crashes` tests for reasons... :sweat_smile: r? `@fmease`
2024-11-07Rollup merge of #132698 - GuillaumeGomez:rm-unneeded-fields, r=notriddleGuillaume Gomez-7/+3
Remove unneeded fields in `scrape_examples::FindCalls` Just a small cleanup while going through something bigger. r? `@notriddle`
2024-11-07Rollup merge of #132617 - uellenberg:fix-rendered-doc, r=cuviperGuillaume Gomez-6/+4
Fix an extra newline in rendered std doc Fixes #132564 ![17308581942254367500907812250579](https://github.com/user-attachments/assets/9e946c49-c0a6-40ba-ab69-b80fe0e085e1) (taken from the issue above) The problem with the formatting is due to that newline between `<code>` and `<svg>`. Any newlines outside of the code (i.e., within elements inside of it) are fine.
2024-11-06add note not to re-report crashes from `crashes` testsMatthias Krüger-1/+3
2024-11-06Remove unneeded fields in `scrape_examples::FindCalls`Guillaume Gomez-7/+3
2024-11-06Auto merge of #132697 - compiler-errors:async-closure-sugar, r=fmeasebors-1/+7
Clean middle generics using paren sugar if trait has `#[rustc_paren_sugar]` That is to say, generalize the `Fn()` paren sugar handling to *any* trait that is marked with `rustc_paren_sugar`. This means that `AsyncFn` is also covered here. r? fmease
2024-11-06Clean middle generics using paren sugar if trait has rustc_paren_sugarMichael Goulet-1/+7
2024-11-06fix(x): fix a regex used to find python executableismailarilik-1/+1
2024-11-06Auto merge of #132404 - makai410:suggest-swap-lhs-rhs, r=fee1-deadbors-2/+91
Suggest swapping LHS and RHS when RHS impls `PartialEq<lhs_ty>` Closes: #130495 r? `@fee1-dead`
2024-11-06Auto merge of #131721 - okaneco:const_eq_ignore_ascii_case, r=m-ou-sebors-3/+25
Add new unstable feature `const_eq_ignore_ascii_case` Tracking issue - #131719 Mark `[u8]`, `str` `eq_ignore_ascii_case` functions const --- The codegen for this implementation matches the existing `iter::zip` implementation better than incrementing with a counter while loop with counter - https://rust.godbolt.org/z/h9cs5zajc while let - https://rust.godbolt.org/z/ecMeMjjEb
2024-11-06Auto merge of #132663 - estebank:e0320-tweak, r=compiler-errorsbors-17/+17
Tweak E0320 overflow error wording Surround type with backticks as we should in every error.
2024-11-06Auto merge of #132500 - RalfJung:char-is-whitespace-const, r=jhprattbors-4/+5
make char::is_whitespace unstably const I am adding this to the existing https://github.com/rust-lang/rust/issues/132241 feature gate, since `is_digit` and `is_whitespace` seem similar enough that one can group them together.
2024-11-05Add new unstable feature `const_eq_ignore_ascii_case`okaneco-3/+25
Mark `[u8]`, `str` `eq_ignore_ascii_case` functions const
2024-11-06Auto merge of #132664 - matthiaskrgr:rollup-i27nr7i, r=matthiaskrgrbors-151/+65
Rollup of 5 pull requests Successful merges: - #131261 (Stabilize `UnsafeCell::from_mut`) - #131405 (bootstrap/codegen_ssa: ship llvm-strip and use it for -Cstrip) - #132077 (Add a new `wide-arithmetic` feature for WebAssembly) - #132562 (Remove the `wasm32-wasi` target from rustc) - #132660 (Remove unused errs.rs file) Failed merges: - #131721 (Add new unstable feature `const_eq_ignore_ascii_case`) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-05Change some code blocks to quotes in rendered std docuellenberg-6/+4
Fixes #132564
2024-11-05Rollup merge of #132660 - ehuss:remove-unused-errs, r=saethlinMatthias Krüger-88/+0
Remove unused errs.rs file This module was removed in #124895, but the actual file was not removed.
2024-11-05Rollup merge of #132562 - alexcrichton:remove-wasm32-wasi, r=jieyouxuMatthias Krüger-48/+9
Remove the `wasm32-wasi` target from rustc This commit is the final step in the journey of renaming the historical `wasm32-wasi` target in the Rust compiler to `wasm32-wasip1`. Various steps in this journey so far have been: * 2023-04-03: rust-lang/compiler-team#607 - initial proposal for this rename * 2024-11-27: rust-lang/compiler-team#695 - amended schedule/procedure for rename * 2024-01-29: rust-lang/rust#120468 - initial introduction of `wasm32-wasip1` * 2024-06-18: rust-lang/rust#126662 - warn on usage of `wasm32-wasi` * 2024-11-08: this PR - remove the `wasm32-wasi` target The full transition schedule is in [this comment][comment] and is summarized with: * 2024-05-02: Rust 1.78 released with `wasm32-wasip1` target * 2024-09-05: Rust 1.81 released warning on usage of `wasm32-wasi` * 2025-01-09: Rust 1.84 to be released without the `wasm32-wasi` target This means that support on stable for the replacement target of `wasm32-wasip1` has currently been available for 6 months. Users have already seen warnings on stable for 2 months about usage of `wasm32-wasi` and stable users have another 2 months of warnings before the target is removed from stable. This commit is intended to be the final step in this transition so the source tree should no longer mention `wasm32-wasi` except in historical reference to the older name of the `wasm32-wasip1` target. [comment]: https://github.com/rust-lang/rust/pull/120468#issuecomment-1977878747
2024-11-05Rollup merge of #132077 - alexcrichton:wide-arithmetic, r=jieyouxuMatthias Krüger-2/+6
Add a new `wide-arithmetic` feature for WebAssembly This commit adds a new rustc target feature named `wide-arithmetic` for WebAssembly targets. This corresponds to the [wide-arithmetic] proposal for WebAssembly which adds new instructions catered towards accelerating integer arithmetic larger than 64-bits. This proposal to WebAssembly is not standard yet so this new feature is flagged as an unstable target feature. Additionally Rust's LLVM version doesn't support this new feature yet since support will first be added in LLVM 20, so the feature filtering logic for LLVM is updated to handle this. I'll also note that I'm not currently planning to add wasm-specific intrinsics to `std::arch::wasm32` at this time. The currently proposed instructions are all accessible through `i128` or `u128`-based operations which Rust already supports, so intrinsic shouldn't be necessary to get access to these new instructions. [wide-arithmetic]: https://github.com/WebAssembly/wide-arithmetic
2024-11-05Rollup merge of #131405 - davidtwco:hardcoded-strip-macos, ↵Matthias Krüger-11/+47
r=jieyouxu,albertlarsan68 bootstrap/codegen_ssa: ship llvm-strip and use it for -Cstrip Fixes #131206. - Includes `llvm-strip` (a symlink to `llvm-objcopy`) in the compiler dist artifact so that it can be used for `-Cstrip` instead of the system tooling. - Uses `llvm-strip` instead of `/usr/bin/strip` for macOS. macOS needs a specific linker and the system one is preferred, hence #130781 but that doesn't work when cross-compiling, so use the `llvm-strip` utility instead. cc #123151
2024-11-05Rollup merge of #131261 - clarfonthey:unsafe-cell-from-mut, r=m-ou-seMatthias Krüger-2/+3
Stabilize `UnsafeCell::from_mut` Closes #111645. FCP: https://github.com/rust-lang/rust/issues/111645#issuecomment-2393893003 Note that because `const_mut_refs` and `const_refs_to_cell` was stabilized, it's okay to const-stabilize this method as well.
2024-11-05Auto merge of #132661 - matthiaskrgr:rollup-npytbl6, r=matthiaskrgrbors-528/+761
Rollup of 8 pull requests Successful merges: - #132259 (rustc_codegen_llvm: Add a new 'pc' option to branch-protection) - #132409 (CI: switch 7 linux jobs to free runners) - #132498 (Suggest fixing typos and let bindings at the same time) - #132524 (chore(style): sync submodule exclusion list between tidy and rustfmt) - #132567 (Properly suggest `E::assoc` when we encounter `E::Variant::assoc`) - #132571 (add const_eval_select macro to reduce redundancy) - #132637 (Do not filter empty lint passes & re-do CTFE pass) - #132642 (Add documentation on `ast::Attribute`) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-05Implement div_ceil for NonZero<unsigned>Asger Hautop Drewsen-0/+29
2024-11-05Tweak E0320 overflow error wordingEsteban Küber-17/+17
Surrount type with backticks as we should in every error.
2024-11-05Rollup merge of #132642 - GuillaumeGomez:attr-docs, r=compiler-errorsMatthias Krüger-0/+46
Add documentation on `ast::Attribute` I was working again with attributes in clippy recently and I often find myself in need to read the source code to ensure it's doing what I want. Instead, a bit of documentation would allow me (and hopefully others) to skip this step.
2024-11-05Rollup merge of #132637 - blyxyas:lint-less-passes, r=flip1995Matthias Krüger-19/+9
Do not filter empty lint passes & re-do CTFE pass Some structs implement `LintPass` without having a `Lint` associated with them #125116 broke that behaviour by filtering them out. This PR ensures that lintless passes are not filtered out.
2024-11-05Rollup merge of #132571 - RalfJung:const_eval_select_macro, r=oli-obkMatthias Krüger-458/+480
add const_eval_select macro to reduce redundancy I played around a bit with a macro to make const_eval_select invocations look a bit nicer and avoid repeating the argument lists. Here's what I got. What do you think? I didn't apply this everywhere yet because I wanted to gather feedback first. The second commit moves the macros from https://github.com/rust-lang/rust/pull/132542 into a more sensible place. It didn't seem worth its own PR and would conflict with this PR if done separately. Cc ``@oli-obk`` ``@saethlin`` ``@tgross35`` try-job: dist-aarch64-msvc
2024-11-05Rollup merge of #132567 - estebank:bad-suggestion, r=NadrierilMatthias Krüger-15/+66
Properly suggest `E::assoc` when we encounter `E::Variant::assoc` Use the right span when encountering an enum variant followed by an associated item so we don't lose the associated item in the resulting code. Do not suggest the thing twice, once as a removal of the associated item and a second time as a typo suggestion.
2024-11-05Rollup merge of #132524 - ↵Matthias Krüger-3/+1
ismailarilik:chore/style/sync-submodule-exclusion-list-between-tidy-and-rustfmt, r=jieyouxu chore(style): sync submodule exclusion list between tidy and rustfmt As asked in the FIXME comments
2024-11-05Rollup merge of #132498 - uellenberg:typo-and-let-suggestions, r=estebankMatthias Krüger-4/+52
Suggest fixing typos and let bindings at the same time Fixes #132483 Currently, a suggestion for adding a let binding won't be shown if we suggest fixing a typo. This changes that behavior to always show both, if possible. Essentially, this turns the suggestion from ```rust error[E0425]: cannot find value `x2` in this scope --> src/main.rs:4:5 | 4 | x2 = 2; | ^^ help: a local variable with a similar name exists: `x1` For more information about this error, try `rustc --explain E0425`. ``` to ```rust error[E0425]: cannot find value `x2` in this scope --> src/main.rs:4:5 | 4 | x2 = 2; | ^^ | help: a local variable with a similar name exists | 4 | x1 = 2; | ~~ help: you might have meant to introduce a new binding | 4 | let x2 = 2; | +++ For more information about this error, try `rustc --explain E0425`. ``` for the following code: ```rust fn main() { let x1 = 1; x2 = 2; } ``` The original behavior only shows the suggestion for a let binding if a typo suggestion wasn't already displayed. However, this falls apart in the cases like the one above where we have multiple similar variables. I don't think it makes sense to hide this suggestion if there's a similar variable, since that defeats the purpose of this suggestion in that case (it's meant to help those coming from languages like Python).
2024-11-05Rollup merge of #132409 - MarcoIeni:ci-remove-linux-4c-large, r=KobzolMatthias Krüger-12/+10
CI: switch 7 linux jobs to free runners try-job: x86_64-gnu-aux try-job: x86_64-gnu-nopt try-job: x86_64-gnu-tools