about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-09-04Auto merge of #129356 - nikic:llvm19-host, r=Mark-Simulacrumbors-1/+2
Update x86_64-linux host compiler to LLVM 19 rc 3
2024-09-03Rollup merge of #129917 - Kobzol:fix-beta-git, r=Mark-SimulacrumMatthias Krüger-0/+1
Fix parsing of beta version in dry-run mode This was blocking beta release. r? `@BoxyUwU`
2024-09-03Rollup merge of #129311 - onur-ozkan:multiple-candidates-fix, r=KobzolMatthias Krüger-10/+2
don't copy `.rustc-dev-contents` from CI rustc Since https://github.com/rust-lang/rust/pull/127188, copying files from `.rustc-dev-contents` regressed https://github.com/rust-lang/rust/issues/108767 again. Since `rustc-src` is already included in the CI rustc sysroot, we don't need to copy these files to have `rustc-src` component. Blocker for #122709
2024-09-03Rollup merge of #129152 - onur-ozkan:custom-clippy, r=KobzolMatthias Krüger-2/+22
custom/external clippy support for bootstrapping Similar to cargo, rustc, and rustfmt, this adds the support of using custom clippy on bootstrap. It’s designed for those who want to test their own clippy builds or avoid downloading the stage0 clippy. Closes #121518
2024-09-02Fix parsing of beta version in dry-run modeJakub Beránek-0/+1
2024-09-02Auto merge of #129873 - matthiaskrgr:rollup-bv849ud, r=matthiaskrgrbors-4/+23
Rollup of 9 pull requests Successful merges: - #127474 (doc: Make block of inline Deref methods foldable) - #129678 (Deny imports of `rustc_type_ir::inherent` outside of type ir + new trait solver) - #129738 (`rustc_mir_transform` cleanups) - #129793 (add extra linebreaks so rustdoc can identify the first sentence) - #129804 (Fixed some typos in the standard library documentation/comments) - #129837 (Actually parse stdout json, instead of using hacky contains logic.) - #129842 (Fix LLVM ABI NAME for riscv64imac-unknown-nuttx-elf) - #129843 (Mark myself as on vacation for triagebot) - #129858 (Replace walk with visit so we dont skip outermost expr kind in def collector) Failed merges: - #129777 (Add `unreachable_pub`, round 4) - #129868 (Remove kobzol vacation status) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-02Auto merge of #129798 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 9 commits in 8f40fc59fb0c8df91c97405785197f3c630304ea..c1fa840a85eca53818895901a53fae34247448b2 2024-08-21 22:37:06 +0000 to 2024-08-29 21:03:53 +0000 - fix(resolve): With `latest` message, differentiate actionable updates (rust-lang/cargo#14461) - fix(pkgid): Allow open namespaces in PackageIdSpec's (rust-lang/cargo#14467) - feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled (rust-lang/cargo#14459) - fix(resolve): Report incompatible packages with precise Rust version (rust-lang/cargo#14457) - fix(resolve): Dont show locking workspace members (rust-lang/cargo#14445) - Log details of failure if no errors were seen (rust-lang/cargo#14453) - More helpful missing feature error message (rust-lang/cargo#14436) - feat: Add matches_prerelease semantic (rust-lang/cargo#14305) - refactor(update): Prepare for smarter update messages (rust-lang/cargo#14440) r? ghost
2024-09-02Rollup merge of #127474 - tesuji:foldable-inline-derefs, r=t-rustdocMatthias Krüger-4/+23
doc: Make block of inline Deref methods foldable After: ![image](https://github.com/rust-lang/rust/assets/15225902/3e8ab320-dbf7-436f-9be0-d0ef82664663) Before: ![image](https://github.com/rust-lang/rust/assets/15225902/f6f7635d-d4c3-437e-a2d9-147726287b05) Fix #127470. Current status: - [x] Bug when hovering over title "Methods from ...": The anchor sign $ overlaps with `[-]`: https://github.com/rust-lang/rust/pull/127474#issuecomment-2222930038 => Fixed by https://github.com/rust-lang/rust/pull/127474#issuecomment-2228886292
2024-09-01Revert "Auto merge of #127537 - veluca93:struct_tf, r=BoxyUwU"Jakub Beránek-7/+0
This reverts commit acb4e8b6251f1d8da36f08e7a70fa23fc581839e, reversing changes made to 100fde5246bf56f22fb5cc85374dd841296fce0e.
2024-09-01Auto merge of #127897 - nyurik:add-qnx-70-target, r=saethlinbors-0/+19
add `aarch64_unknown_nto_qnx700` target - QNX 7.0 support for aarch64le This backports the QNX 7.1 aarch64 implementation to 7.0. * [x] required `-lregex` disabled, see https://github.com/rust-lang/libc/pull/3775 (released in libc 0.2.156) * [x] uses `libgcc.a` instead of `libgcc_s.so` (7.0 used ancient GCC 5.4 which didn't have gcc_s) * [x] a fix in `backtrace` crate to support stack traces https://github.com/rust-lang/backtrace-rs/pull/648 This PR bumps libc dependency to 0.2.158 CC: to the folks who did the [initial implementation](https://doc.rust-lang.org/rustc/platform-support/nto-qnx.html): `@flba-eb,` `@gh-tr,` `@jonathanpallant,` `@japaric` # Compile target ```bash # Configure qcc build environment source _path_/_to_/qnx7.0/qnxsdp-env.sh # Tell rust to use qcc when building QNX 7.0 targets export build_env=' CC_aarch64-unknown-nto-qnx700=qcc CFLAGS_aarch64-unknown-nto-qnx700=-Vgcc_ntoaarch64le_cxx CXX_aarch64-unknown-nto-qnx700=qcc AR_aarch64_unknown_nto_qnx700=ntoaarch64-ar' # Build rust compiler, libs, and the remote test server env $build_env ./x.py build \ --target x86_64-unknown-linux-gnu,aarch64-unknown-nto-qnx700 \ rustc library/core library/alloc library/std src/tools/remote-test-server rustup toolchain link stage1 build/host/stage1 ``` # Compile "hello world" ```bash source _path_/_to_/qnx7.0/qnxsdp-env.sh cargo new hello_world cd hello_world cargo +stage1 build --release --target aarch64-unknown-nto-qnx700 ``` # Configure a remote for testing Do this from a new shell - we will need to run more commands in the previous one. I ran into these two issues, and found some workarounds. * Temporary dir might not work properly * Default `remote-test-server` has issues binding to an address ``` # ./remote-test-server starting test server thread 'main' panicked at src/tools/remote-test-server/src/main.rs:175:29: called `Result::unwrap()` on an `Err` value: Os { code: 249, kind: AddrNotAvailable, message: "Can't assign requested address" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Specifying `--bind` param actually fixes that, and so does setting `TMPDIR` properly. ```bash # Copy remote-test-server to remote device. You may need to use sftp instead. # ATTENTION: Note that the path is different from the one in the remote testing documentation for some reason scp ./build/x86_64-unknown-linux-gnu/stage1-tools-bin/remote-test-server qnxdevice:/path/ # Run ssh with port forwarding - so that rust tester can connect to the local port instead ssh -L 12345:127.0.0.1:12345 qnxdevice # on the device, run rm -rf tmp && mkdir -p tmp && TMPDIR=$PWD/tmp ./remote-test-server --bind 0.0.0.0:12345 ``` # Run test suit Assume all previous environment variables are still set, or re-init them ```bash export TEST_DEVICE_ADDR="localhost:12345" # tidy needs to be skipped due to using un-published libc dependency export exclude_tests=' --exclude src/bootstrap --exclude src/tools/error_index_generator --exclude src/tools/linkchecker --exclude src/tools/tidy --exclude tests/ui-fulldeps --exclude rustc --exclude rustdoc --exclude tests/run-make-fulldeps' env $build_env ./x.py test $exclude_tests --stage 1 --target aarch64-unknown-nto-qnx700 ``` try-job: dist-x86_64-msvc
2024-09-01Auto merge of #129841 - matthiaskrgr:rollup-pkavdtl, r=matthiaskrgrbors-9/+29
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 #129207 - GrigorenkoPV:elided-is-named, r=cjgillotMatthias Krüger-5/+25
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 #128495 - joboet:more_memcmp, r=scottmcmMatthias Krüger-4/+4
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-19/+285
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-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 #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 #129762 - alexcrichton:update-wasm-component-ld, r=jieyouxuMatthias Krüger-1/+1
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-5/+257
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 #129605 - jieyouxu:needs-llvm-components, r=Mark-SimulacrumMatthias Krüger-2/+8
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-31Fix code examples buttons not appearing on click on mobileGuillaume Gomez-2/+8
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 #129733 - lnicola:sync-from-ra, r=lnicolaMatthias Krüger-2888/+9203
Subtree update of `rust-analyzer` r? ````@ghost````
2024-08-31Rollup merge of #129711 - lqd:nll-mir-dumps, r=compiler-errorsMatthias Krüger-0/+1
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-31elided_named_lifetimes: bless & add testsPavel Grigorenko-2/+22
2024-08-31Fix `elided_named_lifetimes` in codePavel Grigorenko-3/+3
2024-08-31tidy: say which feature gate has a stability issue mismatchRalf Jung-1/+2
2024-08-31Rollup merge of #129751 - RalfJung:interpret-visit-field-order, ↵Matthias Krüger-8/+5
r=compiler-errors interpret/visitor: make memory order iteration slightly more efficient Finally I know enough about RPIT to write this iterator signature correctly. :D This means memory-order iteration now needs an allocation, but it avoids quadratic complexity (where it has to do a linear scan n times to find the n-th field in memory order), so that seems like a win overall. The changed code only affects Miri; the rustc changes are NOPs.
2024-08-31Rollup merge of #129731 - ferrocene:x-test-compiler, r=onur-ozkanMatthias Krüger-8/+3
Allow running `./x.py test compiler`
2024-08-31Rollup merge of #129725 - compiler-errors:predicates-of, r=fmeaseMatthias Krüger-16/+5
Stop using `ty::GenericPredicates` for non-predicates_of queries `GenericPredicates` is a struct of several parts: A list of of an item's own predicates, and a parent def id (and some effects related stuff, but ignore that since it's kinda irrelevant). When instantiating these generic predicates, it calls `predicates_of` on the parent and instantiates its predicates, and appends the item's own instantiated predicates too: https://github.com/rust-lang/rust/blob/acb4e8b6251f1d8da36f08e7a70fa23fc581839e/compiler/rustc_middle/src/ty/generics.rs#L407-L413 Notice how this should result in a recursive set of calls to `predicates_of`... However, `GenericPredicates` is *also* misused by a bunch of *other* queries as a convenient way of passing around a list of predicates. For these queries, we don't ever set the parent def id of the `GenericPredicates`, but if we did, then this would be very easy to mistakenly call `predicates_of` instead of some other intended parent query. Given that footgun, and the fact that we don't ever even *use* the parent def id in the `GenericPredicates` returned from queries like `explicit_super_predicates_of`, It really has no benefit over just returning `&'tcx [(Clause<'tcx>, Span)]`. This PR additionally opts to wrap the results of `EarlyBinder`, as we've tended to use that in the return type of these kinds of queries to properly convey that the user has params to deal with, and it also gives a convenient way of iterating over a slice of things after instantiating.
2024-08-31Rollup merge of #129366 - petrochenkov:libsearch, r=jieyouxuMatthias Krüger-1/+1
linker: Synchronize native library search in rustc and linker Also search for static libraries with alternative naming (`libname.a`) on MSVC when producing executables or dynamic libraries, and not just rlibs. This unblocks https://github.com/rust-lang/rust/pull/123436. try-job: x86_64-msvc
2024-08-31Rollup merge of #126183 - Folyd:search-core, r=GuillaumeGomez,notriddleMatthias Krüger-2281/+2319
Separate core search logic with search ui Currenty, the `search.js` mixed with UI/DOM manipulation codes and search logic codes, I propose to extract the search logic to a class for following benefits: - Clean code. Separation of DOM manipulation and search logic can lead better code maintainability and easy code testings. - Easy share the search logic for third party to utilize the search function, such as [Rust Search Extension](https://rust.extension.sh), https://query.rs. This PR added a new class called `DocSearch`, which mainly expose following methods: ```js class DocSearch { // Dependency inject searchIndex, rootPath and searchState constructor(rawSearchIndex, rootPath, searchState) { // build search index... } static parseQuery(userQuery) { } async execQuery(parsedQuery, filterCrates, currentCrate) { } } ```
2024-08-31Auto merge of #129797 - workingjubilee:cleanup-apple-ci, r=workingjubileebors-8/+23
Try to reduce space usage in dist CI We have had recurrent CI problems as a result of GitHub adding a new version of Xcode to its runners[^0], which has consumed ~40GB of space which served as padding. Try to reduce the number of Xcodes on our systems, because we only use Xcode 14 in actual practice. Also, try to move files instead of pointlessly copy them when we're at the end of the job. I could not resist addressing a few shellcheck lints while I was at it. [^0]: https://github.com/actions/runner-images/issues/10511
2024-08-30ci: Take tail instead of head to avoid broken pipesJubilee Young-3/+1
2024-08-30ci: Avoid legacy backticks in upload-artifacts.shJubilee Young-1/+1
2024-08-30ci: Use mv instead of cp in upload stepJubilee Young-4/+4
2024-08-30ci: Try to remove unused Xcode dirsJubilee Young-0/+17
2024-08-31Update cargoWeihang Lo-0/+0
2024-08-30Bump to 1.83Boxy-1/+1
2024-08-30enable Miri to pass const pointers through FFIStrophox-5/+257
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-08-30add borrows to NLL MIR dumpsRémy Rakic-0/+1
explicitly disable `-Zmir-include-spans` in mir-opt tests This will override the NLL default of true, and keep the blessed dumps easier to work with.
2024-08-30Squashed `aarch64_unknown_nto_qnx700` supportYuri Astrakhan-0/+19
2024-08-30Merge from rustcThe Miri Cronjob Bot-119/+153
2024-08-30Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-08-30Remove `#[macro_use] extern crate tracing` from rustfmt.Nicholas Nethercote-2/+17
2024-08-30Remove `#[macro_use] extern crate tracing` from rustfmt helpers.Nicholas Nethercote-6/+2
2024-08-30Remove `#[macro_use] extern crate tracing` from rustdoc.Nicholas Nethercote-2/+30
2024-08-29Update the `wasm-component-ld` binary dependencyAlex Crichton-1/+1
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.