summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-04-25use `Lrc` instead of the aliased type `Arc` directlyy21-3/+3
2024-04-25Auto merge of #12617 - y21:issue-12616, r=Alexendoobors-1/+34
avoid an ICE in `ptr_as_ptr` when getting the def_id of a local Fixes #12616 `Res::def_id` can panic, so avoid calling it in favor of `opt_def_id`, so we can gracefully handle resolutions that don't have a `DefId` (e.g. local variables) and get a false negative in the worst case, rather than an ICE changelog: Fix ICE in [`ptr_as_ptr`] when the cast expression is a function call to a local variable
2024-04-25Auto merge of #12508 - y21:issue12506, r=llogiqbors-89/+118
Fix infinite loop in `cast_sign_loss` when peeling unwrap method calls Fixes #12506 The lint wants to peel method calls but didn't actually reassign the expression, leading to an infinite loop. ---- changelog: Fix infinite loop in [`cast_sign_loss`] when having two chained `.unwrap()` calls
2024-04-25Auto merge of #12572 - y21:mixed_attributes_style_style, r=llogiqbors-1/+1
Move `mixed_attributes_style` to style > It currently is in suspicious. I wouldn't say that the linted code is "most likely wrong or useless" [...] > :sweat_smile: I would still argue that this doesn't belong in the suspicious group, but rather in the style group. These are some good points made [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/mixed_attributes_style.20on.20outlined.20modules/near/429823328). ---- changelog: Move [`mixed_attributes_style`] to the `style` category
2024-04-25Auto merge of #12486 - J-ZhengLi:issue12435, r=y21bors-23/+214
don't lint [`mixed_attributes_style`] when mixing docs and other attrs fixes: #12435 fixes: #12436 fixes: #12530 --- changelog: don't lint [`mixed_attributes_style`] when mixing different kind of attrs; and move it to late pass;
2024-04-09allow the test bat files in tidyPietro Albini-0/+3
2024-03-26[beta-1.78] Update cargoWeihang Lo-0/+0
2024-03-16Rollup merge of #122390 - ChrisDenton:bindgen, r=Mark-SimulacrumChris Denton-1/+1
Bump windows-bindgen to 0.55.0 windows-bindgen is the crate used to generate std's Windows API bindings. Not many changes for us, it's mostly just simplifying the generate code (e.g. no more `-> ()`). The one substantial change is some structs now use `i8` byte arrays instead of `u8`. However, this only impacts one test.
2024-03-16Auto merge of #119418 - aaupov:master, r=Kobzolbors-1/+3
[BOLT] Use CDSort and CDSplit CDSort and CDSplit are the most recent versions of function ordering and function splitting algorithms with some improvements over the previous baseline (ext-tsp and two-way splitting).
2024-03-15Update cargoWeihang Lo-0/+0
2024-03-15Rollup merge of #122513 - petrochenkov:somehir4, r=fmeaseGuillaume Gomez-31/+21
hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id` Also replace a few `hir_node()` calls with `hir_node_by_def_id()`. Follow up to https://github.com/rust-lang/rust/pull/120943.
2024-03-15fmtRalf Jung-2/+1
2024-03-15Merge from rustcRalf Jung-6/+4
2024-03-15Preparing for merge from rustcRalf Jung-1/+1
2024-03-15Auto merge of #122511 - matthiaskrgr:rollup-swzilin, r=matthiaskrgrbors-51/+51
Rollup of 10 pull requests Successful merges: - #117118 ([AIX] Remove AixLinker's debuginfo() implementation) - #121650 (change std::process to drop supplementary groups based on CAP_SETGID) - #121764 (Make incremental sessions identity no longer depend on the crate names provided by source code) - #122212 (Copy byval argument to alloca if alignment is insufficient) - #122322 (coverage: Initial support for branch coverage instrumentation) - #122373 (Fix the conflict problem between the diagnostics fixes of lint `unnecessary_qualification` and `unused_imports`) - #122479 (Implement `Duration::as_millis_{f64,f32}`) - #122487 (Rename `StmtKind::Local` variant into `StmtKind::Let`) - #122498 (Update version of cc crate) - #122503 (Make `SubdiagMessageOp` well-formed) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-14Apply the same shell quoting trick we use in the URL toBen Kimock-1/+1
2024-03-14hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id`Vadim Petrochenkov-31/+21
Also replace a few `hir_node()` calls with `hir_node_by_def_id()`
2024-03-14Rollup merge of #122487 - GuillaumeGomez:rename-stmtkind-local, r=oli-obkMatthias Krüger-51/+51
Rename `StmtKind::Local` variant into `StmtKind::Let` It comes from this [discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Improve.20naming.20of.20.60ExprKind.3A.3ALet.60.3F). Starting point was: > I often end up looking at [ExprKind::Let](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/enum.ExprKind.html#variant.Let) instead of Local because of the name. I think renaming it (both the `ExprKind` variant and the Let struct) to `LetPattern` or LetPat could improve the situation as I'm not sure I'm not the only one encountering this issue. And then it evolved into: > It's already `Expr::Let` instead of `StmtKind::Local`. Counterproposal: rename `StmtKind::Local` to `StmtKind::Let`. The goal here is to clear this confusion. r? `@oli-obk`
2024-03-14Auto merge of #119849 - lcnr:eagerly-instantiate-binders, r=compiler-errorsbors-1/+0
more eagerly instantiate binders The old solver sometimes incorrectly used `sub`, change it to explicitly instantiate binders and use `eq` instead. While doing so I also moved the instantiation before the normalize calls. This caused some observable changes, will explain these inline. This PR therefore requires a crater run and an FCP. r? types
2024-03-14one must imagine tidy happylcnr-1/+0
2024-03-14Auto merge of #3379 - RalfJung:time-with-isolation, r=saethlinbors-10/+14
explain time-with-isolation test better Fixes https://github.com/rust-lang/miri/issues/3377 `@saethlin` do you think this is better?
2024-03-14Rollup merge of #122397 - oli-obk:machine-read-hook2, r=RalfJungMatthias Krüger-1/+1
Various cleanups around the const eval query providers r? `@RalfJung` after this, working on running validation before interning starts with swapping the order of two lines of code
2024-03-14explain time-with-isolation test betterRalf Jung-10/+14
2024-03-14Move generate_stacktrace_from_stack away from InterpCx to avoid having to ↵Oli Scherer-1/+1
know the `Machine` type
2024-03-14Rename `hir::StmtKind::Local` into `hir::StmtKind::Let`Guillaume Gomez-46/+46
2024-03-14Rename `ast::StmtKind::Local` into `ast::StmtKind::Let`Guillaume Gomez-5/+5
2024-03-14Rollup merge of #122461 - the8472:fix-step-forward-unchecked, r=AmanieuMatthias Krüger-1/+1
fix unsoundness in Step::forward_unchecked for signed integers Fixes #122420 ```rust pub fn foo(a: i8, b: u8) -> i8 { unsafe { a.checked_add_unsigned(b).unwrap_unchecked() } } ``` still compiles down to a single arithmetic instruction ([godbolt](https://rust.godbolt.org/z/qsd3xYWfE)). But we may be losing some loop optimizations if llvm can no longer easily derive that it's a finite counted loop from the no-wrapping flags.
2024-03-14Auto merge of #3380 - RalfJung:cron, r=RalfJungbors-2/+2
make cron job topic names more consistent
2024-03-14Auto merge of #122243 - RalfJung:local-place-sanity-check, r=oli-obkbors-3/+2
interpret: ensure that Place is never used for a different frame We store the address where the stack frame stores its `locals`. The idea is that even if we pop and push, or switch to a different thread with a larger number of frames, then the `locals` address will most likely change so we'll notice that problem. This is made possible by some recent changes by `@WaffleLapkin,` where we no longer use `Place` across things that change the number of stack frames. I made these debug assertions for now, just to make sure this can't cost us any perf. The first commit is unrelated but it's a one-line comment change so it didn't warrant a separate PR... r? `@oli-obk`
2024-03-14make cron job topic names more consistentRalf Jung-2/+2
2024-03-14fmtThe Miri Cronjob Bot-1/+6
2024-03-14Merge from rustcThe Miri Cronjob Bot-121/+270
2024-03-14Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-03-13Improve sysroots notificationBen Kimock-6/+22
2024-03-14update virtual clock in miri test since signed loops now execute more methodsThe 8472-1/+1
2024-03-13Rollup merge of #122422 - Enselic:only-unix, r=oli-obkMatthias Krüger-0/+3
compiletest: Allow `only-unix` in test headers The header `ignore-unix` is already allowed. Also extend tests. This is needed by https://github.com/rust-lang/rust/pull/121573 which I am splitting up into smaller and more digestible PRs.
2024-03-13Auto merge of #122240 - RalfJung:miri-addr-reuse, r=oli-obkbors-63/+210
miri: add some chance to reuse addresses of previously freed allocations The hope is that this can help us find ABA issues. Unfortunately this needs rustc changes so I can't easily run the regular benchmark suite. I used `src/tools/miri/tests/pass/float_nan.rs` as a substitute: ``` Before: Benchmark 1: ./x.py run miri --stage 0 --args src/tools/miri/tests/pass/float_nan.rs --args --edition=2021 Time (mean ± σ): 9.570 s ± 0.013 s [User: 9.279 s, System: 0.290 s] Range (min … max): 9.561 s … 9.579 s 2 runs After: Benchmark 1: ./x.py run miri --stage 0 --args src/tools/miri/tests/pass/float_nan.rs --args --edition=2021 Time (mean ± σ): 9.698 s ± 0.046 s [User: 9.413 s, System: 0.279 s] Range (min … max): 9.666 s … 9.731 s 2 runs ``` That's a ~1.3% slowdown, which seems fine to me. I have seen a lot of noise in this style of benchmarking so I don't quite trust this anyway; we can make further experiments in the Miri repo after this migrated there. r? `@oli-obk`
2024-03-13compiletest: Allow `only-unix` in test headersMartin Nordholts-0/+3
The header `ignore-unix` is already allowed. Also extend tests.
2024-03-12Auto merge of #3370 - RalfJung:windows-sync, r=RalfJungbors-602/+0
windows: remove support for slim rwlock Since https://github.com/rust-lang/rust/pull/121956 we don't need it any more, and we are generally short on Windows staff so reducing the amount of code we have to test and maintain sounds like a good idea. The InitOnce stuff is still used by `thread_local_key::StaticKey` on 64bit windows-gnu.
2024-03-12Auto merge of #122394 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 9 commits in a4c63fe5388beaa09e5f91196c86addab0a03580..7065f0ef4aa267a7455e1c478b5ccacb7baea59c 2024-03-06 22:15:17 +0000 to 2024-03-12 13:25:15 +0000 - chore: remove repetitive word (rust-lang/cargo#13575) - refactor(lockfile): Make diffing/printing more reusable (rust-lang/cargo#13564) - test: Add tests for using worktrees and sparse checkouts (rust-lang/cargo#13567) - util/network/http: Use `cargo/1.2.3` user-agent header (rust-lang/cargo#13548) - fix: Consistently compare MSRVs (rust-lang/cargo#13537) - refactor(shell): Use alternate to close links (rust-lang/cargo#13562) - fix(doc): Collapse down Generated statuses without --verbose (rust-lang/cargo#13557) - doc: Add doc for -Zpublic-dependency (rust-lang/cargo#13556) - docs: add link to the exported_private_dependencies lint (rust-lang/cargo#13547) r? ghost
2024-03-12Update cargoWeihang Lo-0/+0
2024-03-12Bump windows-bindgen to 0.55.0Chris Denton-1/+1
2024-03-12Bump windows-bindgen to 0.54.0Chris Denton-1/+1
2024-03-12Rollup merge of #122355 - fmease:rustdoc-fix-up-old-test, r=notriddleJubilee-1/+0
rustdoc: fix up old test `tests/rustdoc/line-breaks.rs` had several issues: 1. It used `//`@count`` instead of `// `@count`` (notice the space!) which gets treated as a `ui_test` directive instead of a `htmldocck` one. `compiletest` didn't flag it as an error because it's allowlisted ([#121561](https://github.com/rust-lang/rust/pull/121561)) presumably precisely because of this test. And before the compiletest→ui_test migration, these directives must've been ignored, too, because … 2. … the checks themselves no longer work either: The count of `<br>`s is actually 0 in all 3 cases because – well – we no longer generate any `<br>`s inside `<pre>`s. Since I don't know how to ``@count`` `\n`s instead of `<br>`s, I've turned them into ``@matches`.` Btw, I don't know if this test is still desirable or if we have other tests that cover this (I haven't checked). r? rustdoc
2024-03-12Auto merge of #121644 - oli-obk:unique_static_innards2, r=RalfJung,nnethercotebors-5/+5
Ensure nested allocations in statics neither get deduplicated nor duplicated This PR generates new `DefId`s for nested allocations in static items and feeds all the right queries to make the compiler believe these are regular `static` items. I chose this design, because all other designs are fragile and make the compiler horribly complex for such a niche use case. At present this wrecks incremental compilation performance *in case nested allocations exist* (because any query creating a `DefId` will be recomputed and never loaded from the cache). This will be resolved later in https://github.com/rust-lang/rust/pull/115613 . All other statics are unaffected by this change and will not have performance regressions (heh, famous last words) This PR contains various smaller refactorings that can be pulled out into separate PRs. It is best reviewed commit-by-commit. The last commit is where the actual magic happens. r? `@RalfJung` on the const interner and engine changes fixes https://github.com/rust-lang/rust/issues/79738
2024-03-12Auto merge of #122170 - alexcrichton:rename-wasi-threads, r=petrochenkovbors-1/+1
Rename `wasm32-wasi-preview1-threads` to `wasm32-wasip1-threads` This commit renames the current `wasm32-wasi-preview1-threads` target to `wasm32-wasip1-threads`. The need for this rename is a bit unfortunate as the previous name was chosen in an attempt to be future-compatible with other WASI targets. Originally this target was proposed to be `wasm32-wasi-threads`, and that's what was originally implemented in wasi-sdk as well. After discussion though and with the plans for the upcoming component-model target (now named `wasm32-wasip2`) the "preview1" naming was chosen for the threads-based target. The WASI subgroup later decided that it was time to drop the "preview" terminology and recommends "pX" instead, hence previous PRs to add `wasm32-wasip2` and rename `wasm32-wasi` to `wasm32-wasip1`. So, with all that history, the "proper name" for this target is different than its current name, so one way or another a rename is required. This PR proposes renaming this target cold-turkey, unlike `wasm32-wasi` which is having a long transition period to change its name. The threads-based target is predicted to see only a fraction of the traffic of `wasm32-wasi` due to the unstable nature of the WASI threads proposal itself. While I was here I updated the in-tree documentation in the target spec file itself as most of the documentation was copied from the original WASI target and wasn't as applicable to this target. Also, as an aside, I can at least try to apologize for all the naming confusion here, but this is hopefully the last WASI-related rename.
2024-03-12s/mt/mutability/Oli Scherer-2/+2
2024-03-12Add `nested` bool to `DefKind::Static`.Oli Scherer-2/+2
Will be used in the next commit
2024-03-12Change `DefKind::Static` to a struct variantOli Scherer-5/+5
2024-03-12Merge from rustcThe Miri Cronjob Bot-2546/+5428