about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-11-02get rid of a whole bunch of unnecessary rustc_const_unstable attributesRalf Jung-6/+0
2024-11-01Update cargoWeihang Lo-0/+0
2024-11-01Use snippet placeholders for generated match armsGiga Bowser-108/+114
2024-11-01Add benchmark showing effectivity of subtree skippingJohannes Hostert-0/+23
2024-11-01Format codeLaurențiu Nicola-7/+9
2024-11-01Bump rustc cratesLaurențiu Nicola-18/+17
2024-11-01Merge from rust-lang/rustLaurențiu Nicola-234/+370
2024-11-01Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2024-11-01Auto merge of #132402 - bjorn3:remove_snap_decompression, r=jieyouxu,Veykrilbors-25/+4
Remove support for decompressing dylib metadata We haven't been compressing dylib metadata for a while now. Removing decompression support will regress error messages about an incompatible rustc version being used, but dylibs are pretty rare anyway. Fixes https://github.com/rust-lang/rust-analyzer/issues/18451
2024-11-01Auto merge of #132435 - workingjubilee:rollup-3mgogw9, r=workingjubileebors-3/+3
Rollup of 9 pull requests Successful merges: - #131168 (Fix `target_os` for `mipsel-sony-psx`) - #132209 (Fix validation when lowering `?` trait bounds) - #132294 (Bump Fuchsia) - #132357 (Improve missing_abi lint) - #132385 (compiler: Move `rustc_target::spec::abi::Abi` to `rustc_abi::ExternAbi`) - #132403 (continue `TypingMode` refactor) - #132417 (macOS: Document the difference between Clang's `-darwin` and `-macosx` targets) - #132421 (Remove `""` case from RISC-V `llvm_abiname` match statement) - #132422 (llvm: Match new LLVM 128-bit integer alignment on sparc) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-31Rollup merge of #132403 - lcnr:typing-mode, r=compiler-errorsJubilee-3/+3
continue `TypingMode` refactor There are still quite a few places which (indirectly) rely on the `Reveal` of a `ParamEnv`, but we're slowly getting there r? `@compiler-errors`
2024-10-31Auto merge of #132206 - tgross35:update-builtins, r=wesleywiserbors-0/+1
Update compiler-builtins to 0.1.136 This includes: * The license change https://github.com/rust-lang/compiler-builtins/pull/717 * The `libm` submodule update, which also has a license change https://github.com/rust-lang/libm/pull/317 * Re-enabling `math` on i686 UEFI https://github.com/rust-lang/compiler-builtins/pull/715 Fixes: https://github.com/rust-lang/rust/issues/128533
2024-10-31stop using `ParamEnv::reveal` while handling MIRlcnr-1/+1
2024-10-31Parse patterns with leading pipe properly in all placesChayim Refael Friedman-16/+73
2024-10-31Auto merge of #132401 - matthiaskrgr:rollup-599ieqr, r=matthiaskrgrbors-32/+126
Rollup of 5 pull requests Successful merges: - #130693 (Add `minicore` test auxiliary and support `//@ add-core-stubs` directive in ui/assembly/codegen tests) - #132316 (CI: use free runners for 3 fast windows jobs) - #132354 (Add `lp64e` RISC-V ABI) - #132395 (coverage: Avoid ICE when `coverage_cx` is unexpectedly unavailable) - #132396 (CI: use free runners for x86_64-gnu-tools and x86_64-rust-for-linux) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-31Merge pull request #18447 from ChayimFriedman2/cleanup-tylowerctxLukas Wirth-224/+201
Avoid interior mutability in `TyLoweringContext`
2024-10-31Remove support for compressed dylib metadata from rust-analyzerbjorn3-23/+4
2024-10-31Remove support for decompressing dylib metadatabjorn3-2/+0
We haven't been compressing dylib metadata for a while now. Removing decompression support will regress error messages about an incompatible rustc version being used, but dylibs are pretty rare anyway.
2024-10-31clippy: we've got a `LateContext` use it for `TypingMode`lcnr-1/+1
2024-10-31`ConstCx` stop using `ParamEnv::reveal`lcnr-2/+2
2024-10-31compiletest: stamp `minicore.rs` to rerun tests on changes许杰友 Jieyou Xu (Joe)-0/+6
2024-10-31compiletest: conditionally build and provide `minicore` as extern prelude ↵许杰友 Jieyou Xu (Joe)-2/+48
when requested via `//@ add-core-stubs` directive `//@ add-core-stubs` will imply `-Cpanic=abort`.
2024-10-31compiletest: register `--minicore-path` flag and `//@ add-core-stubs` directive许杰友 Jieyou Xu (Joe)-1/+41
2024-10-31compiletest: localize `compile_test_and_save_assembly` to assembly test module许杰友 Jieyou Xu (Joe)-29/+31
2024-10-31Auto merge of #132301 - compiler-errors:adjust, r=lcnrbors-8/+8
Remove region from adjustments It's not necessary to store this region, because it's only used in THIR and MemCat/ExprUse, both of which already basically only deal with erased regions anyways.
2024-10-31compiletest: add `{ignore,needs}-{rustc,std}-debug-assertions` directive support许杰友 Jieyou Xu (Joe)-9/+77
And retire the old `only-debug` directive which was ambiguous and only for std debug assertions.
2024-10-31Merge pull request #18448 from Veykril/push-zwuuoytnmnqzLukas Wirth-90/+88
Move `child_by_source` from `hir-def` to `hir`
2024-10-31Move child_by_source from hir-def to hirLukas Wirth-90/+88
2024-10-31Merge pull request #18437 from sam-mccall/publish_fixtureLukas Wirth-1/+1
Publish test-fixture => ra_ap_test_fixture
2024-10-31silence clippyRalf Jung-0/+2
2024-10-31fmtThe Miri Cronjob Bot-1/+1
2024-10-31Merge from rustcThe Miri Cronjob Bot-166/+228
2024-10-31Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-10-31Merge pull request #4003 from YohDeadfall/windows-shim-typoBen Kimock-1/+1
Fixed a typo in the GetThreadDescription shim
2024-10-31Fixed a typo in the GetThreadDescription shimYoh Deadfall-1/+1
2024-10-30Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errorsJubilee-20/+31
Rename `rustc_abi::Abi` to `BackendRepr` Remove the confabulation of `rustc_abi::Abi` with what "ABI" actually means by renaming it to `BackendRepr`, and rename `Abi::Aggregate` to `BackendRepr::Memory`. The type never actually represented how things are passed, as that has to have `PassMode` considered, at minimum, but rather it just is how we represented some things to the backend. This conflation arose because LLVM, the primary backend at the time, would lower certain IR forms using certain ABIs. Even that only somewhat was true, as it broke down when one ventured significantly afield of what is described by the System V AMD64 ABI either by using different architectures, ABI-modifying IR annotations, the same architecture **with different ISA extensions enabled**, or other... unexpected delights. Unfortunately both names are still somewhat of a misnomer right now, as people have written code for years based on this misunderstanding. Still, their original names are even moreso, and for better or worse, this backend code hasn't received as much maintenance as the rest of the compiler, lately. Actually arriving at a correct end-state will simply require us to disentangle a lot of code in order to fix, much of it pointlessly repeated in several places. Thus this is not an "actual fix", just a way to deflect further misunderstandings.
2024-10-30Rollup merge of #129383 - cjgillot:opaque-noremap, ↵Jubilee-56/+40
r=compiler-errors,petrochenkov Remap impl-trait lifetimes on HIR instead of AST lowering Current AST->HIR lowering goes out of its way to remap lifetimes for opaque types. This is complicated and leaks into upstream and downstream code. This PR stops trying to be clever during lowering, and prefers to do this remapping during the HIR->ty lowering. The remapping computation easily fits into the bound var resolution code. Its result can be used in by `generics_of` and `hir_ty_lowering::new_opaque` to add the proper parameters and arguments. See an example on the doc for query `opaque_captured_lifetimes`. Based on https://github.com/rust-lang/rust/pull/129244/ Fixes https://github.com/rust-lang/rust/issues/125249 Fixes https://github.com/rust-lang/rust/issues/126850 cc `@compiler-errors` `@spastorino` r? `@petrochenkov`
2024-10-30Avoid interior mutability in `TyLoweringContext`Chayim Refael Friedman-224/+201
This requires some serious code juggling.
2024-10-30Merge pull request #4000 from noahmbright/futexRalf Jung-4/+18
Change futex_wait errno from Scalar to IoError
2024-10-30Change futex_wait errno from Scalar to IoErrorNoah Bright-4/+18
To shift more Scalars to IoErrors, implement this change, allowing for a few other changes in the Linux and Windows shims. This also requires introducing a WindowsError variant in the IoError enum and implementing the VisitProvenance trait for IoErrors.
2024-10-30rustdoc-search: show types signatures in resultsMichael Howell-11/+43
2024-10-30rustdoc-search: pass original names through ASTMichael Howell-1/+0
2024-10-30Only parse `safe` as contextual kw in extern blocksChayim Refael Friedman-8/+47
I don't like the party of `bool`s that is becoming, but two isn't worth a refactoring yet IMO.
2024-10-30Remap impl-trait lifetimes on HIR instead of AST lowering.Camille GILLOT-56/+40
2024-10-30Rollup merge of #132315 - jieyouxu:extract-llvm-version, r=onur-ozkan许杰友 Jieyou Xu (Joe)-70/+139
compiletest: improve robustness of LLVM version handling Previously, `extract_llvm_versions` did some gymnastics for llvm versions by combining `(major, minor, patch)` into a combined version integer, but that is not very robust and made it difficult to add `max-llvm-major-version`. This PR tries to: - Improve llvm version handling robustness by parsing and representing the version as a semver. We intentionally deviate from strict semver standards by allowing omission of minor and patch versions. They default to `0` when absent. This is for convenience to allow the user to write e.g. `//@ min-llvm-version: 18` instead of having to spell out the full `major.minor.patch` semver string `//@ min-llvm-verison: 18.0.0`. - Adjust some panic messages to include a bit more context about *why* the version string was rejected. Prerequisite for #132310. r? bootstrap (or compiler)
2024-10-30Reject generic self types.Adrian Taylor-1/+0
The RFC for arbitrary self types v2 declares that we should reject "generic" self types. This commit does so. The definition of "generic" was unclear in the RFC, but has been explored in https://github.com/rust-lang/rust/issues/129147 and the conclusion is that "generic" means any `self` type which is a type parameter defined on the method itself, or references to such a type. This approach was chosen because other definitions of "generic" don't work. Specifically, * we can't filter out generic type _arguments_, because that would filter out Rc<Self> and all the other types of smart pointer we want to support; * we can't filter out all type params, because Self itself is a type param, and because existing Rust code depends on other type params declared on the type (as opposed to the method). This PR decides to make a new error code for this case, instead of reusing the existing E0307 error. This makes the code a bit more complex, but it seems we have an opportunity to provide specific diagnostics for this case so we should do so. This PR filters out generic self types whether or not the 'arbitrary self types' feature is enabled. However, it's believed that it can't have any effect on code which uses stable Rust, since there are no stable traits which can be used to indicate a valid generic receiver type, and thus it would have been impossible to write code which could trigger this new error case. It is however possible that this could break existing code which uses either of the unstable `arbitrary_self_types` or `receiver_trait` features. This breakage is intentional; as we move arbitrary self types towards stabilization we don't want to continue to support generic such types. This PR adds lots of extra tests to arbitrary-self-from-method-substs. Most of these are ways to trigger a "type mismatch" error which https://github.com/rust-lang/rust/blob/9b82580c7347f800c2550e6719e4218a60a80b28/compiler/rustc_hir_typeck/src/method/confirm.rs#L519 hopes can be minimized by filtering out generics in this way. We remove a FIXME from confirm.rs suggesting that we make this change. It's still possible to cause type mismatch errors, and a subsequent PR may be able to improve diagnostics in this area, but it's harder to cause these errors without contrived uses of the turbofish. This is a part of the arbitrary self types v2 project, https://github.com/rust-lang/rfcs/pull/3519 https://github.com/rust-lang/rust/issues/44874 r? @wesleywiser
2024-10-30Merge pull request #18304 from davidkurilla/docs-create-setup-documentLukas Wirth-0/+57
docs: create setup documentation
2024-10-30Merge pull request #18382 from dqkqd/issue-17042Lukas Wirth-3/+72
fix: auto-complete import for aliased function and module
2024-10-30Merge pull request #18385 from Giga-Bowser/masterLukas Wirth-1/+503
feat: Add assist to generate a type alias for a function
2024-10-30Merge pull request #18436 from Veykril/lw-yvkqwpnwsouoLukas Wirth-191/+478
Do not render meta info when hovering usages