about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-04-04Merge pull request #4250 from asomers/patch-1Ralf Jung-0/+1
Add another Miri-detected bug to README.md
2025-04-04Merge pull request #4248 from RalfJung/edition-2024Ralf Jung-44/+59
bump parts of test-cargo-miri to edition 2024
2025-04-04Update README.md Alan Somers-1/+1
verb -> participle Co-authored-by: Ralf Jung <post@ralfj.de>
2025-04-04bump parts of test-cargo-miri to edition 2024Ralf Jung-44/+59
2025-04-03Add another Miri-detected bug to README.mdAlan Somers-0/+1
Miri detected this bug in Mockall: https://github.com/asomers/mockall/issues/647 [skip ci]
2025-04-03Merge pull request #4249 from RalfJung/test-cargo-miri-strict-provenanceRalf Jung-7/+2
test-cargo-miri: permissive provenance should not be needed any more
2025-04-03test-cargo-miri: permissive provenance should not be needed any moreRalf Jung-7/+2
2025-04-03Merge pull request #4247 from RalfJung/foreign-items-commentRalf Jung-2/+1
foreign_items: make comment more consistent
2025-04-03fix comment nitRalf Jung-2/+1
2025-04-03Merge pull request #4246 from RalfJung/freeze-sensitive-commentRalf Jung-0/+3
visit_freeze_sensitive: add comment
2025-04-03visit_freeze_sensitive: add commentRalf Jung-0/+3
2025-04-02Merge pull request #4245 from RalfJung/rustupRalf Jung-16076/+21634
Rustup
2025-04-02Merge from rustcRalf Jung-16075/+21633
2025-04-03Pass correct param-env to error_impliesMichael Goulet-29/+98
2025-04-02Preparing for merge from rustcRalf Jung-1/+1
2025-04-02Auto merge of #139269 - matthiaskrgr:rollup-pk78gig, r=matthiaskrgrbors-262/+475
Rollup of 6 pull requests Successful merges: - #138992 (literal pattern lowering: use the pattern's type instead of the literal's in `const_to_pat`) - #139211 (interpret: add a version of run_for_validation for &self) - #139235 (`AstValidator` tweaks) - #139237 (Add a dep kind for use of the anon node with zero dependencies) - #139260 (Add dianqk to codegen reviewers) - #139264 (Fix two incorrect turbofish suggestions) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-02Rollup merge of #139264 - freyacodes:fix/bad-turbofish-hints, r=petrochenkovMatthias Krüger-7/+58
Fix two incorrect turbofish suggestions This fixes #121901 This is my contribution to Rust, and my first contribution to a language parser that I didn't write myself. I am a bit outside my depth here, so any constructive criticism is appreciated.
2025-04-02Rollup merge of #139260 - dianqk:dianqk-codegen-reviewers, r=UrgauMatthias Krüger-1/+1
Add dianqk to codegen reviewers Not an expert yet, but I may be able to review some LLVM-related PRs. r? codegen
2025-04-02Rollup merge of #139237 - Zoxc:anon-0-deps-kind, r=compiler-errorsMatthias Krüger-5/+21
Add a dep kind for use of the anon node with zero dependencies This adds a dep kind for use of the anon node with zero dependencies instead of making use of the null node. I don't think this matters, but it is nicer than random null nodes in the dep graph.
2025-04-02Rollup merge of #139235 - nnethercote:AstValidator-tweaks, r=compiler-errorsMatthias Krüger-188/+189
`AstValidator` tweaks When I read through `AstValidator` there were several things that tripped me up, and made the code harder to understand than I would have liked. This PR addresses them. Best reviewed one commit at a time. r? ``@davidtwco``
2025-04-02Rollup merge of #139211 - RalfJung:interpret-run-for-validation, r=oli-obkMatthias Krüger-13/+34
interpret: add a version of run_for_validation for &self Turns out we'll need this for some ongoing work in Miri. r? ``@oli-obk``
2025-04-02Rollup merge of #138992 - dianne:simplify-byte-string-to-pat, r=oli-obkMatthias Krüger-48/+172
literal pattern lowering: use the pattern's type instead of the literal's in `const_to_pat` This has two purposes: - First, it enables removing the `treat_byte_string_as_slice` fields from `TypeckResults` and `ConstToPat`. A byte string pattern's type will be `&[u8]` when matching on a slice reference, so `const_to_pat` will lower it to a slice ref pattern. I believe this is tested by `tests/ui/match/pattern-deref-miscompile.rs`. - Second, it will simplify the implementation of byte string literals in deref patterns. If byte string patterns can be given the type `[u8; N]` or `[u8]` during HIR typeck, then nothing needs to be changed in `const_to_pat` in order to lower the patterns `deref!(b"..."): Vec<u8>` and `deref!(b"..."): Box<[u8; 3]>`. Implementation-wise, this uses `lit_to_const` to make a const with the pattern's type and the literal's valtree; that feels to me like the best way to make sure that the valtree representations of the pattern type and literal are the same. Though it may necessitate later changes to `lit_to_const` to accommodate giving byte string literal patterns non-reference types—would that be reasonable? This unfortunately doesn't work for the `string_deref_patterns` feature (since that gives string literal patterns the `String` type), so I added a workaround for that. However, once `deref_patterns` supports string literals, it may be able to replace `string_deref_patterns`; the special case for `String` can removed at that point. r? ``@oli-obk``
2025-04-02Fix two incorrect turbofish suggestionsFreya Arbjerg-7/+58
Fixes #121901
2025-04-02Add dianqk to codegen reviewersdianqk-1/+1
2025-04-02Auto merge of #139257 - TaKO8Ki:rollup-vjzdas7, r=TaKO8Kibors-238/+397
Rollup of 5 pull requests Successful merges: - #139178 (Remove cjgillot from automated review assignment) - #139184 (Add unstable `--print=crate-root-lint-levels`) - #139215 (Add `opt-level = "s"` for more std symbolication crates) - #139232 (Move methods from `Map` to `TyCtxt`, part 5.) - #139239 (Remove `aux_build` run-make rustc helpers) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-02Rollup merge of #139239 - jieyouxu:run-make-aux-build, r=KobzolTakayuki Maeda-19/+5
Remove `aux_build` run-make rustc helpers They provide very little value and makes it more confusing than is helpful. Helps with #138066. r? `@Kobzol`
2025-04-02Rollup merge of #139232 - nnethercote:remove-Map-5, r=ZalatharTakayuki Maeda-208/+175
Move methods from `Map` to `TyCtxt`, part 5. This eliminates all methods on `Map`. Actually removing `Map` will occur in a follow-up PR. A follow-up to #137504. r? `@Zalathar`
2025-04-02Rollup merge of #139215 - clubby789:std-size-tweaks, r=joboetTakayuki Maeda-0/+3
Add `opt-level = "s"` for more std symbolication crates This reduces the size of a hello world binary built by stage 1 in release by a few kilobytes
2025-04-02Rollup merge of #139184 - Urgau:crate-root-lint-levels, r=jieyouxuTakayuki Maeda-9/+213
Add unstable `--print=crate-root-lint-levels` This PR implements `--print=crate-root-lint-levels` from MCP 833 https://github.com/rust-lang/compiler-team/issues/833. Tracking issue: https://github.com/rust-lang/rust/issues/139180 Best reviewed commit by commit.
2025-04-02Rollup merge of #139178 - apiraino:remove-cjgillot-automated-assighment, ↵Takayuki Maeda-2/+1
r=cjgillot Remove cjgillot from automated review assignment As discussed [on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Review.20for.20.23137465/with/508540539). To be clear, this is not a value judgement, it's just a way to improve our fairness when assigning reviews, trying to find a balance between leaving time to Rust contributors review on their terms and availability and avoid having PRs waiting for too long. > [!IMPORTANT] > This is not a final decision! Rust contributors are free to re-add themselves back to the active review rotation (if they feel like it) once they have more availability. cc: `@cjgillot`
2025-04-02Auto merge of #139018 - oli-obk:incremental-trait-impls, r=compiler-errorsbors-94/+97
Various local trait item iteration cleanups Adding a trait impl for `Foo` unconditionally affected all queries that are interested in a completely independent trait `Bar`. Perf has no effect on this. We probably don't have a good perf test for this tho. r? `@compiler-errors` I am unsure about https://github.com/rust-lang/rust/pull/139018/commits/9d05efb66f7b599eeacb5d2456f844fe4768e865 as it doesn't improve anything wrt incremental, because we still do all the checks for valid `Drop` impls, which subsequently will still invoke many queries and basically keep the depgraph the same. I want to do https://github.com/rust-lang/rust/blob/9549077a47099dc826039c051b528d1013740e6f/compiler/rustc_middle/src/ty/trait_def.rs#L141 but would leave that to a follow-up PR, this one changes enough things as it is
2025-04-02Update `run-make` tests to no longer use `aux_build`Jieyou Xu-4/+4
2025-04-02Drop `aux_build` rustc helpersJieyou Xu-15/+1
They provide very little value and makes it more confusing than is helpful.
2025-04-02Only walk local items instead of filtering for them laterOli Scherer-23/+19
2025-04-02Remove a function that has no necessary callersOli Scherer-17/+2
2025-04-02Remove a `hir_*` helper that was just forwarding to a queryOli Scherer-6/+2
2025-04-02Directly fetch the impl self typeOli Scherer-2/+2
2025-04-02Fetch the destructor constness lazilyOli Scherer-8/+6
2025-04-02Only look at trait impls in the current crate when looking for `Drop` implsOli Scherer-18/+30
2025-04-02Auto merge of #138848 - clubby789:cargo-update, r=Mark-Simulacrumbors-577/+611
Update dependencies #136077 needs manual tweaking ``` compiler and tools dependencies Updating anyhow v1.0.95 -> v1.0.97 Updating basic-toml v0.1.9 -> v0.1.10 Updating bitflags v2.8.0 -> v2.9.0 Updating blake3 v1.5.5 -> v1.8.0 Updating bumpalo v3.16.0 -> v3.17.0 Removing byteorder v1.5.0 Updating bytes v1.9.0 -> v1.10.1 Updating cargo_metadata v0.19.1 -> v0.19.2 Updating chrono v0.4.39 -> v0.4.40 Updating chrono-tz v0.10.1 -> v0.10.3 Updating chrono-tz-build v0.4.0 -> v0.4.1 Updating clap v4.5.26 -> v4.5.35 Updating clap_builder v4.5.26 -> v4.5.35 Updating clap_derive v4.5.24 -> v4.5.35 Updating console v0.15.10 -> v0.15.11 Updating cpufeatures v0.2.16 -> v0.2.17 Updating curl-sys v0.4.78+curl-8.11.0 -> v0.4.80+curl-8.12.1 Updating darling v0.20.10 -> v0.20.11 Updating darling_core v0.20.10 -> v0.20.11 Updating darling_macro v0.20.10 -> v0.20.11 Updating deranged v0.3.11 -> v0.4.1 Updating dissimilar v1.0.9 -> v1.0.10 Updating either v1.13.0 -> v1.15.0 Updating elsa v1.11.0 -> v1.11.2 Updating env_logger v0.11.6 -> v0.11.7 Updating equivalent v1.0.1 -> v1.0.2 Updating flate2 v1.0.35 -> v1.1.0 Updating foldhash v0.1.4 -> v0.1.5 Updating getrandom v0.3.1 -> v0.3.2 Updating globset v0.4.15 -> v0.4.16 Downgrading html5ever v0.29.2 -> v0.29.1 (available: v0.30.0) Updating humantime v2.1.0 -> v2.2.0 Updating icu_list_data v1.5.0 -> v1.5.1 Updating icu_locid_transform_data v1.5.0 -> v1.5.1 Updating icu_normalizer_data v1.5.0 -> v1.5.1 Updating icu_properties_data v1.5.0 -> v1.5.1 Updating indexmap v2.7.0 -> v2.8.0 Updating indicatif v0.17.9 -> v0.17.11 Updating inout v0.1.3 -> v0.1.4 Updating itoa v1.0.14 -> v1.0.15 Adding jiff v0.2.5 Adding jiff-static v0.2.5 Updating jobserver v0.1.32 -> v0.1.33 Updating lexopt v0.3.0 -> v0.3.1 Adding leb128fmt v0.1.0 Updating libc v0.2.169 -> v0.2.171 Updating libz-sys v1.1.21 -> v1.1.22 Updating linux-raw-sys v0.4.15 -> v0.9.3 Updating litemap v0.7.4 -> v0.7.5 Updating log v0.4.25 -> v0.4.27 Downgrading markup5ever v0.15.0 -> v0.14.1 Updating miniz_oxide v0.8.3 -> v0.8.5 Updating once_cell v1.20.2 -> v1.21.3 Updating openssl-probe v0.1.5 -> v0.1.6 Updating openssl-sys v0.9.104 -> v0.9.106 Updating pest v2.7.15 -> v2.8.0 Updating pest_derive v2.7.15 -> v2.8.0 Updating pest_generator v2.7.15 -> v2.8.0 Updating pest_meta v2.7.15 -> v2.8.0 Updating pkg-config v0.3.31 -> v0.3.32 Updating portable-atomic v1.10.0 -> v1.11.0 Adding portable-atomic-util v0.2.4 Updating ppv-lite86 v0.2.20 -> v0.2.21 Updating proc-macro2 v1.0.93 -> v1.0.94 Updating quote v1.0.38 -> v1.0.40 Adding r-efi v5.2.0 Updating rand_core v0.9.0 -> v0.9.3 Updating redox_syscall v0.5.8 -> v0.5.10 Updating rustc-stable-hash v0.1.1 -> v0.1.2 Updating rustc_tools_util v0.4.0 -> v0.4.2 Updating rustix v0.38.43 -> v1.0.5 Updating rustversion v1.0.19 -> v1.0.20 Updating ryu v1.0.18 -> v1.0.20 Updating semver v1.0.24 -> v1.0.26 Updating serde v1.0.217 -> v1.0.219 Updating serde_derive v1.0.217 -> v1.0.219 Updating serde_json v1.0.135 -> v1.0.140 Updating similar v2.6.0 -> v2.7.0 Updating smallvec v1.13.2 -> v1.14.0 Updating socket2 v0.5.8 -> v0.5.9 Updating stacker v0.1.18 -> v0.1.20 Updating string_cache v0.8.8 -> v0.8.9 Updating syn v2.0.96 -> v2.0.100 Updating tar v0.4.43 -> v0.4.44 Updating tempfile v3.15.0 -> v3.19.1 Updating thin-vec v0.2.13 -> v0.2.14 Updating thiserror v2.0.11 -> v2.0.12 Updating thiserror-impl v2.0.11 -> v2.0.12 Updating time v0.3.37 -> v0.3.41 Updating time-core v0.1.2 -> v0.1.4 Updating time-macros v0.2.19 -> v0.2.22 Updating tinyvec v1.8.1 -> v1.9.0 Updating tokio v1.43.0 -> v1.44.1 Updating typenum v1.17.0 -> v1.18.0 Updating unicode-ident v1.0.14 -> v1.0.18 Updating uuid v1.12.0 -> v1.16.0 Updating wasi v0.13.3+wasi-0.2.2 -> v0.14.2+wasi-0.2.4 Removing wasm-encoder v0.219.1 Removing wasm-encoder v0.223.0 Adding wasm-encoder v0.219.2 (available: v0.227.1) Adding wasm-encoder v0.223.1 Adding wasm-encoder v0.228.0 Updating wasm-metadata v0.223.0 -> v0.223.1 Removing wasmparser v0.219.1 Removing wasmparser v0.222.0 Removing wasmparser v0.223.0 Adding wasmparser v0.219.2 (available: v0.227.1) Adding wasmparser v0.222.1 Adding wasmparser v0.223.1 Adding wasmparser v0.228.0 Updating wast v223.0.0 -> v228.0.0 Updating wat v1.223.0 -> v1.228.0 Updating windows-core v0.52.0 -> v0.61.0 Adding windows-implement v0.60.0 Updating windows-interface v0.59.0 -> v0.59.1 Adding windows-link v0.1.1 Updating windows-result v0.3.0 -> v0.3.2 Updating windows-strings v0.3.0 -> v0.3.1 Adding windows-strings v0.4.0 Updating wit-bindgen-rt v0.33.0 -> v0.39.0 Updating wit-component v0.223.0 -> v0.223.1 Updating wit-parser v0.223.0 -> v0.223.1 Updating xattr v1.4.0 -> v1.5.0 Updating zerocopy v0.8.14 -> v0.8.24 Updating zerocopy-derive v0.8.14 -> v0.8.24 Updating zerofrom v0.1.5 -> v0.1.6 Updating zerofrom-derive v0.1.5 -> v0.1.6 ```
2025-04-02Add a dep kind for use of the anon node with zero dependenciesJohn Kåre Alsaker-5/+21
2025-04-02Reduce scope of `AstValidator::with_*` calls.Nicholas Nethercote-91/+88
`AstValidator` has several `with_*` methods, each one setting a field that adjust how checking takes place for items within certain other items. E.g. `with_in_trait_impl` is used to adjust the checking done on items inside an `impl` item. Weirdly, the scopes used for most of the `with_*` calls are very broad, and include things that aren't "inside" the item, such as visibility, unsafety, and constness. This commit minimizes the scope of these `with_*` calls so they only apply to the things inside the item.
2025-04-01add tests for array/slice const patternsdianne-0/+137
2025-04-02Auto merge of #139229 - Zalathar:rollup-5cs3f4d, r=Zalatharbors-583/+760
Rollup of 14 pull requests Successful merges: - #135295 (Check empty SIMD vector in inline asm) - #138003 (Add the new `amx` target features and the `movrs` target feature) - #138823 (rustc_target: RISC-V: add base `I`-related important extensions) - #138913 (Remove even more instances of `@ts-expect-error` from search.js) - #138941 (Do not mix normalized and unnormalized caller bounds when constructing param-env for `receiver_is_dispatchable`) - #139060 (replace commit placeholder in vendor status with actual commit) - #139102 (coverage: Avoid splitting spans during span extraction/refinement) - #139191 (small opaque type/borrowck cleanup) - #139200 (Skip suggest impl or dyn when poly trait is not a real trait) - #139208 (fix dead link netbsd.md) - #139210 (chore: remove redundant backtick) - #139212 (Update mdbook to 0.4.48) - #139214 (Tell rustfmt to use the 2024 edition in ./x.py fmt) - #139225 (move autodiff from EnzymeAD/Enzyme to our rust-lang/Enzyme soft-fork) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-02Rename span-related names in `AstValidator`.Nicholas Nethercote-36/+43
A bunch of span-related names in `AstValidator` don't end in `span`, which goes against the usual naming conventions and makes the code surprisingly hard to read. E.g. a name like `body` doesn't sound like it's a span. This commit adds `_span` suffixes.
2025-04-02Rollup merge of #139225 - EnzymeAD:rust-lang-enzyme, r=jieyouxuStuart Cook-1/+1
move autodiff from EnzymeAD/Enzyme to our rust-lang/Enzyme soft-fork In https://github.com/rust-lang/team/pull/1665 we decided to have a soft-fork of Enzyme, to be able to merge e.g. CI, docs, or cmake improvements if upstream is not interested in them. We don't intend to merge logic/code changes. It also seems generally preferable if we clone submodules from a rust-lang repo, instead of an external org. We don't build or checkout Enzyme yet by default, so this should be a safe rollup.
2025-04-02Rollup merge of #139214 - bjorn3:edition_2024_rustfmt, r=compiler-errorsStuart Cook-31/+34
Tell rustfmt to use the 2024 edition in ./x.py fmt Most crates in this repo have been moved to the 2024 edition already. This also allows removing a rustfmt exclusion for a cg_clif test.
2025-04-02Rollup merge of #139212 - ehuss:update-mdbook, r=Mark-SimulacrumStuart Cook-5/+4
Update mdbook to 0.4.48 This brings in several updates. Two significant ones are to halve the search index size, and the other introduces major changes to footnote rendering. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0448
2025-04-02Rollup merge of #139210 - highcloudwind:master, r=aDotInTheVoidStuart Cook-1/+1
chore: remove redundant backtick remove redundant backtick
2025-04-02Rollup merge of #139208 - futreall:master, r=jieyouxuStuart Cook-1/+1
fix dead link netbsd.md src/doc/rustc/src/platform-support/netbsd.md https://github.com/NetBSD/pkgsrc-wip/blob/master/rust/Makefile - https://github.com/NetBSD/pkgsrc-wip/blob/master/Makefile