about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-10-07Rollup merge of #131351 - jieyouxu:yeet-the-valgrind, r=KobzolJubilee-96/+29
Remove valgrind test suite and support from compiletest, bootstrap and opt-dist The `run-pass-valgrind` test suite is not exercised in CI, and as far as I'm aware nobody runs it (asked in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Are.20the.20valgrind.20tests.20even.20used.20by.20anyone.3F). What's remaining of valgrind support in compiletest isn't even properly hooked up with bootstrap. The existing valgrind logic in compiletest is also straight up questionable, i.e. https://github.com/rust-lang/rust/blob/1b3b8e7b0265162853c650ead09905bc3cdaeae9/src/tools/compiletest/src/runtest/valgrind.rs#L7-L12 It just runs valgrind tests as `rpass` if no valgrind path is provided to compiletest from bootstrap -- but bootstrap doesn't even pass a valgrind path to compiletest in the first place, so this always ran as `rpass` tests. So what is this even testing? So if it's not testing anything, let's delete it. Closes #44816 by deleting the test suite :3 <img src="https://github.com/user-attachments/assets/99525bf7-e85b-40ba-9281-e4e1e275c4e8" width=300 />
2024-10-07bump rustc_tools_util versionRalf Jung-4/+4
2024-10-07Migrate `emit-to-stdout` to new run-makeclubby789-4/+3
Co-authored-by: Oneirical <manchot@videotron.ca> Co-authored-by: Chris Denton <chris@chrisdenton.dev>
2024-10-07Add stdio configuring to run-make Rustcclubby789-0/+24
2024-10-07Test for issue 23600clubby789-1/+0
2024-10-08add knownEngines lldb-dapkouhe3-0/+20
2024-10-07Auto merge of #131354 - matthiaskrgr:rollup-hprnng2, r=matthiaskrgrbors-89/+12
Rollup of 4 pull requests Successful merges: - #131331 (Revert "warn_old_master_branch" check) - #131344 (Avoid `&Lrc<T>` in various places) - #131346 (Restrict `ignore-mode-*` directives) - #131353 (Add documentation for `runtest::check_rustdoc_test_option` method) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-07Rollup merge of #131353 - GuillaumeGomez:check_rustdoc_test_option, r=jieyouxuMatthias Krüger-0/+4
Add documentation for `runtest::check_rustdoc_test_option` method r? `@jieyouxu`
2024-10-07Rollup merge of #131346 - jieyouxu:prune-invalid-directives, r=ZalatharMatthias Krüger-21/+3
Restrict `ignore-mode-*` directives This is only used by coverage test suites where the same sources get run under different coverage modes. Restrict `ignore-mode-<coverage_mode>` to only coverage modes.
2024-10-07Rollup merge of #131344 - nnethercote:ref-Lrc, r=compiler-errorsMatthias Krüger-4/+5
Avoid `&Lrc<T>` in various places Seeing `&Lrc<T>` is a bit suspicious, and `&T` or `Lrc<T>` is often better. r? `@oli-obk`
2024-10-07Rollup merge of #131331 - onur-ozkan:131296, r=KobzolMatthias Krüger-64/+0
Revert "warn_old_master_branch" check See https://github.com/rust-lang/rust/issues/131296#issuecomment-2395486918. Reverts https://github.com/rust-lang/rust/pull/130121 and https://github.com/rust-lang/rust/pull/129584. Fixes https://github.com/rust-lang/rust/issues/131296 and https://github.com/rust-lang/rust/issues/131324.
2024-10-07Add documentation for `runtest::check_rustdoc_test_option` methodGuillaume Gomez-0/+4
2024-10-07Auto merge of #131235 - ↵bors-51/+47
codemountains:rename-nestedmetaitem-to-metaitemlnner, r=nnethercote Rename `NestedMetaItem` to `MetaItemInner` Fixes #131087 r? `@nnethercote`
2024-10-07Remove valgrind test suite from opt-dist许杰友 Jieyou Xu (Joe)-1/+0
2024-10-07Remove valgrind test suite and support from compiletest许杰友 Jieyou Xu (Joe)-95/+29
2024-10-07Rename nested_meta to meta_item_innercodemountains-8/+7
2024-10-07Prune invalid `ignore-mode-*` directives许杰友 Jieyou Xu (Joe)-21/+3
These are only valid for coverage test modes.
2024-10-07Avoid another `&Lrc<..>` in a return value.Nicholas Nethercote-0/+1
2024-10-07Convert `Option<&Lrc<T>>` return types to `Option<&T>`.Nicholas Nethercote-4/+4
It's simpler and more concise.
2024-10-06Use external stack in borrowck DFSChayim Refael Friedman-58/+67
Because damnit, it can crash r-a. Why do people make this stupid DFSes anyway (I get it, it's easier until it blows).
2024-10-06various fixes for `naked_asm!` implementationFolkert de Vries-1/+1
- fix for divergence - fix error message - fix another cranelift test - fix some cranelift things - don't set the NORETURN option for naked asm - fix use of naked_asm! in doc comment - fix use of naked_asm! in run-make test - use `span_bug` in unreachable branch
2024-10-07fix: Do not consider mutable usage of deref to `*mut T` as deref_mutShoyu Vanilla-1/+37
2024-10-06disallow `asm!` in `#[naked]` functionsFolkert de Vries-2/+2
also disallow the `noreturn` option, and infer `naked_asm!` as `!`
2024-10-06implement `naked_asm` macroFolkert-2/+2
2024-10-06Revert "Rollup merge of #129584 - lolbinarycat:old-upstream-warning, ↵onur-ozkan-34/+0
r=albertlarsan68" This reverts commit 776187d2c9a42dc07452ae36a8b765d66bd8e2ca, reversing changes made to 7d015575ada1de8a4627fcdea416194a57a175c2.
2024-10-06Revert "Auto merge of #130121 - ↵onur-ozkan-46/+16
lolbinarycat:bootstrap-warn-old-upstream-worktree, r=albertlarsan68" This reverts commit 507c05bead4026ed8841512095b4218119eb479f, reversing changes made to 0609062a91c8f445c3e9a0de57e402f9b1b8b0a7.
2024-10-06Rename NestedMetaItem to MetaItemInnercodemountains-47/+44
2024-10-06Rollup merge of #129392 - ↵Matthias Krüger-2/+49
compiler-errors:raw-ref-op-doesnt-diverge-but-more, r=lcnr Do not consider match/let/ref of place that evaluates to `!` to diverge, disallow coercions from them too Fixes #117288. This PR implements a heuristic which disables two things that are currently being performed on the HIR when we have **expressions that involve place-like expressions that point to `!`**. Specifically, it will (in certain cases explained below): ### (1.) Disable the `NeverToAny` coercion we implicitly insert for `!`. Which fixes this inadvertent, sneaky unsoundness: ``` unsafe { let x: *const ! = &0 as *const u8 as *const !; let _: () = *x; } ``` which is UB because currently rust emits an *implicit* NeverToAny coercion even though we really shouldn't be, since there's no read of the value pointed by `x`. ### (2.) Disable the logic which considers expression which evaluate to `!` to diverge, which affects the type returned by the containing block. Which fixes this unsoundness: ``` fn make_up_a_value<T>() -> T { unsafe { let x: *const ! = &0 as *const u8 as *const !; let _ = *x; } } ``` We disable these two operations **if** the expression is a place-like expression (locals, statics, field projections, index operations, and deref operations), and if the parent expression is either: (1.) the LHS of an assignment (2.) AddrOf (3.) A match or let **unless** all of the *patterns consitute a read*, which is explained below: And finally, a pattern currently is considered to constitute a read **unless** it is a wildcard, or an OR pattern. An OR pattern is considered to constitute a read if all of its subpatterns constitute a read, to remain as conservative as possible in cases like `_ | subpat` or `subpat | _`. All other patterns are considered currently to constitute a read. Specifically, because `NeverToAny` is a coercion performed on a *value* and not a *place*, `Struct { .. }` on a `!` type must be a coercion currently, and we currently rely on this behavior to allow us to perform coercions like `let _: i32 = x;` where `x: !`. This is already considered UB by [miri](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=daf3a2246433fe43fdc07d1389c276c9), but also means it does not affect the preexisting UB in this case: ``` let Struct { .. } = *never_ptr; ``` Even though it's likely up for debate since we're not actually reading any data out of the struct, it almost certainly causes inference changes which I do *NOT* want to fix in this PR.
2024-10-06Auto merge of #3936 - YohDeadfall:rust-analyzer-conf, r=RalfJungbors-39/+87
Added rust-analyzer instructions for Helix That pull request adds information on how to configure Helix to use `rust-analyzer`, and moves the existing configuration to the `src/etc` directory as it's in the `rust` repository. Not adding instructions for other IDE because there's a link leading to the how-to for `rustc`.
2024-10-06tweak the hintRalf Jung-8/+3
2024-10-06Auto merge of #130540 - veera-sivarajan:fix-87525, r=estebankbors-6/+12
Add a Lint for Pointer to Integer Transmutes in Consts Fixes #87525 This PR adds a MirLint for pointer to integer transmutes in const functions and associated consts. The implementation closely follows this comment: https://github.com/rust-lang/rust/pull/85769#issuecomment-880969112. More details about the implementation can be found in the comments. Note: This could break some sound code as mentioned by RalfJung in https://github.com/rust-lang/rust/pull/85769#issuecomment-886491680: > ... technically const-code could transmute/cast an int to a ptr and then transmute it back and that would be correct -- so the lint will deny some sound code. Does not seem terribly likely though. References: 1. https://doc.rust-lang.org/std/mem/fn.transmute.html 2. https://doc.rust-lang.org/reference/items/associated-items.html#associated-constants
2024-10-05lsp: fix completion_item something_to_resolve not being a latch to trueJake-7/+7
2024-10-05Fix up testsMichael Goulet-2/+49
2024-10-05Fix `prettify_macro_expansion()` when the node isn't the whole fileChayim Refael Friedman-1/+34
2024-10-05Stabilize `std::io::ErrorKind::QuotaExceeded`Pavel Grigorenko-1/+1
Also drop "Filesystem" from its name
2024-10-05Include description in label details when detail field is marked for resolutionMax-2/+2
2024-10-05Added rust-analyzer instructions for HelixYoh Deadfall-38/+91
2024-10-05avoid pthread_attr_t in testsRalf Jung-18/+24
2024-10-05Fix IDE layer not correctly resolving opt-in extern cratesLukas Wirth-7/+18
2024-10-05Add excluded extern-prelude IDE resolution testLukas Wirth-3/+9
2024-10-05Turn ImportSource into a structLukas Wirth-46/+54
2024-10-05Remove ImportSource::ExternCrate as the fixed point loop can't affect itLukas Wirth-138/+102
2024-10-05Add a Lint for Pointer to Integer Transmutes in ConstsVeera-6/+12
2024-10-05Rollup merge of #131286 - RalfJung:miri-sync, r=RalfJungMatthias Krüger-402/+1293
Miri subtree update r? `@ghost`
2024-10-05Rollup merge of #131256 - RalfJung:f16-f128-const, r=ibraheemdevMatthias Krüger-4/+4
move f16/f128 const fn under f16/f128 feature gate The `*_const` features were added to work around https://github.com/rust-lang/rust/issues/129656, which should not be needed any more.
2024-10-05Auto merge of #3940 - rust-lang:refutable_slice, r=RalfJungbors-33/+34
Prefer refutable slice patterns over len check + index op Just something I noticed while reviewing other PRs We do it for shim arguments almost everywhere, but when the size is not statically known, we didn't use the helpers as they rely on array ops. But we can avoid a len check followed by several index ops by just using a refutable slice pattern with `let else`. The pattern is so common, it seems almost worth a dedicated macro
2024-10-05Auto merge of #3943 - RalfJung:pthread-mutex-reentrant, r=RalfJungbors-15/+51
pthread mutex: better error in reentrant-locking-UB Also test reentrant locking of PTHREAD_MUTEX_INITIALIZER
2024-10-05pthread mutex: better error in reentrant-locking-UB, also test ↵Ralf Jung-15/+51
PTHREAD_MUTEX_INITIALIZER
2024-10-05move f16/f128 const fn under f16/f128 feature gateRalf Jung-4/+4
2024-10-05Auto merge of #129244 - cjgillot:opaque-hir, r=compiler-errorsbors-39/+14
Make opaque types regular HIR nodes Having opaque types as HIR owner introduces all sorts of complications. This PR proposes to make them regular HIR nodes instead. I haven't gone through all the test changes yet, so there may be a few surprises. Many thanks to `@camelid` for the first draft. Fixes https://github.com/rust-lang/rust/issues/129023 Fixes #129099 Fixes #125843 Fixes #119716 Fixes #121422