about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
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-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-1571/+734
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-25Prepare for merging from rust-lang/rustThe Miri Cronjob Bot-1/+1
This updates the rust-version file to b56aaec52bc0fa35591a872fb4aac81f606e265c.
2025-07-25Merge pull request #19938 from A4-Tacks/gen-impl-traitShoyu Vanilla (Flint)-3/+346
Add ide-assist: generate_impl_trait for generate_impl
2025-07-25Merge pull request #2518 from rust-lang/rustc-pullTshepang Mbambo-2453/+2553
Rustc pull update
2025-07-25Fix gen panics doc template for debug_assertA4-Tacks-6/+62
And add assert_eq, assert_ne, assert_matches support Input: ```rust pub fn $0foo(x: bool) { debug_assert!(x); } ``` Old: ```rust /// . /// /// # Panics /// /// Panics if . pub fn foo(x: bool) { debug_assert!(x); } ``` This PR fixes: ```rust /// . pub fn foo(x: bool) { debug_assert!(x); } ```
2025-07-24Rename tests/ui/SUMMARY.md and update rustc dev guide on error-patternOneirical-4/+4
2025-07-24rustdoc::broken_intra_doc_links: only be lenient with shortcut linksbinarycat-5/+22
collapsed links and reference links have a pretty particular syntax, it seems unlikely they would show up on accident. Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2025-07-24rustdoc::broken_intra_doc_links: no backticks = use old behaviorbinarycat-1/+3
this is in an effort to reduce the amount of code churn caused by this lint triggering on text that was never meant to be a link. a more principled hierustic for ignoring lints is not possible without extensive changes, due to the lint emitting code being so far away from the link collecting code, and the fact that only the link collecting code has access to details about how the link appears in the unnormalized markdown.
2025-07-24get rid of some false negatives in rustdoc::broken_intra_doc_linksbinarycat-3/+10
rustdoc will not try to do intra-doc linking if the "path" of a link looks too much like a "real url". however, only inline links ([text](url)) can actually contain a url, other types of links (reference links, shortcut links) contain a *reference* which is later resolved to an actual url. the "path" in this case cannot be a url, and therefore it should not be skipped due to looking like a url. Co-authored-by: Michael Howell <michael@notriddle.com>
2025-07-24asm: Stabilize loongarch32WANG Rui-5/+0
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 #144218 - Noratrieb:target-spec-json-de-jank, r=fee1-deadLeón Orell Valerian Liehr-1/+2
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
2025-07-24Rollup merge of #144014 - dianne:edition-guide-links, r=estebankLeón Orell Valerian Liehr-1/+1
don't link to the nightly version of the Edition Guide in stable lints As reported in rust-lang/rust#143557 for `rust_2024_incompatible_pat`, most future-Edition-incompatibility lints link to the nightly version of the Edition Guide; the lints were written before their respective Editions (and their guides) stabilized. But now that Rusts 2021 and 2024 are stable, these lints are emitted on stable versions of the compiler, where it makes more sense to present users with links that don't say "nightly" in them. This does not change the link for `rust_2024_incompatible_pat`. That's handled in rust-lang/rust#144006.
2025-07-24std_detect testing improvementsbjorn3-2/+1
* Fix riscv testing. Previously the mod tests; would be looking for src/detect/os/tests.rs. * Replace a test with an unnamed const item. It is testing that no warnings are emitted. It doesn't contain any checks that need to run at runtime. Replacing the test allows removing the tidy:skip directive for test locations.
2025-07-24make the missing-MIR message more clearRalf Jung-2/+2
2025-07-24Remove dead code and extend test coverage and diagnostics around itOli Scherer-13/+3
We lost the following comment during refactorings: The current code for niche-filling relies on variant indices instead of actual discriminants, so enums with explicit discriminants (RFC 2363) would misbehave.
2025-07-24Improve unit_tests tidy lintbjorn3-33/+57
Make it clearer where unit tests are allowed and restrict standard library unit tests inside the same package to std_detect, std and test.
2025-07-24Display total time and compilation time of merged doctestsGuillaume Gomez-18/+77
2025-07-24Fix generate_trait_from_impl whitespace after visA4-Tacks-3/+9
Input: ```rust struct Foo; impl F$0oo { pub fn a_func() -> Option<()> { Some(()) } } ``` Old: ```rust struct Foo; trait NewTrait { fn a_func() -> Option<()>; } impl NewTrait for Foo { fn a_func() -> Option<()> { Some(()) } } ``` This PR fixed: ```rust struct Foo; trait NewTrait { fn a_func() -> Option<()>; } impl NewTrait for Foo { fn a_func() -> Option<()> { Some(()) } } ```
2025-07-24Merge ref 'efd420c770bb' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-2452/+2552
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: efd420c770bb179537c01063e98cb6990c439654 Filtered ref: d11dbbb02905535a89393e80c24274bee81fa928 This merge was created using https://github.com/rust-lang/josh-sync.
2025-07-24Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to efd420c770bb179537c01063e98cb6990c439654.
2025-07-24Auto merge of #116707 - cjgillot:slice-id, r=oli-obk,RalfJungbors-60/+9
Create an `AllocId` for `ConstValue::Slice`. This PR modifies `ConstValue::Slice` to use an `AllocId` instead of directly manipulating the allocation. This was originally proposed by https://github.com/rust-lang/rust/pull/115764 but was a perf regression. Almost 2 years later, enough code has changed to make this a perf improvement: https://github.com/rust-lang/rust/pull/116707#issuecomment-3067158777
2025-07-23Remove const deduplication from the interpreter.Camille GILLOT-58/+7
2025-07-23Remove useless lifetime parameter.Camille GILLOT-2/+2
2025-07-23Auto merge of #144244 - jieyouxu:pr-full-ci, r=Kobzolbors-11/+352
Enforce that PR CI jobs are a subset of Auto CI jobs modulo carve-outs ### Background Currently, it is possible for a PR with red PR-only CI to pass Auto CI, then all subsequent PR CI runs will be red until that is fixed, even in completely unrelated PRs. For instance, this happened with PR-CI-only Spellcheck (rust-lang/rust#144183). See more discussions at [#t-infra > Spellcheck workflow now fails on all PRs (tree bad?)](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Spellcheck.20workflow.20now.20fails.20on.20all.20PRs.20.28tree.20bad.3F.29/with/529769404). ### CI invariant: PR CI jobs are a subset of Auto CI jobs modulo carve-outs To prevent red PR CI in completely unrelated subsequent PRs and PR CI runs, we need to maintain an invariant that **PR CI jobs are a subset of Auto CI jobs modulo carve-outs**. This is **not** a "strict" subset relationship: some jobs necessarily have to differ under PR CI and Auto CI environments, at least in the current setup. Still, we can try to enforce a weaker "subset modulo carve-outs" relationship between CI jobs and their corresponding Auto jobs. For instance: - `x86_64-gnu-tools` will have `auto`-only env vars like `DEPLOY_TOOLSTATES_JSON: toolstates-linux.json`. - `tidy` will want to `continue_on_error: true` in PR CI to allow for more "useful" compilation errors to also be reported, whereas it should be `continue_on_error: false` in Auto CI to prevent wasting Auto CI resources. The **carve-outs** are: 1. `env` variables. 2. `continue_on_error`. We enforce this invariant through `citool`, so only affects job definitions that are handled by `citool`. Notably, this is not sufficient *alone* to address the CI-only Spellcheck issue (rust-lang/rust#144183). To carry out this enforcement, we modify `citool` to auto-register PR jobs as Auto jobs with `continue_on_error` overridden to `false` **unless** there's an overriding Auto job for the PR job of the same name that only differs by the permitted **carve-outs**. ### Addressing the Spellcheck PR-only CI issue Note that Spellcheck currently does not go through `citool` or `bootstrap`, and is its own GitHub Actions workflow. To actually address the PR-CI-only Spellcheck issue (rust-lang/rust#144183), and carry out the subset-modulo-carve-outs enforcement universally, this PR additionally **removes the current Spellcheck implementation** (a separate GitHub Actions Workflow). That is incompatible with Homu unless we do some hacks in the main CI workflow. This effectively partially reverts rust-lang/rust#134006 (the separate workflow part, not the tidy extra checks component), but is not prejudice against relanding the `typos`-based spellcheck in another implementation that goes through the usual bootstrap CI workflow so that it does work with Homu. The `typos`-based spellcheck seems to have a good false-positive rate. Closes rust-lang/rust#144183. --- r? infra-ci
2025-07-23Merge pull request #4490 from Kobzol/use-josh-syncRalf Jung-354/+41
Use `josh-sync` instead of `miri-script` for Josh synchronization
2025-07-23Remove Zulip API keys and use `set -x`Jakub Beránek-5/+5
2025-07-23Update CI workflowJakub Beránek-10/+23
2025-07-23Clippy fixupJens Reidel-1/+1
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-07-23Auto merge of #144360 - matthiaskrgr:rollup-b6ej0mm, r=matthiaskrgrbors-1275/+7
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144173 (Remove tidy checks for `tests/ui/issues/`) - rust-lang/rust#144234 (Fix broken TLS destructors on 32-bit win7) - rust-lang/rust#144239 (Clean `rustc/parse/src/lexer` to improve maintainability) - rust-lang/rust#144256 (Don't ICE on non-TypeId metadata within TypeId) - rust-lang/rust#144290 (update tests/ui/SUMMARY.md) - rust-lang/rust#144292 (mbe: Use concrete type for `get_unused_rule`) - rust-lang/rust#144298 (coverage: Enlarge empty spans during MIR instrumentation, not codegen) - rust-lang/rust#144311 (Add powerpc64le-unknown-linux-musl to CI rustc targets) - rust-lang/rust#144315 (bootstrap: add package.json and package-lock.json to dist tarball) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-23Move `dist-apple-various` from x86_64 to aarch64Jake Goulding-1/+1
`macos-13` is going away soonish.
2025-07-23Update `CONTRIBUTING.md`Jakub Beránek-6/+8
2025-07-23Merge pull request #20291 from ChayimFriedman2/fix-cargo-lockChayim Refael Friedman-0/+1
minor: Fix Cargo.lock
2025-07-23Use `TempDir` for copied lockfilesShoyu Vanilla-6/+55
2025-07-23Fix Cargo.lockChayim Refael Friedman-0/+1
The dependency of `xtask` on `time` was mistakenly removed.
2025-07-23Merge pull request #20285 from A4-Tacks/fix-rename-selfChayim Refael Friedman-31/+44
Change rename self to parameter use `Self` type
2025-07-23Remove rename_self_outside_of_methodsA4-Tacks-8/+2
2025-07-23Rollup merge of #144315 - lolbinarycat:bootstrap-dist-package.json, r=KobzolMatthias Krüger-0/+2
bootstrap: add package.json and package-lock.json to dist tarball this ensures that js-related tests can still be run from within such a dist tarball. followup to rust-lang/rust#142924 r? ```````@Kobzol```````
2025-07-23Rollup merge of #144311 - Gelbpunkt:ci-rustc-ppc64le-musl, r=KobzolMatthias Krüger-0/+1
Add powerpc64le-unknown-linux-musl to CI rustc targets I missed this in the promotion to tier 2 with host tools.
2025-07-23Rollup merge of #144173 - Kivooeo:tidy_checks, r=jieyouxuMatthias Krüger-1275/+4
Remove tidy checks for `tests/ui/issues/` r? ``````````@jieyouxu`````````` As it is making cleanup efforts more difficult. This change was discussed here [#t-compiler > Discussion for ui test suite improvements @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Discussion.20for.20ui.20test.20suite.20improvements/near/529566433)
2025-07-23Merge pull request #20289 from ChayimFriedman2/expr-store-diags-macrosLukas Wirth-44/+9
internal: Remove `ExpressionStoreDiagnostics::MacroError`, instead recreate it from the `MacroCallId`
2025-07-23Auto merge of #143843 - JonathanBrouwer:macro-use-parser, r=oli-obkbors-4/+4
Ports `#[macro_use]` and `#[macro_escape]` to the new attribute parsing infrastructure Ports `#[macro_use]` and `#[macro_escape]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163 r? `@jdonszelmann` `@oli-obk`
2025-07-23Remove `ExpressionStoreDiagnostics::MacroError`, instead recreate it from ↵Chayim Refael Friedman-44/+9
the `MacroCallId` This simplifies the code and also makes us report parse error in macros too.
2025-07-23Fix `compiletest` bad handling of `ignore-backends`Guillaume Gomez-0/+5