about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-09-14stabilize `const_extern_fn`Folkert de Vries-122/+111
2024-09-14simd_shuffle: require index argument to be a vectorRalf Jung-12/+1
2024-09-14Fix lint levels not getting overridden by attrs on `Stmt` nodesGurinder Singh-1/+9
2024-09-14Merge from rustcThe Miri Cronjob Bot-334/+312
2024-09-14Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-09-14Auto merge of #125419 - GuillaumeGomez:add-gcc-to-dist, r=Kobzolbors-1/+5
[bootstrap] Add support for building gcc and libgccjit As `@eholk` summarized below: > From my understanding, this change would add libgccjit as an optional component to the Rust distribution. This library is licensed under GPLv2 and currently we do not have any other components under that license so it would be a new license, and one that is generally more restrictive than the other licenses we use. It'll greatly improve the experience for anyone wanting to work on the GCC backend from the compiler. Should help with https://github.com/rust-lang/rust/issues/124172. Will unblock #124353. r? `@Kobzol`
2024-09-13Auto merge of #130121 - lolbinarycat:bootstrap-warn-old-upstream-worktree, ↵bors-16/+46
r=albertlarsan68 bootstrap: handle worktrees in warn_old_master_branch fixes #130111
2024-09-13Auto merge of #130312 - matthiaskrgr:rollup-ihwsc91, r=matthiaskrgrbors-6/+21
Rollup of 6 pull requests Successful merges: - #129320 (Fix crash when labeling arguments for call_once and friends) - #130266 (target: default to the medium code model on LoongArch targets) - #130297 (Dataflow cleanups) - #130299 (Add set_dcx to ParseSess) - #130301 (some fixes for clashing_extern_declarations lint) - #130305 (Clippy: consider msrv for const context for const_float_bits_conv) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-13Rollup merge of #130305 - tspiteri:clippy-msrv-for-const_float_bits_conv, ↵Matthias Krüger-6/+21
r=flip1995 Clippy: consider msrv for const context for const_float_bits_conv When `const_float_bits_conv` was stabilized for 1.83.0, clippy lints started to be triggered in const context ignoring MSRV. This PR makes the lints trigger in const context only when the MSRV meets 1.83.0. Fixes https://github.com/rust-lang/rust-clippy/issues/13383.
2024-09-13Auto merge of #3881 - RalfJung:miri-run, r=RalfJungbors-55/+144
./miri run: directly run binary instead of using 'cargo run' This avoids re-building miri without dev dependencies, so it makes `./miri run` a lot faster if `./miri test` was already executed before.
2024-09-13./miri run: directly run binary instead of using 'cargo run'Ralf Jung-55/+144
2024-09-13Auto merge of #130215 - RalfJung:interpret-simd, r=compiler-errorsbors-147/+150
interpret: simplify SIMD type handling This is possible as a follow-up to https://github.com/rust-lang/rust/pull/129403
2024-09-13interpret: simplify SIMD type handlingRalf Jung-147/+150
2024-09-13handle transmutes in const context if msrvs::CONST_FLOAT_BITS_CONVTrevor Spiteri-9/+16
2024-09-13Revert "stabilize const_float_bits_conv" for src/tools/clippy/clippy_lintsTrevor Spiteri-5/+13
This reverts the part of commit 19908ff7a37a9a431399bb6f2868efc22820f2b6 in subdirectory src/tools/clippy/clippy_lints.
2024-09-13Update tests for hidden references to mutable staticObei Sideg-93/+157
2024-09-13smoke-test './miri run --dep'Ralf Jung-1/+3
2024-09-13Auto merge of #18073 - alibektas:immutable_tree_panics, r=lnicolabors-2/+41
fix: Immutable tree panic in `generate_delegate_trait` fixes #17835
2024-09-13Rollup merge of #130261 - onur-ozkan:#130242, r=KobzolStuart Cook-7/+2
skip target sanity check when it's a `local-rebuild` Running the stage0 target sanity check on the newly built compiler can result in errors and incorrect assumptions. Resolves #130242
2024-09-13Rollup merge of #130245 - RalfJung:miri-alloc-backtrace, r=AmanieuStuart Cook-156/+65
make basic allocation functions track_caller in Miri for nicer backtraces This matches what we did with basic pointer and atomic operations.
2024-09-12fix: Immutable tree panic in `generate_delegate_trait`Ali Bektas-2/+41
2024-09-12enable all pthread tests on SolarishRalf Jung-2/+2
2024-09-12add non-portable linux pthread initializers to layout sanity checkRalf Jung-10/+23
2024-09-12Auto merge of #18099 - ChayimFriedman2:diag-only-necessary, r=Veykrilbors-279/+403
Use more correct handling of lint attributes The previous analysis was top-down, and worked on a single file (expanding macros). The new analysis is bottom-up, starting from the diagnostics and climbing up the syntax and module tree. While this is more efficient (and in fact, efficiency was the motivating reason to work on this), unfortunately the code was already fast enough. But luckily, it also fixes a correctness problem: outline parent modules' attributes were not respected for the previous analysis. Case lints specifically did their own analysis to accommodate that, but it was limited to only them. The new analysis works on all kinds of lints, present and future. It was basically impossible to fix the old analysis without rewriting it because navigating the module hierarchy must come bottom-up, and if we already have a bottom-up analysis (including syntax analysis because modules can be nested in other syntax elements, including macros), it makes sense to use only this kind of analysis. Few other bugs (not fundamental to the previous analysis) are also fixed, e.g. overwriting of lint levels (i.e. `#[allow(lint)] mod foo { #[warn(lint)] mod bar; }`. After this PR is merged I intend to work on an editor command that does workspace-wide diagnostics analysis (that is, `rust-analyzer diagnostics` but from your editor and without having to spawn a new process, which will have to analyze the workspace from scratch). This can be useful to users who do not want to enable check on save because of its overhead, but want to see workspace wide diagnostics from r-a (or to maintainers of rust-analyzer). Closes #18086. Closes #18081. Fixes #18056.
2024-09-12Use more correct handling of lint attributesChayim Refael Friedman-279/+403
The previous analysis was top-down, and worked on a single file (expanding macros). The new analysis is bottom-up, starting from the diagnostics and climbing up the syntax and module tree. While this is more efficient (and in fact, efficiency was the motivating reason to work on this), unfortunately the code was already fast enough. But luckily, it also fixes a correctness problem: outline parent modules' attributes were not respected for the previous analysis. Case lints specifically did their own analysis to accommodate that, but it was limited to only them. The new analysis works on all kinds of lints, present and future. It was basically impossible to fix the old analysis without rewriting it because navigating the module hierarchy must come bottom-up, and if we already have a bottom-up analysis (including syntax analysis because modules can be nested in other syntax elements, including macros), it makes sense to use only this kind of analysis. Few other bugs (not fundamental ti the previous analysis) are also fixed, e.g. overwriting of lint levels (i.e. `#[allow(lint)] mod foo { #[warn(lint)] mod bar; }`.
2024-09-12Remove an unused piece of logicOli Scherer-4/+1
2024-09-12Rollup merge of #130256 - Zalathar:dump-stamp, r=jieyouxuStuart Cook-0/+6
Re-run coverage tests if `coverage-dump` was modified If the `coverage-dump` tool was modified, coverage tests should not be treated as up-to-date, because the tool's output might have changed. Bootstrap already handles rebuilding the tool itself if its sources were changed, so all compiletest needs to do here is include the binary in the list of files whose timestamps are checked. This should have no effect on non-coverage tests, because bootstrap won't pass the `--coverage-dump-path` flag, so the path in compiletest's config will be None.
2024-09-12Rollup merge of #130252 - compiler-errors:const-gen, r=chenyukangStuart Cook-1/+11
Properly report error on `const gen fn` Fixes #130232 Also removes some (what I thought were unused) functions, and fixes a bug in clippy where we considered `gen fn` to be the same as `fn` because it was only built to consider asyncness.
2024-09-12Rollup merge of #130156 - nebulark:test_buildinfo, r=jieyouxuStuart Cook-0/+6
Add test for S_OBJNAME & update test for LF_BUILDINFO cl and cmd Update the unit test for checking cl and cmd in LF_BUILDINFO. With llvm-pdbutil we can now more specifically check if the string appears at the right location instead of just checking whether the string exists at all. Context: https://github.com/rust-lang/rust/issues/96475
2024-09-12Auto merge of #18038 - roife:fix-issue-18034, r=Veykrilbors-105/+298
feat: generate names for tuple-struct in add-missing-match-arms fix #18034. This PR includes the following enhancement: - Introduced a `NameGenerator` in `suggest_name`, which implements an automatic renaming algorithm to avoid name conflicts. Here are a few examples: ```rust let mut generator = NameGenerator::new(); assert_eq!(generator.suggest_name("a"), "a"); assert_eq!(generator.suggest_name("a"), "a1"); assert_eq!(generator.suggest_name("a"), "a2"); assert_eq!(generator.suggest_name("b"), "b"); assert_eq!(generator.suggest_name("b"), "b1"); assert_eq!(generator.suggest_name("b2"), "b2"); assert_eq!(generator.suggest_name("b"), "b3"); assert_eq!(generator.suggest_name("b"), "b4"); assert_eq!(generator.suggest_name("b3"), "b5"); ``` - Updated existing testcases in ide-assists for the new `NameGenerator` (only modified generated names). - Generate names for tuple structs instead of using wildcard patterns in `add-missing-match-arms`.
2024-09-12Auto merge of #18107 - Veykril:push-oopkquknxqxs, r=Veykrilbors-38/+24
fix: Don't emit empty inlay hint parts
2024-09-12fix: Don't emit empty inlay hint partsLukas Wirth-38/+24
2024-09-12Auto merge of #18106 - Veykril:push-yzsqoykyowts, r=Veykrilbors-29/+70
fix: Don't report typed hole error in asm! out ops Fixes https://github.com/rust-lang/rust-analyzer/issues/18103
2024-09-12fix: Don't report typed hole error in asm! out opsLukas Wirth-29/+70
2024-09-12move a test to a better locationRalf Jung-1/+0
2024-09-12Auto merge of #18105 - Veykril:push-rquxwznuuwpu, r=Veykrilbors-28/+24
fix: Faulty notifications should not bring down the server Fixes https://github.com/rust-lang/rust-analyzer/issues/18055, if a client sends us an unregistered document path in a did save notification it would force us to exit the thread. That is obviously not great behavior, we should be more fallible here
2024-09-12fix: Faulty notifications should not bring down the serverLukas Wirth-28/+24
2024-09-12use `local-rebuild` instead of `BOOTSTRAP_SKIP_TARGET_SANITY` workaroundonur-ozkan-7/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-12Merge from rustcThe Miri Cronjob Bot-15/+92
2024-09-12Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-09-12Re-run coverage tests if `coverage-dump` was modifiedZalathar-0/+6
2024-09-11Remove unused functions from ast CoroutineKindMichael Goulet-1/+11
2024-09-11Rollup merge of #130239 - RalfJung:miri-ptr-offset-unsigned, r=compiler-errorsJubilee-0/+22
miri: fix overflow detection for unsigned pointer offset This is the Miri part of https://github.com/rust-lang/rust/pull/130229. This is already UB in codegen so we better make Miri detect it; updating the docs may take time if we have to follow some approval process, but let's make Miri match reality ASAP. r? ``@scottmcm``
2024-09-11Rollup merge of #129696 - RalfJung:stdarch, r=AmanieuJubilee-9/+14
update stdarch The goal is mostly to pull in https://github.com/rust-lang/stdarch/pull/1633. r? ```@Amanieu```
2024-09-12Fix inference of literals when the expectation is CastableChayim Refael Friedman-9/+51
I followed the compiler: https://github.com/rust-lang/rust/blob/5bce6d48ff09dcb2613278ec93013795718478ef/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs#L1560-L1579.
2024-09-11make basic allocation functions track_caller in Miri for nicer backtracesRalf Jung-156/+65
2024-09-11miri: fix overflow detection for unsigned pointer offsetRalf Jung-0/+22
2024-09-11Rollup merge of #130161 - onur-ozkan:fmt-changed-files, r=Kobzol,RalfJungMatthias Krüger-5/+56
refactor merge base logic and fix `x fmt` When remote upstream is not configured, using [get_git_modified_files](https://github.com/rust-lang/rust/blob/38e3a5771cefc9362976a605549f8b04d5707311/src/tools/build_helper/src/git.rs#L114) to find modified files fails because [get_rust_lang_rust_remote](https://github.com/rust-lang/rust/blob/38e3a5771cefc9362976a605549f8b04d5707311/src/tools/build_helper/src/git.rs#L46-L48) can not resolve "rust-lang/rust" from the git output. The changes in this PR makes bootstrap to find the latest bors commit, treating it as the "closest upstream commit" so that the change tracker logic can use it to find the diffs. In addition, [skips formatting](https://github.com/rust-lang/rust/commit/e3924544832668a6e239153a90d3be2077fbdce4) if there are no modified files. Fixes #130147
2024-09-11Auto merge of #18075 - roife:fix-issue-17858, r=Veykrilbors-24/+303
feat: render patterns in params for hovering Fix #17858 This PR introduces an option to [hir-def/src/body/pretty.rs](https://github.com/rust-lang/rust-analyzer/blob/08c7bbc2dbe4dcc8968484f1a0e1e6fe7a1d4f6d/crates/hir-def/src/body/pretty.rs) to render the result as a single line, which is then reused for rendering patterns in parameters for hovering.
2024-09-11Auto merge of #18080 - Veykril:dedup, r=Veykrilbors-19760/+133
Remove crate graph deduplication logic Fixes https://github.com/rust-lang/rust-analyzer/issues/17748