about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-09-02chore: Fix typos in 'compiler' (batch 1)Alexander Cyon-44/+44
2024-09-01Auto merge of #129841 - matthiaskrgr:rollup-pkavdtl, r=matthiaskrgrbors-234/+876
Rollup of 8 pull requests Successful merges: - #128495 (core: use `compare_bytes` for more slice element types) - #128641 (refactor: standardize duplicate processes in parser) - #129207 (Lint that warns when an elided lifetime ends up being a named lifetime) - #129493 (Create opaque definitions in resolver.) - #129619 (Update stacker to 0.1.17) - #129672 (Make option-like-enum.rs UB-free and portable) - #129780 (add crashtests for several old unfixed ICEs) - #129832 (Remove stray dot in `std::char::from_u32_unchecked` documentation) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-01Rollup merge of #129832 - eduardosm:stray-dot, r=jhprattMatthias Krüger-1/+1
Remove stray dot in `std::char::from_u32_unchecked` documentation
2024-09-01Rollup merge of #129780 - cyrgani:master, r=compiler-errorsMatthias Krüger-0/+77
add crashtests for several old unfixed ICEs Adds several new crashtests for some older ICEs that did not yet have any. Tests were added for #128097, #119095, #117460 and #126443.
2024-09-01Rollup merge of #129672 - saethlin:enum-debuginfo-tests, r=Mark-SimulacrumMatthias Krüger-25/+14
Make option-like-enum.rs UB-free and portable Fixes https://github.com/rust-lang/rust/issues/129662 (or, at least the parts of it that aren't https://github.com/rust-lang/rust/issues/128973)
2024-09-01Rollup merge of #129619 - sunshowers:update-stacker, r=Mark-SimulacrumMatthias Krüger-4/+4
Update stacker to 0.1.17 The main new feature is support for detecting the current stack size on illumos. (See [my blog post] for the context which led to this.) [my blog post]: https://sunshowers.io/posts/rustc-segfault-illumos/ try-job: x86_64-mingw
2024-09-01Rollup merge of #129493 - cjgillot:early-opaque-def, r=petrochenkovMatthias Krüger-97/+91
Create opaque definitions in resolver. Implementing https://github.com/rust-lang/rust/issues/129023#issuecomment-2306079532 That was easier than I expected. r? `@petrochenkov`
2024-09-01Rollup merge of #129207 - GrigorenkoPV:elided-is-named, r=cjgillotMatthias Krüger-61/+628
Lint that warns when an elided lifetime ends up being a named lifetime As suggested in https://github.com/rust-lang/rust/issues/48686#issuecomment-1817334575 Fixes #48686
2024-09-01Rollup merge of #128641 - Konippi:standardize-duplicate-processes-in-parser, ↵Matthias Krüger-32/+24
r=scottmcm refactor: standardize duplicate processes in parser ## Summary This PR refactors the `read_number` function to standardize duplicate code, improve readability, and enhance efficiency. ## Changes - Merged the logic for both `max_digits` cases into a single `read_atomically` closure - Simplified control flow and reduced code duplication
2024-09-01Rollup merge of #128495 - joboet:more_memcmp, r=scottmcmMatthias Krüger-14/+37
core: use `compare_bytes` for more slice element types `bool`, `NonZero<u8>`, `Option<NonZero<u8>>` and `ascii::Char` can be compared the same way as `u8`.
2024-09-01Auto merge of #129790 - BoxyUwU:bump-version, r=BoxyUwUbors-1/+1
Bump to 1.83 https://forge.rust-lang.org/release/process.html#bump-the-stable-version-number-t-6-days-friday-the-week-before
2024-08-31Auto merge of #129831 - matthiaskrgr:rollup-befq6zx, r=matthiaskrgrbors-101/+559
Rollup of 11 pull requests Successful merges: - #128523 (Add release notes for 1.81.0) - #129605 (Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen) - #129650 (Clean up `library/profiler_builtins/build.rs`) - #129651 (skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set) - #129684 (Enable Miri to pass pointers through FFI) - #129762 (Update the `wasm-component-ld` binary dependency) - #129782 (couple more crash tests) - #129816 (tidy: say which feature gate has a stability issue mismatch) - #129818 (make the const-unstable-in-stable error more clear) - #129824 (Fix code examples buttons not appearing on click on mobile) - #129826 (library: Fix typo in `core::mem`) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-31Create opaque definitions in resolver.Camille GILLOT-97/+91
2024-08-31Remove stray dot in `std::char::from_u32_unchecked` documentationEduardo Sánchez Muñoz-1/+1
2024-08-31Rollup merge of #129826 - Alcaro:patch-1, r=workingjubileeMatthias Krüger-1/+1
library: Fix typo in `core::mem` This typo looks unnecessary
2024-08-31Rollup merge of #129824 - GuillaumeGomez:code-example-buttons-mobile, ↵Matthias Krüger-2/+8
r=notriddle Fix code examples buttons not appearing on click on mobile When browsing docs on mobile today, I realized that the buttons didn't appear when I tapped on the code example. One issue: I have no idea how to add a regression test for this case... r? ``@notriddle``
2024-08-31Rollup merge of #129818 - RalfJung:const-stability, r=compiler-errorsMatthias Krüger-6/+5
make the const-unstable-in-stable error more clear The default should be to add `rustc_const_unstable`, not `rustc_allow_const_fn_unstable`. Also I discovered our check for missing const stability attributes on stable functions -- but strangely that check only kicks in for "reachable" functions. `check_missing_stability` checks for reachability since all reachable functions must have a stability attribute, but I would say if a function has `#[stable]` it should also have const-stability attributes regardless of reachability.
2024-08-31Rollup merge of #129816 - RalfJung:tidy-feature-issue-mismatch, ↵Matthias Krüger-1/+2
r=compiler-errors tidy: say which feature gate has a stability issue mismatch This gives some valuable context to what the error is actually about :)
2024-08-31Rollup merge of #129782 - matthiaskrgr:c, r=jieyouxuMatthias Krüger-0/+54
couple more crash tests r? ```@jieyouxu```
2024-08-31Rollup merge of #129762 - alexcrichton:update-wasm-component-ld, r=jieyouxuMatthias Krüger-25/+34
Update the `wasm-component-ld` binary dependency This keeps it up-to-date by moving from 0.5.6 to 0.5.7. While here I've additionally updated some other wasm-related dependencies in the workspace to keep them up-to-date and try to avoid duplicate versions as well.
2024-08-31Rollup merge of #129684 - Strophox:miri-pass-pointer-to-ffi, r=RalfJungMatthias Krüger-17/+260
Enable Miri to pass pointers through FFI Following https://github.com/rust-lang/rust/pull/126787, the purpose of this PR is to now enable Miri to execute native calls that make use of pointers. > <details> > > <summary> Simple example </summary> > > ```rust > extern "C" { > fn ptr_printer(ptr: *mut i32); > } > > fn main() { > let ptr = &mut 42 as *mut i32; > unsafe { > ptr_printer(ptr); > } > } > ``` > ```c > void ptr_printer(int *ptr) { > printf("printing pointer dereference from C: %d\n", *ptr); > } > ``` > should now show `printing pointer dereference from C: 42`. > > </details> Note that this PR does not yet implement any logic involved in updating Miri's "analysis" state (byte initialization, provenance) upon such a native call. r? ``@RalfJung``
2024-08-31Rollup merge of #129651 - onur-ozkan:stage0-target-sanity-check, r=KobzolMatthias Krüger-8/+9
skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set When adding a new target to `rustc` and extending `STAGE0_MISSING_TARGETS`, there is a chance that in the merge CI bootstrap target sanity check might fail [here](https://github.com/rust-lang/rust/blob/26d27b7c8729fb61fe8321fcd2ce734a79aa695d/src/bootstrap/src/core/sanity.rs#L243-L256) because the stage 0 compiler will assume to already support the new target since `opt-dist` uses the previously compiled compiler as the stage 0 compiler. This PR skips this check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set, and makes `opt-dist` to set `BOOTSTRAP_SKIP_TARGET_SANITY` so bootstrap doesn't run this logic for opt-dist tests. Fixes https://github.com/rust-lang/rust/pull/127021#issuecomment-2308782315. Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/.60STAGE0_MISSING_TARGETS.60.20seems.20to.20check.20stage1 Blocker for https://github.com/rust-lang/rust/pull/127021
2024-08-31Rollup merge of #129650 - Zalathar:profiler-builtins, r=Mark-SimulacrumMatthias Krüger-28/+32
Clean up `library/profiler_builtins/build.rs` This PR makes a series of improvements to the long-neglected build script for `profiler_builtins`. Most notably: - The logic that silently skips missing source files has been removed, since it is currently unnecessary and makes build errors more confusing. - The script now emits `cargo::rerun-if-changed` directives for the `compiler-rt` source and include directories. Compiler behaviour and user programs should be unaffected by these changes.
2024-08-31Rollup merge of #129605 - jieyouxu:needs-llvm-components, r=Mark-SimulacrumMatthias Krüger-13/+40
Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is: ``` tests\run-make\print-target-list tests\run-make\print-to-output tests\run-make\print-cfg tests\run-make\target-without-atomic-cas ``` This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported. Fixes #129390. Fixes #127895. cc ``@petrochenkov`` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
2024-08-31Rollup merge of #128523 - cuviper:relnotes-1.81.0, r=Mark-SimulacrumMatthias Krüger-0/+114
Add release notes for 1.81.0 cc ``@rust-lang/release`` r? ``@Mark-Simulacrum``
2024-08-31Update mod.rsAlcaro-1/+1
This typo looks unnecessary
2024-08-31Auto merge of #129817 - matthiaskrgr:rollup-ll2ld5m, r=matthiaskrgrbors-3490/+11015
Rollup of 12 pull requests Successful merges: - #129659 (const fn stability checking: also check declared language features) - #129711 (Expand NLL MIR dumps) - #129730 (f32 docs: define 'arithmetic' operations) - #129733 (Subtree update of `rust-analyzer`) - #129749 (llvm-wrapper: adapt for LLVM API changes) - #129757 (Add a test for trait solver overflow in MIR inliner cycle detection) - #129760 (Make the "detect-old-time" UI test more representative) - #129767 (Remove `#[macro_use] extern crate tracing`, round 4) - #129774 (Remove `#[macro_use] extern crate tracing` from rustdoc and rustfmt) - #129785 (Miri subtree update) - #129791 (mark joboet as on vacation) - #129812 (interpret, codegen: tweak some comments and checks regarding Box with custom allocator) Failed merges: - #129777 (Add `unreachable_pub`, round 4) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-31Fix code examples buttons not appearing on click on mobileGuillaume Gomez-2/+8
2024-08-31don't take reachability into account when warning about missing-const-stabilityRalf Jung-2/+1
2024-08-31make the const-unstable-in-stable error more clearRalf Jung-4/+4
2024-08-31Rollup merge of #129812 - RalfJung:box-custom-alloc, r=compiler-errorsMatthias Krüger-6/+15
interpret, codegen: tweak some comments and checks regarding Box with custom allocator Cc https://github.com/rust-lang/rust/issues/95453
2024-08-31Rollup merge of #129791 - joboet:ich_bin_dann_mal_weg, r=joboetMatthias Krüger-1/+1
mark joboet as on vacation I'll be on vacation for about three weeks and won't have much time for reviewing. r? ````@ghost````
2024-08-31Rollup merge of #129785 - RalfJung:miri-sync, r=RalfJungMatthias Krüger-441/+1197
Miri subtree update r? ```@ghost```
2024-08-31Rollup merge of #129774 - nnethercote:rm-extern-crate-tracing-remainder, ↵Matthias Krüger-10/+49
r=GuillaumeGomez Remove `#[macro_use] extern crate tracing` from rustdoc and rustfmt A follow-up to #129767 and earlier PRs doing this for `rustc_*` crates. r? ```@GuillaumeGomez```
2024-08-31Rollup merge of #129767 - nnethercote:rm-extern-crate-tracing-4, r=jieyouxuMatthias Krüger-18/+211
Remove `#[macro_use] extern crate tracing`, round 4 Because explicit importing of macros via use items is nicer (more standard and readable) than implicit importing via #[macro_use]. Continuing the work from #124511, #124914, and #125434. After this PR no `rustc_*` crates use `#[macro_use] extern crate tracing` except for `rustc_codegen_gcc` which is a special case and I will do separately. r? ```@jieyouxu```
2024-08-31Rollup merge of #129760 - cuviper:old-timey, r=compiler-errorsMatthias Krüger-8/+16
Make the "detect-old-time" UI test more representative The test code did have an inference failure, but that would have failed on Rust 1.79 and earlier too. Now it is rewritten to be specifically affected by 1.80's `impl FromIterator<_> for Box<str>`.
2024-08-31Rollup merge of #129757 - saethlin:half-a-recursion, r=compiler-errorsMatthias Krüger-0/+32
Add a test for trait solver overflow in MIR inliner cycle detection This test is a combination of the reproducer posted here: https://github.com/rust-lang/rust/issues/128887#issuecomment-2314198229 and the existing test for polymorphic recursion: https://github.com/rust-lang/rust/blob/784d444733d65c3d305ce5edcbb41e3d0d0aee2e/tests/mir-opt/inline/polymorphic_recursion.rs r? ```@compiler-errors```
2024-08-31Rollup merge of #129749 - krasimirgg:llvm-20-lto, r=nikicMatthias Krüger-3/+7
llvm-wrapper: adapt for LLVM API changes No functional changes intended. Updates the wrapper for https://github.com/5c4lar/llvm-project/commit/21eddfac3d75879b3e0b09c5bc848526dcab6ab0. ````@rustbot```` label: +llvm-main r? ````@nikic````
2024-08-31Rollup merge of #129733 - lnicola:sync-from-ra, r=lnicolaMatthias Krüger-2888/+9203
Subtree update of `rust-analyzer` r? ````@ghost````
2024-08-31Rollup merge of #129730 - RalfJung:float-arithmetic, r=workingjubileeMatthias Krüger-44/+48
f32 docs: define 'arithmetic' operations r? ````@workingjubilee```` Fixes https://github.com/rust-lang/rust/issues/129699
2024-08-31Rollup merge of #129711 - lqd:nll-mir-dumps, r=compiler-errorsMatthias Krüger-64/+214
Expand NLL MIR dumps This PR is a first step to clean up and expand NLL MIR dumps: - by restoring the "mir-include-spans" comments which are useful for `-Zdump-mir=nll` - by adding the list of borrows to NLL MIR dumps, where they are introduced in the CFG and in which region Comments in MIR dumps were turned off in #112346, but as shown in #114652 they were still useful for us working with NLL MIR dumps. So this PR pulls `-Z mir-include-spans` into its own options struct, so that passes dumping MIR can override them if need be. The rest of the compiler is not affected, only the "nll" pass dumps have these comments enabled again. The CLI still has priority when specifying the flag, so that we can explicitly turn them off in the `mir-opt` tests to keep blessed dumps easier to work with (which was one of the points of #112346). Then, as part of a couple steps to improve NLL/polonius MIR dumps and `.dot` visualizations, I've also added the list of borrows and where they're introduced. I'm doing all this to help debug some polonius scope issues in my prototype location-sensitive analysis :3. I'll probably add member constraints soon.
2024-08-31Rollup merge of #129659 - RalfJung:const-fn-lang-feat, r=fee1-deadMatthias Krüger-7/+22
const fn stability checking: also check declared language features Fixes https://github.com/rust-lang/rust/issues/129656 `@oli-obk` I assume it is just an oversight that this didn't use `features().declared()`? Or is there a deep reason that this must only check `declared_lib_features`?
2024-08-31elided_named_lifetimes: bless & add testsPavel Grigorenko-27/+460
2024-08-31Fix `elided_named_lifetimes` in codePavel Grigorenko-14/+14
2024-08-31Implement `elided_named_lifetimes` lintPavel Grigorenko-20/+154
2024-08-31tidy: say which feature gate has a stability issue mismatchRalf Jung-1/+2
2024-08-31const fn stability checking: also check declared language featuresRalf Jung-7/+22
2024-08-31interpret, codegen: tweak some comments and checks regarding Box with custom ↵Ralf Jung-6/+15
allocator
2024-08-31Auto merge of #129809 - matthiaskrgr:rollup-cyygnxh, r=matthiaskrgrbors-2693/+2833
Rollup of 15 pull requests Successful merges: - #120221 (Don't make statement nonterminals match pattern nonterminals) - #126183 (Separate core search logic with search ui) - #129123 (rustdoc-json: Add test for `Self` type) - #129366 (linker: Synchronize native library search in rustc and linker) - #129527 (Don't use `TyKind` in a lint) - #129534 (Deny `wasm_c_abi` lint to nudge the last 25%) - #129640 (Re-enable android tests/benches in alloc/core) - #129642 (Bump backtrace to 0.3.74~ish) - #129675 (allow BufReader::peek to be called on unsized types) - #129723 (Simplify some extern providers) - #129724 (Remove `Option<!>` return types.) - #129725 (Stop using `ty::GenericPredicates` for non-predicates_of queries) - #129731 (Allow running `./x.py test compiler`) - #129751 (interpret/visitor: make memory order iteration slightly more efficient) - #129754 (wasi: Fix sleeping for `Duration::MAX`) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-31Rollup merge of #129754 - alexcrichton:fix-wasi-long-sleep, r=workingjubileeMatthias Krüger-30/+31
wasi: Fix sleeping for `Duration::MAX` This commit fixes an assert in the WASI-specific implementation of thread sleep to ensure that sleeping for a very large period of time blocks instead of panicking. This can come up when testing programs that sleep "forever", for example. I'll note that I haven't included a test for this since it's sort of difficult to test. I've tested this locally though that long sleeps do indeed block and short sleeps still only sleep for a short amount of time.