about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-27Merge pull request #4498 from RalfJung/genmc-buildRalf Jung-42/+1130
Add support for building and linking against genmc
2025-07-27various minor adjustmentsRalf Jung-79/+49
2025-07-27Add support for building and linking against genmcPatrick-6-42/+1160
2025-07-27Merge pull request #4497 from RalfJung/check-shimRalf Jung-793/+897
introduce a macro for shim signature checking
2025-07-27introduce a macro for shim signature checkingRalf Jung-795/+900
Co-Authored-By: geetanshjuneja <ronitjuneja2002@gmail.com>
2025-07-27Merge pull request #4496 from RalfJung/ctor-ret-typeRalf Jung-2/+54
call_function helper: dont ICE on return type mismatches
2025-07-27call_function helper: dont ICE on return type mismatchesRalf Jung-2/+54
2025-07-26Merge pull request #4494 from RalfJung/ciRalf Jung-0/+4
CI: run apt update before installing anything
2025-07-26CI: run apt update before installing anythingRalf Jung-0/+4
2025-07-25Merge pull request #4489 from Stypox/misc-tracing-fixesRalf Jung-6/+11
Miscellaneous fixes for tracing
2025-07-25Merge pull request #4492 from rust-lang/rustup-2025-07-25Ralf Jung-12089/+14605
Automatic Rustup
2025-07-25fix target jsonRalf Jung-1/+1
2025-07-25Fix double "fatal error: " in messageStypox-1/+1
2025-07-25Fix missing $ in enter_trace_span!Stypox-1/+1
2025-07-25Use i64 for tracing chrome "id"Stypox-4/+9
Perfetto gives an error if an id does not fit in an 64-bit signed integer in 2's complement.
2025-07-25Merge pull request #4493 from Kobzol/ci-fail-messageRalf Jung-1/+1
Fix cronjob Zulip message
2025-07-25Fix cronjob Zulip messageJakub Beránek-1/+1
2025-07-25fmtThe Miri Cronjob Bot-7/+2
2025-07-25Merge ref 'b56aaec52bc0' from rust-lang/rustThe Miri Cronjob Bot-12080/+14601
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: b56aaec52bc0fa35591a872fb4aac81f606e265c Filtered ref: 12f5e3255df658296af9fc953d8c1ab79ba91ea3 This merge was created using https://github.com/rust-lang/josh-sync.
2025-07-25Remove `compiler-builtins-mangled-names`Trevor Gross-3/+0
This config was added in 207de019dc67 ("libary: Forward compiler-builtins "asm" and "mangled-names" feature") but it does not appear this has ever been used. The PR adding it (RUST-78472) says that this was exposed to help with configuration and points at the [Hermit Cargo config], but as far as I can tell, this feature name has never been mentioned in that repository's git history. Thus, clean up a seemingly unneeded feature. [Hermit Cargo config]: https://github.com/hermit-os/hermit-rs/blob/ab2b830930e6a9a98c8294997a8183feeabeda4a/.cargo/config
2025-07-25Remove `compiler-builtins-no-asm`Trevor Gross-3/+0
This feature used to be for when Cranelift didn't support inline assembly, but its last uses were removed in 52933e0bd200 ("Don't disable inline asm usage in compiler-builtins when the cranelift backend is enabled"). and cba05a7a14b3 ("Support naked functions"). This doesn't remove the feature from the `compiler-builtins` crate, that will be done separately in the subtree repo.
2025-07-25Auto merge of #144440 - matthiaskrgr:rollup-peb88gb, r=matthiaskrgrbors-261/+511
Rollup of 12 pull requests Successful merges: - rust-lang/rust#142569 (Suggest clone in user-write-code instead of inside macro) - rust-lang/rust#143401 (tests: Don't check for self-printed output in std-backtrace.rs test) - rust-lang/rust#143424 (clippy fix: rely on autoderef) - rust-lang/rust#143970 (Update core::mem::copy documentation) - rust-lang/rust#143979 (Test fixes for Arm64EC Windows) - rust-lang/rust#144200 (Tweak output for non-`Clone` values moved into closures) - rust-lang/rust#144209 (Don't emit two `assume`s in transmutes when one is a subset of the other) - rust-lang/rust#144314 (Hint that choose_pivot returns index in bounds) - rust-lang/rust#144340 (UI test suite clarity changes: Rename `tests/ui/SUMMARY.md` and update rustc dev guide on `error-pattern`) - rust-lang/rust#144368 (resolve: Remove `Scope::CrateRoot`) - rust-lang/rust#144390 (Remove dead code and extend test coverage and diagnostics around it) - rust-lang/rust#144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-25Rollup merge of #144392 - makai410:rm-mov, r=scottmcmMatthias Krüger-14/+8
rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine` Part of rust-lang/rust#119174 . I think we should be good now to sync this change in rustc_public.
2025-07-25Rollup merge of #144390 - oli-obk:arbitrary-enum-discrs, r=SparrowLiiMatthias Krüger-48/+65
Remove dead code and extend test coverage and diagnostics around it I was staring a bit at the `dont_niche_optimize_enum` variable and figured out that part of it is dead code (at least today it is). I changed the diagnostic and test around the code that makes that part dead code, so everything that makes removing that code sound is visible in this PR
2025-07-25Rollup merge of #144368 - petrochenkov:rmrootscope, r=b-naberMatthias Krüger-57/+39
resolve: Remove `Scope::CrateRoot` Use `Scope::Module` with the crate root module inside instead, which should be identical. This is a simplification by itself, but it will be even larger simplification if something like https://github.com/rust-lang/rust/pull/144131 is implemented, because `Scope::CrateRoot` is also a module with two actual scopes in it (for globs and non-globs). I also did some renamings for consistency: - `ScopeSet::AbsolutePath` -> `ScopeSet::ModuleAndExternPrelude` - `ModuleOrUniformRoot::CrateRootAndExternPrelude` -> `ModuleOrUniformRoot::ModuleAndExternPrelude` - `is_absolute_path` -> `module_and_extern_prelude`
2025-07-25Rollup merge of #144340 - Oneirical:uncertain-illusion, r=jieyouxuMatthias Krüger-4/+4
UI test suite clarity changes: Rename `tests/ui/SUMMARY.md` and update rustc dev guide on `error-pattern` To match convention, rename `tests/ui/SUMMARY.md` to `tests/ui/README.md`. Also, remove misleading lines in the rustc development guide about `error-pattern` being "not recommended", when it really is just a last resort which *should* be used in the niche situations where it is useful. r? ````@jieyouxu````
2025-07-25Rollup merge of #144314 - kornelski:pivot-safely, r=jhprattMatthias Krüger-10/+10
Hint that choose_pivot returns index in bounds Instead of using `unsafe` in multiple places, one `hint::assert_unchecked` allows use of safe code instead. Part of #rust-lang/rust#144326
2025-07-25Rollup merge of #144209 - scottmcm:assume_less, r=lcnr,dianqkMatthias Krüger-12/+150
Don't emit two `assume`s in transmutes when one is a subset of the other For example, transmuting between `bool` and `Ordering` doesn't need two `assume`s because one range is a superset of the other. Multiple are still used for things like `char` <-> `NonZero<u32>`, which overlap but where neither fully contains the other.
2025-07-25Rollup merge of #144200 - estebank:dont-point-at-closure, r=lcnrMatthias Krüger-99/+148
Tweak output for non-`Clone` values moved into closures When we encounter a non-`Clone` value being moved into a closure, try to find the corresponding type of the binding being moved, if it is a `let`-binding or a function parameter. If any of those cases, we point at them with the note explaining that the type is not `Copy`, instead of giving that label to the place where it is captured. When it is a `let`-binding with no explicit type, we point at the initializer (if it fits in a single line). ``` error[E0507]: cannot move out of `foo`, a captured variable in an `Fn` closure --> f111.rs:14:25 | 13 | fn do_stuff(foo: Option<Foo>) { | --- ----------- move occurs because `foo` has type `Option<Foo>`, which does not implement the `Copy` trait | | | captured outer variable 14 | require_fn_trait(|| async { | -- ^^^^^ `foo` is moved here | | | captured by this `Fn` closure 15 | if foo.map_or(false, |f| f.foo()) { | --- variable moved due to use in coroutine ``` instead of ``` error[E0507]: cannot move out of `foo`, a captured variable in an `Fn` closure --> f111.rs:14:25 | 13 | fn do_stuff(foo: Option<Foo>) { | --- captured outer variable 14 | require_fn_trait(|| async { | -- ^^^^^ `foo` is moved here | | | captured by this `Fn` closure 15 | if foo.map_or(false, |f| f.foo()) { | --- | | | variable moved due to use in coroutine | move occurs because `foo` has type `Option<Foo>`, which does not implement the `Copy` trait ```
2025-07-25Rollup merge of #143979 - dpaoliello:arm64ectest, r=petrochenkovMatthias Krüger-2/+6
Test fixes for Arm64EC Windows * `tests/ui/cfg/conditional-compile-arch.rs` needs an Arm64EC case. * `tests/ui/runtime/backtrace-debuginfo.rs` should skip Arm64EC as it suffers from the same truncated backtraces as Arm64 Windows. * `tests/ui/linkage-attr/incompatible-flavor.rs` is a general issue: it assumes that the Rust compiler is always built with the x86 target enabled in the backend, but I only enabled AArch64 when building locally to speed up the LLVM compilation.
2025-07-25Rollup merge of #143970 - SunkenPotato:update_mem_copy_docs, r=scottmcmMatthias Krüger-1/+1
Update core::mem::copy documentation Update the documentation of `core::mem::copy` to include a `const` on the definition of the function.
2025-07-25Rollup merge of #143424 - hkBst:auto-deref, r=jhprattMatthias Krüger-7/+7
clippy fix: rely on autoderef Changes instances of `&**self` to `self`.
2025-07-25Rollup merge of #143401 - Enselic:no-stack-backtrace-print-in-display, ↵Matthias Krüger-6/+2
r=davidtwco tests: Don't check for self-printed output in std-backtrace.rs test The `Display` implementation for `Backtrace` used to print stack backtrace: but that print was since removed. See https://github.com/rust-lang/backtrace-rs/pull/286 and https://github.com/rust-lang/rust/pull/69042. To make the existing test pass, the print was added to the test instead. But it doesn't make sense to check for something that the test itself does since that will not detect any regressions in the implementation of `Backtrace`. What the test _should_ check is that "stack backtrace:" is _not_ printed in `Display` of `Backtrace`. So do that instead. This is one small steps towards resolving https://github.com/rust-lang/rust/issues/71706. The next steps after this step involves extending and hardening that test further.
2025-07-25Rollup merge of #142569 - xizheyin:139253, r=davidtwcoMatthias Krüger-1/+71
Suggest clone in user-write-code instead of inside macro Fixes rust-lang/rust#139253 Inspired by rust-lang/rust#142543 r? ````@fmease````
2025-07-25Prepare for merging from rust-lang/rustThe Miri Cronjob Bot-1/+1
This updates the rust-version file to b56aaec52bc0fa35591a872fb4aac81f606e265c.
2025-07-24Rename tests/ui/SUMMARY.md and update rustc dev guide on error-patternOneirical-4/+4
2025-07-24Auto merge of #144389 - scottmcm:no-more-mir-cast-assume, r=davidtwcobors-151/+38
MIR-build: No longer emit assumes in enum-as casting This just uses the `valid_range` from the backend, so it's duplicating the range metadata that now we include on parameters and loads, and thus no longer seems to be useful -- notably there's no codegen test failures from removing it. (Because it's using data from the same source as the backend annotations, it doesn't do anything to mitigate things like rust-lang/rust#144388 where the range in the layout is more permissive than the actual possible discriminants. A variant of this that actually checked the discriminants more specifically might be useful, so could potentially be added in future, but I don't think the *current* checks are actually providing value.) r? mir Randomly turns out that this Fixes https://github.com/rust-lang/rust/issues/121097
2025-07-24MIR-build: No longer emit assumes in enum-as castingScott McMurray-151/+38
This just uses the `valid_range` from the backend, so it's duplicating the range metadata that now we include on parameters and loads.
2025-07-24Auto merge of #144398 - fmease:rollup-z6vq7mi, r=fmeasebors-1578/+1839
Rollup of 15 pull requests Successful merges: - rust-lang/rust#143374 (Unquerify extern_mod_stmt_cnum.) - rust-lang/rust#143838 (std: net: uefi: Add support to query connection data) - rust-lang/rust#144014 (don't link to the nightly version of the Edition Guide in stable lints) - rust-lang/rust#144094 (Ensure we codegen the main fn) - rust-lang/rust#144218 (Use serde for target spec json deserialize) - rust-lang/rust#144221 (generate elf symbol version in raw-dylib) - rust-lang/rust#144240 (Add more test case to check if the false note related to sealed trait suppressed) - rust-lang/rust#144247 (coretests/num: use ldexp instead of hard-coding a power of 2) - rust-lang/rust#144276 (Use less HIR in check_private_in_public.) - rust-lang/rust#144278 (add Rev::into_inner) - rust-lang/rust#144317 (pass build.npm from bootstrap to tidy and use it for npm install) - rust-lang/rust#144320 (rustdoc: avoid allocating a temp String for aliases in search index) - rust-lang/rust#144334 (rustc_resolve: get rid of unused rustdoc::span_of_fragments_with_expansion) - rust-lang/rust#144335 (Don't suggest assoc ty bound on non-angle-bracketed problematic assoc ty binding) - rust-lang/rust#144358 (Stop using the old `validate_attr` logic for stability attributes) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-24Rollup merge of #144358 - JonathanBrouwer:fix-stability-malformed, r=oli-obkLeón Orell Valerian Liehr-14/+47
Stop using the old `validate_attr` logic for stability attributes I think this was accidentally missed when implementing the stability attributes? r? `````@oli-obk````` cc `````@jdonszelmann`````
2025-07-24Rollup merge of #144335 - fmease:no-angle-no-colon, r=SparrowLiiLeón Orell Valerian Liehr-5/+36
Don't suggest assoc ty bound on non-angle-bracketed problematic assoc ty binding Fixes https://github.com/rust-lang/rust/issues/140543.
2025-07-24Rollup merge of #144334 - lolbinarycat:rustdoc-span_of_fragments-revert, ↵León Orell Valerian Liehr-13/+4
r=GuillaumeGomez rustc_resolve: get rid of unused rustdoc::span_of_fragments_with_expansion This function can cause false negatives if used incorrectly (usually "do any of the doc fragments come from a macro" is the wrong question to ask), and thus it is unused. r? `````@GuillaumeGomez`````
2025-07-24Rollup merge of #144320 - lolbinarycat:rustdoc-search_index-BTreeMap-str, ↵León Orell Valerian Liehr-3/+16
r=GuillaumeGomez rustdoc: avoid allocating a temp String for aliases in search index Here's the optimization I talked about in https://github.com/rust-lang/rust/pull/143988#discussion_r2208524163 I got around the Serialize issue using the newtype pattern. The wrapper type could be factored out into a helper that would work with anything that impls `AsRef<&str>`, but I'm not sure if that would be helpful anywhere else. r? ``````@GuillaumeGomez``````
2025-07-24Rollup merge of #144317 - lolbinarycat:tidy-obey-build.npm, r=KobzolLeón Orell Valerian Liehr-4/+14
pass build.npm from bootstrap to tidy and use it for npm install followup to rust-lang/rust#142924 r? ```@Kobzol```
2025-07-24Rollup merge of #144278 - Qelxiros:rev-into-inner, r=tgross35León Orell Valerian Liehr-0/+19
add Rev::into_inner Tracking issue: rust-lang/rust#144277
2025-07-24Rollup merge of #144276 - cjgillot:no-hir-privacy, r=petrochenkovLeón Orell Valerian Liehr-124/+92
Use less HIR in check_private_in_public. r? ````````@petrochenkov````````
2025-07-24Rollup merge of #144247 - RalfJung:ldexp, r=tgross35León Orell Valerian Liehr-32/+38
coretests/num: use ldexp instead of hard-coding a power of 2 r? `````@tgross35`````
2025-07-24Rollup merge of #144240 - ↵León Orell Valerian Liehr-5/+32
yuk1ty:false-sealed-traits-note-reported-in-another-issue, r=fee1-dead Add more test case to check if the false note related to sealed trait suppressed Closes rust-lang/rust#143121 I started to fix the issue but I found that this one has already been addressed in this PR (https://github.com/rust-lang/rust/pull/143431). I added an additional test to prove the reported thing has been resolved just in case. I think we can discard this pull request if there's no need to add such kind of tests👍🏻
2025-07-24Rollup merge of #144221 - usamoi:versym, r=bjorn3León Orell Valerian Liehr-29/+267
generate elf symbol version in raw-dylib For link names like `aaa@bbb`, it generates a symbol named `aaa` and a version named `bbb`. For link names like `aaa\0bbb`, `aaa@`@bbb`` or `aa@bb@cc`, it emits errors. It adds a test that the executable is linked with glibc using raw-dylib. cc rust-lang/rust#135694
2025-07-24Rollup merge of #144218 - Noratrieb:target-spec-json-de-jank, r=fee1-deadLeón Orell Valerian Liehr-849/+678
Use serde for target spec json deserialize The previous manual parsing of `serde_json::Value` was a lot of complicated code and extremely error-prone. It was full of janky behavior like sometimes ignoring type errors, sometimes erroring for type errors, sometimes warning for type errors, and sometimes just ICEing for type errors (the icing on the top). Additionally, many of the error messages about allowed values were out of date because they were in a completely different place than the FromStr impls. Overall, the system caused confusion for users. I also found the old deserialization code annoying to read. Whenever a `key!` invocation was found, one had to first look for the right macro arm, and no go to definition could help. This PR replaces all this manual parsing with a 2-step process involving serde. First, the string is parsed into a `TargetSpecJson` struct. This struct is a 1:1 representation of the spec JSON. It already parses all the enums and is very simple to read and write. Then, the fields from this struct are copied into the actual `Target`. The reason for this two-step process instead of just serializing into a `Target` is because of a few reasons 1. There are a few transformations performed between the two formats 2. The default logic is implemented this way. Otherwise all the default field values would have to be spelled out again, which is suboptimal. With this logic, they fall out naturally, because everything in the json struct is an `Option`. Overall, the mapping is pretty simple, with the vast majority of fields just doing a 1:1 mapping that is captured by two macros. I have deliberately avoided making the macros generic to keep them simple. All the `FromStr` impls now have the error message right inside them, which increases the chance of it being up to date. Some "`from_str`" impls were turned into proper `FromStr` impls to support this. The new code is much less involved, delegating all the JSON parsing logic to serde, without any manual type matching. This change introduces a few breaking changes for consumers. While it is possible to use this format on stable, it is very much subject to change, so breaking changes are expected. The hope is also that because of the way stricter behavior, breaking changes are easier to deal with, as they come with clearer error messages. 1. Invalid types now always error, everywhere. Previously, they would sometimes error, and sometimes just be ignored (which meant the users JSON was still broken, just silently!) 2. This now makes use of `deny_unknown_fields` instead of just warning on unused fields, which was done previously. Serde doesn't make it easy to get such warning behavior, which was the primary reason that this now changed. But I think error behavior is very reasonable too. If someone has random stale fields in their JSON, it is likely because these fields did something at some point but no longer do, and the user likely wants to be informed of this so they can figure out what to do. This is also relevant for the future. If we remove a field but someone has it set, it probably makes sense for them to take a look whether they need this and should look for alternatives, or whether they can just delete it. Overall, the JSON is made more explicit. This is the only expected breakage, but there could also be small breakage from small mistakes. All targets roundtrip though, so it can't be anything too major. fixes rust-lang/rust#144153