about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-09-10Auto merge of #129778 - RalfJung:interp-lossy-typed-copy, r=saethlinbors-310/+1246
interpret: make typed copies lossy wrt provenance and padding A "typed copy" in Rust can be a lossy process: when copying at type `usize` (or any other non-pointer type), if the original memory had any provenance, that provenance is lost. When copying at pointer type, if the original memory had partial provenance (i.e., not the same provenance for all bytes), that provenance is lost. When copying any type with padding, the contents of padding are lost. This PR equips our validity-checking pass with the ability to reset provenance and padding according to those rules. Can be reviewed commit-by-commit. The first three commits are just preparation without any functional change. Fixes https://github.com/rust-lang/miri/issues/845 Fixes https://github.com/rust-lang/miri/issues/2182
2024-09-09Auto merge of #129789 - notriddle:notriddle/inline-stmt-local, r=GuillaumeGomezbors-197/+215
rustdoc: use strategic boxing to shrink `clean::Item` * `inline_stmt_id` is never a cross-crate DefId, so save space by not storing it. * Instead of two inner boxes for `Item`, use one.
2024-09-09Auto merge of #130165 - matthiaskrgr:rollup-fsnmz3t, r=matthiaskrgrbors-598/+662
Rollup of 9 pull requests Successful merges: - #129929 (`rustc_mir_transform` cleanups, round 2) - #130022 (Dataflow/borrowck lifetime cleanups) - #130064 (fix ICE in CMSE type validation) - #130067 (Remove redundant check in `symlink_hard_link` test) - #130131 (Print a helpful message if any tests were skipped for being up-to-date) - #130137 (Fix ICE caused by missing span in a region error) - #130153 (use verbose flag as a default value for `rust.verbose-tests`) - #130154 (Stabilize `char::MIN`) - #130158 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-09Rollup merge of #130158 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/edition-guide 1 commits in eeba2cb9c37ab74118a4fb5e5233f7397e4a91f8..b3ca7ade0f87d7e3fb538776defc5b2cc4188172 2024-09-03 22:59:56 UTC to 2024-09-03 22:59:56 UTC - Rename `static_mut_refs` file to plural ## rust-embedded/book 1 commits in ff5d61d56f11e1986bfa9652c6aff7731576c37d..dbae36bf3f8410aa4313b3bad42e374735d48a9d 2024-09-04 20:49:11 UTC to 2024-09-04 20:49:11 UTC - Fix small error in c bindings (rust-embedded/book#377) ## rust-lang/reference 6 commits in 0668397076da350c404dadcf07b6cbc433ad3743..687faf9958c52116d003b41dfd29cc1cf44f5311 2024-09-03 20:21:23 UTC to 2024-08-29 01:11:29 UTC - `asm!`: clarify that `nomem` / `readonly` can access private memory (rust-lang/reference#1598) - Switch warning blocks to use admonitions (rust-lang/reference#1595) - dont use stdcall on x86_64 where it is not a valid ABI (rust-lang/reference#1600) - Add capturing and precise capturing rules (rust-lang/reference#1577) - Add a prefix to rule HTML IDs (rust-lang/reference#1593) - Add a description of rule identifiers (rust-lang/reference#1594) ## rust-lang/rust-by-example 2 commits in 859786c5bc99301bbc22fc631a5c2b341860da08..c79ec345f08a1e94494cdc8c999709a90203fd88 2024-09-08 13:24:48 UTC to 2024-09-08 13:24:08 UTC - Fix typo in conversion/from_into (rust-lang/rust-by-example#1882) - Corrected x values for example rectangle (rust-lang/rust-by-example#1884) ## rust-lang/rustc-dev-guide 9 commits in fa928a6d19e1666d8d811dfe3fd35cdad3b4e459..0ed9229f5b6f7824b333beabd7e3d5ba4b9bd971 2024-09-09 10:58:45 UTC to 2024-08-31 13:02:08 UTC - fix some comments (rust-lang/rustc-dev-guide#2059) - Fix a link and create an implied internal link (rust-lang/rustc-dev-guide#2051) - link to additional LLVM update PRs (rust-lang/rustc-dev-guide#2055) - fix/improve rdg contributing howto (rust-lang/rustc-dev-guide#2056) - fixed the typo (rust-lang/rustc-dev-guide#2058) - fix typo maker -> marker (thanks `@lholten)` (rust-lang/rustc-dev-guide#2057) - improve query system documentation (rust-lang/rustc-dev-guide#2041) - add section on overlap checks (rust-lang/rustc-dev-guide#2042) - clarify the role of rustc_const_unstable (rust-lang/rustc-dev-guide#2045)
2024-09-09Rollup merge of #130154 - okaneco:stabilize_char_min, r=cuviperMatthias Krüger-4/+1
Stabilize `char::MIN` FCP completed https://github.com/rust-lang/rust/issues/114298#issuecomment-2335250508 Closes #114298
2024-09-09Rollup merge of #130153 - onur-ozkan:verbose-to-verbose-tests, r=KobzolMatthias Krüger-1/+13
use verbose flag as a default value for `rust.verbose-tests` See the [Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Run.20tests.20in.20x.2Epy.20with.20.22pretty.22.20test.20rendering.3F) for more context.
2024-09-09Rollup merge of #130137 - gurry:master, r=cjgillotMatthias Krüger-3/+70
Fix ICE caused by missing span in a region error Fixes #130012 The ICE occurs on line 634 in this error handling code: https://github.com/rust-lang/rust/blob/085744b7ad8b227239bcee0a44cd78dcd0310ab9/compiler/rustc_trait_selection/src/error_reporting/infer/region.rs#L617-L637 It is caused by the span being a dummy span and `!span.is_dummy()` on line 628 evaluating to `false`. A dummy span, however, is expected here thanks to the `Self: Trait` predicate from `predicates_of` (see line 61): https://github.com/rust-lang/rust/blob/085744b7ad8b227239bcee0a44cd78dcd0310ab9/compiler/rustc_hir_analysis/src/collect/predicates_of.rs#L61-L69 This PR changes the error handling code to omit the note which needed the span instead of ICE'ing in the presence of a dummy span.
2024-09-09Rollup merge of #130131 - Zalathar:up-to-date, r=KobzolMatthias Krüger-2/+21
Print a helpful message if any tests were skipped for being up-to-date When running tests without the `--force-rerun` flag, compiletest will automatically skip any tests that (in its judgement) don't need to be run again since the last time they were run. This is normally very useful, but can occasionally be confusing, especially in edge-cases where up-to-date checking is not completely accurate (or the test is flaky). This PR makes bootstrap count the number of tests that were ignored for being up-to-date (via a hard-coded check on the ignore reason), and prints a helpful message when that number is nonzero. --- Sample output: ```text test result: ok. 4 passed; 0 failed; 17578 ignored; 0 measured; 0 filtered out; finished in 463.79ms help: ignored 17295 up-to-date tests; use `--force-rerun` to prevent this Build completed successfully in 0:00:07 ```
2024-09-09Rollup merge of #130067 - madsmtm:clean-up-fs-test, r=ChrisDentonMatthias Krüger-18/+0
Remove redundant check in `symlink_hard_link` test We support macOS 10.12 and above, so it now always uses `linkat`, and so the check is redundant. This was missed in #126351. ``@rustbot`` label O-macos
2024-09-09Rollup merge of #130064 - folkertdev:fix-issue-129983, r=compiler-errorsMatthias Krüger-11/+71
fix ICE in CMSE type validation fixes #129983 tracking issue: https://github.com/rust-lang/rust/issues/81391 r? ``@compiler-errors``
2024-09-09Rollup merge of #130022 - nnethercote:dataflow-borrowck-lifetimes, r=oli-obkMatthias Krüger-248/+209
Dataflow/borrowck lifetime cleanups These commits remove a bunch of unnecessary lifetimes from structs involved in dataflow/borrowck. r? ``@lqd``
2024-09-09Rollup merge of #129929 - nnethercote:rustc_mir_transform-cleanups-2, r=cjgillotMatthias Krüger-311/+277
`rustc_mir_transform` cleanups, round 2 More cleanups in the style of #129738. r? ``@cjgillot``
2024-09-09Update booksrustbot-0/+0
2024-09-09Auto merge of #128939 - bjorn3:windows_cg_clif_component, r=albertlarsan68bors-13/+8
Distribute rustc_codegen_cranelift for Windows With support for raw-dylib recently added to cg_clif, and inline assembly support working on Windows for quite a while now, all blockers for distributing cg_clif on Windows that I mentioned in https://github.com/rust-lang/rust/pull/81746#issuecomment-1774099637 are fixed now.
2024-09-09update `rust.verbose-tests` doc in `config.example.toml`onur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-09Stabilize `char::MIN`okaneco-4/+1
2024-09-09use verbose flag as a default value for `rust.verbose-tests`onur-ozkan-0/+12
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-09fix UB in a testRalf Jung-3/+41
also add an explicit test for the fact that a Option<WidePtr> has padding when it is None
2024-09-09union padding computation: add fast-path for ZSTRalf Jung-12/+43
Also avoid even tracking empty ranges, and add fast-path for arrays of scalars
2024-09-09Auto merge of #130135 - Kobzol:bootstrap-check-linker, r=onur-ozkanbors-3/+3
Do not skip linker configuration for `check` builds This essentially reverts a part of https://github.com/rust-lang/rust/pull/128871, to fix https://github.com/rust-lang/rust/issues/130108. This is mostly a hotfix until we can figure out a better way to both avoid rebuilds and avoid configuring the linker for `x check`. Skipping linker for check builds was causing unexpected rebuilds. Fixes: https://github.com/rust-lang/rust/issues/130108
2024-09-09Auto merge of #130133 - workingjubilee:rollup-t5o827k, r=workingjubileebors-979/+1264
Rollup of 14 pull requests Successful merges: - #119229 (Update mingw-w64 + GNU toolchain) - #128345 (added support for GNU/Hurd on x86_64) - #128667 (rustdoc: normalise type/field names) - #129876 (Use sysroot crates maximally in `rustc_codegen_gcc`.) - #130034 ( Fix enabling wasm-component-ld to match other tools ) - #130048 (run-make-support: Add llvm-pdbutil) - #130068 (Test codegen when setting deployment target) - #130070 (Rename variant `AddrOfRegion` of `RegionVariableOrigin` to `BorrowRegion`) - #130087 (remove 'const' from 'Option::iter') - #130090 (make Result::copied unstably const) - #130092 (Fixes typo in wasm32-wasip2 doc comment) - #130107 (const: make ptr.is_null() stop execution on ambiguity) - #130115 (Remove needless returns detected by clippy in libraries) - #130130 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-09do `PolyFnSig` -> `FnSig` conversion laterFolkert de Vries-5/+8
2024-09-09Do not skip linker configuration for `check` buildsJakub Beránek-3/+3
It was causing unexpected rebuilds.
2024-09-09Rollup merge of #130130 - RalfJung:miri-sync, r=RalfJungJubilee-287/+523
Miri subtree update r? `@ghost`
2024-09-09Rollup merge of #130115 - eduardosm:needless-returns-libs, r=workingjubileeJubilee-19/+20
Remove needless returns detected by clippy in libraries
2024-09-09Rollup merge of #130107 - RalfJung:const-ptr-is-null, r=oli-obkJubilee-20/+46
const: make ptr.is_null() stop execution on ambiguity This seems better than saying `false` -- saying `false` is in fact actively unsound if `NonNull` then uses this to permit putting this pointer inside of it, but at runtime it turns out to be null. Part of https://github.com/rust-lang/rust/issues/74939 Cc ```@rust-lang/wg-const-eval```
2024-09-09Rollup merge of #130092 - zslayton:master, r=jieyouxuJubilee-1/+1
Fixes typo in wasm32-wasip2 doc comment
2024-09-09Rollup merge of #130090 - RalfJung:result-copied, r=NoratriebJubilee-6/+18
make Result::copied unstably const The corresponding `Option::copied` is unstably const, so seems reasonable to do the same here.
2024-09-09Rollup merge of #130087 - RalfJung:option-const-iter, r=workingjubileeJubilee-2/+1
remove 'const' from 'Option::iter' This is kind of pointless to be a `const fn` since you can't do anything with the iterator. It is also the only `const fn iter*` in the entire standard library. It probably got constified when `~const` traits got added everywhere, and then was forgotten to be de-constified when that was undone. The rest of the const_option feature seems like it can reasonably be stabilized, but this one IMO should not be stabilized, and it's not worth creating a new tracking issue. Cc https://github.com/rust-lang/rust/issues/67441
2024-09-09Rollup merge of #130070 - gurry:rename-regionkind-addof-to-ref, ↵Jubilee-5/+5
r=compiler-errors Rename variant `AddrOfRegion` of `RegionVariableOrigin` to `BorrowRegion` because "Borrow" is the more idiomatic Rust term than "AddrOf".
2024-09-09Rollup merge of #130068 - madsmtm:deployment-target-test, r=jieyouxuJubilee-27/+177
Test codegen when setting deployment target Test our codegen in different scenarios when setting the deployment target. There are many places here where this is still incorrect, these will be fixed in https://github.com/rust-lang/rust/pull/129342, https://github.com/rust-lang/rust/pull/129367 and https://github.com/rust-lang/rust/pull/129369. See https://github.com/rust-lang/rust/issues/129432 for the bigger picture. Tested locally using: ```console ./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7s-apple-ios,i386-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin" ``` The only Apple targets that aren't tested by the above command are: - `arm64e-apple-darwin`, failed to build, see https://github.com/rust-lang/cc-rs/issues/1205. - `armv7k-apple-watchos`, failed to link, see https://github.com/rust-lang/rust/issues/130071. - `arm64e-apple-ios`, failed to link, see https://github.com/rust-lang/rust/issues/130085. - `i686-apple-darwin`, requires a bit of setup and an older machine, see [the docs](https://doc.rust-lang.org/nightly/rustc/platform-support/i686-apple-darwin.html). - `i386-apple-ios` requires you to set `IPHONEOS_DEPLOYMENT_TARGET=10.0` for the test helpers to work, will be fixed by https://github.com/rust-lang/cc-rs/issues/1030. But all of this is as it was before this PR. Fixes https://github.com/rust-lang/rust/issues/47825, since we now have a test that compiles a `dylib` for `aarch64-apple-ios`. Split out from https://github.com/rust-lang/rust/pull/129342, see that for a little bit of the review that this has gone through already. r? petrochenkov ```@rustbot``` label O-apple
2024-09-09Rollup merge of #130048 - nebulark:runmake_llvm_pdbutil, r=jieyouxuJubilee-0/+24
run-make-support: Add llvm-pdbutil Add llvm-pdbutil to run-make-support, so we can write better unit tests for PDB specific features. r? ````@jieyouxu```` ````@rustbot```` label: +O-windows
2024-09-09Rollup merge of #130034 - alexcrichton:fix-some-wasm-component-ld-comments, ↵Jubilee-44/+19
r=onur-ozkan Fix enabling wasm-component-ld to match other tools It was [pointed out recently][comment] that enabling `wasm-component-ld` as a host tool is different from other host tools. This commit refactors the logic to match by deduplicating selection of when to build other tools and then using the same logic for `wasm-component-ld`. While here I also fixed a typo pointed out in https://github.com/rust-lang/rust/pull/126967#pullrequestreview-2285267534 [comment]: https://github.com/rust-lang/rust/pull/127866#issuecomment-2333434720
2024-09-09Rollup merge of #129876 - nnethercote:more-sysroot-rustc_codegen_gcc, ↵Jubilee-188/+8
r=Mark-Simulacrum Use sysroot crates maximally in `rustc_codegen_gcc`. This shrinks `compiler/rustc_codegen_gcc/Cargo.lock` quite a bit. The only remaining dependencies in `compiler/rustc_codegen_gcc/Cargo.lock` are `gccjit`, `lang_tester`, and `boml`, all of which aren't used in any other compiler crates. The commit also reorders and adds comments to the `extern crate` items so they match those in miri. r? ```@Mark-Simulacrum```
2024-09-09Rollup merge of #128667 - its-the-shrimp:rustdoc_json_types_rename, ↵Jubilee-375/+382
r=aDotInTheVoid rustdoc: normalise type/field names Updates #100961 - `Import` -> `Use`, to better reflect the terminology of Rust & its syntax - `TypeBinding` -> `AssocItemConstraint`, to sync up with `clean` - `FnDecl` -> `FunctionSignature`, because that's what it is - `Header` -> `FunctionHeader`, because `Header` is a very word that's very heavily loaded with different meanings - `ItemEnum::AssocType`: `default` -> `type`, because those items appear in `impl` blocks as well, where they're _not_ the "default" - `ItemEnum::AssocConst`: `default` -> `value`, see the previous point - `ForeignType` -> `ExternType`, because "foreign" is not the right word there - boolean fields' names made to consistently be a phrase that can be a yes/no answer, e.g. `async` -> `is_async` The docs of `ItemEnum::AssocType::type_` & of `ItemEnum::AssocConst::value` are also updated to be up to date with the clarification of the name of the fields
2024-09-09Rollup merge of #128345 - sthibaul:hurd-amd64, r=UrgauJubilee-3/+35
added support for GNU/Hurd on x86_64
2024-09-09Rollup merge of #119229 - mati865:update-mingw-toolchain, ↵Jubilee-2/+5
r=jieyouxu,petrochenkov Update mingw-w64 + GNU toolchain The list of packaged tools and their versions is available at: https://github.com/niXman/mingw-builds-binaries/releases/tag/14.1.0-rt_v12-rev0 Fixes: https://github.com/rust-lang/rust/issues/112368
2024-09-09Auto merge of #129788 - onur-ozkan:incompatibility-check-for-llvm, r=Kobzolbors-34/+147
detect incompatible CI LLVM options more precisely Previously, the logic here was simply checking whether the option was set in `config.toml`. This approach was not manageable in our CI runners as we set so many options in config.toml. In reality, those values are not incompatible since they are usually the same value used to generate the CI llvm. Now, the new logic compares the configuration values with the values used to generate the CI llvm, so we get more precise results and make the process more manageable. Fixes #129153
2024-09-09Fix ICE caused by missing span in a region errorGurinder Singh-3/+70
2024-09-09Remove unnecessary lifetime from `StorageConflictVisitor`.Nicholas Nethercote-8/+8
2024-09-09Remove `Elaborator`.Nicholas Nethercote-36/+24
It's a trivial wrapper around `ElaborateDropsCtxt` that serves no apparent purpose.
2024-09-09Remove `Gatherer`.Nicholas Nethercote-46/+29
It's a very thin wrapper that pairs `MoveDataBuilder` with a `Location`, and it has four lifetime arguments. This commit removes it by just adding a `Location` to `MoveDataBuilder`.
2024-09-09Rename some lifetimes.Nicholas Nethercote-5/+5
Give them the names used in most places.
2024-09-09Remove unnecessary lifetime from `OperandCollector`.Nicholas Nethercote-4/+4
Also put the remaining lifetimes into the usual order.
2024-09-09Remove unnecessary lifetime in `PlaceCollector`.Nicholas Nethercote-4/+4
2024-09-09Remove unnecessary lifetimes in dataflow structs.Nicholas Nethercote-151/+141
There are four related dataflow structs: `MaybeInitializedPlaces`, `MaybeUninitializedPlaces`, and `EverInitializedPlaces`, `DefinitelyInitializedPlaces`. They all have a `&Body` and a `&MoveData<'tcx>` field. The first three use different lifetimes for the two fields, but the last one uses the same lifetime for both. This commit changes the first three to use the same lifetime, removing the need for one of the lifetimes. Other structs that also lose a lifetime as a result of this are `LivenessContext`, `LivenessResults`, `InitializationData`. It then does similar things in various other structs.
2024-09-09Print a helpful message if any tests were skipped for being up-to-dateZalathar-0/+16
2024-09-09Improve consistency in `LowerIntrinsics`.Nicholas Nethercote-62/+63
In some cases `target` and `arg` are obtained fallibly, and in some cases they are obtained infallibly. This commit changes them all to infallible.
2024-09-09Use `LocalDecls` in a couple of places.Nicholas Nethercote-4/+2
It's nicer than the `IndexVec` type.
2024-09-09Make `CallSite` non-`Copy`.Nicholas Nethercote-1/+1
It doesn't need to be, and it's 72 bytes on 64-bit platforms, which is fairly large.