about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-12-17Rollup merge of #133801 - Gelbpunkt:powerpc64le-unknown-linux-musl-tier-2, ↵Matthias Krüger-6/+102
r=jieyouxu,Urgau,Kobzol Promote powerpc64le-unknown-linux-musl to tier 2 with host tools MCP: https://github.com/rust-lang/compiler-team/issues/803 I'm using crosstool-ng for building a toolchain because GCC 9 from `musl-toolchain.sh` has float ABI issues (?) and can't compile LLVM, and writing a crosstool-ng config for a target feels less hacky than yet another target specific shell script. I also defined a kernel version, since there wasn't one specified before. If a lower version is desired, just let me know. I also tried to match the rust configure args with the loongarch64 musl tier 2 target. The resulting compiler works fine, built with `DEPLOY=1 ./src/ci/docker/run.sh dist-powerpc64le-linux` and tested on Alpine Linux in a VM and on a bare metal POWER8 machine: ``` qemu-ppc64le:/tmp/rust-nightly-powerpc64le-unknown-linux-musl$ ash install.sh install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh install: installing component 'rustc' install: installing component 'rust-std-powerpc64le-unknown-linux-musl' install: installing component 'cargo' install: installing component 'rustfmt-preview' install: installing component 'rls-preview' install: installing component 'rust-analyzer-preview' install: installing component 'llvm-tools-preview' install: installing component 'clippy-preview' install: installing component 'miri-preview' install: installing component 'rust-analysis-powerpc64le-unknown-linux-musl' install: installing component 'llvm-bitcode-linker-preview' install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error rust installed. qemu-ppc64le:~$ echo 'fn main() { println!("hello world"); }' > test.rs qemu-ppc64le:~$ rustc test.rs qemu-ppc64le:~$ ./test hello world qemu-ppc64le:~$ file test test: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI, version 1 (SYSV), statically linked, BuildID[sha1]=596ee6abf9add487ebc54fb71c2076fb6faea013, with debug_info, not stripped ``` try-job: dist-powerpc64le-linux
2024-12-17Auto merge of #134376 - jdonszelmann:fix-rustdoc-perf, r=jieyouxubors-1/+1
Try to fix perf regression in rustdoc after hir attributes Slight performance regression introduced in #131808 r? `@jieyouxu`
2024-12-17Generate shell completions for x as wellRyan Mehri-2/+5952
2024-12-17Auto merge of #134381 - jdonszelmann:move-attribute-types, r=oli-obkbors-31/+33
Split up attribute parsing code and move data types to `rustc_attr_data_structures` This change renames `rustc_attr` to `rustc_attr_parsing`, and splits up the parsing code. At the same time, all the data types used move to `rustc_attr_data_structures`. This is in preparation of also having a third crate: `rustc_attr_validation` I initially envisioned this as two separate PRs, but I think doing it in one go reduces the number of ways others would have to rebase their changes on this. However, I can still split them. r? `@oli-obk` (we already discussed how this is a first step in a larger plan) For a more detailed plan on how attributes are going to change, see https://github.com/rust-lang/rust/issues/131229 Edit: this looks like a giant PR, but the changes are actually rather trivial. Each commit is reviewable on its own, and mostly moves code around. No new logic is added.
2024-12-17compiler & tools dependencies:clubby789-78/+88
Updating allocator-api2 v0.2.20 -> v0.2.21 Updating annotate-snippets v0.11.4 -> v0.11.5 Updating anyhow v1.0.93 -> v1.0.94 Updating bstr v1.11.0 -> v1.11.1 Updating chrono v0.4.38 -> v0.4.39 Updating clap v4.5.21 -> v4.5.23 Updating clap_builder v4.5.21 -> v4.5.23 Updating clap_complete v4.5.38 -> v4.5.39 Updating clap_lex v0.7.3 -> v0.7.4 Updating colored v2.1.0 -> v2.2.0 Updating console v0.15.8 -> v0.15.10 Updating crossbeam-channel v0.5.13 -> v0.5.14 Updating crossbeam-deque v0.8.5 -> v0.8.6 Updating crossbeam-utils v0.8.20 -> v0.8.21 Updating encode_unicode v0.3.6 -> v1.0.0 Updating fastrand v2.2.0 -> v2.3.0 Updating home v0.5.9 -> v0.5.11 Updating js-sys v0.3.74 -> v0.3.76 Updating libc v0.2.167 -> v0.2.168 Updating miniz_oxide v0.8.0 -> v0.8.1 Updating pest v2.7.14 -> v2.7.15 Updating pest_derive v2.7.14 -> v2.7.15 Updating pest_generator v2.7.14 -> v2.7.15 Updating pest_meta v2.7.14 -> v2.7.15 Updating redox_syscall v0.5.7 -> v0.5.8 Updating rustc-stable-hash v0.1.0 -> v0.1.1 Updating rustix v0.38.41 -> v0.38.42 Updating self_cell v1.0.4 -> v1.1.0 Updating semver v1.0.23 -> v1.0.24 Updating serde v1.0.215 -> v1.0.216 Updating serde_derive v1.0.215 -> v1.0.216 Adding thiserror v2.0.7 Adding thiserror-impl v2.0.7 Updating time v0.3.36 -> v0.3.37 Updating time-macros v0.2.18 -> v0.2.19 Updating tokio v1.41.1 -> v1.42.0 Updating wasm-bindgen v0.2.97 -> v0.2.99 Updating wasm-bindgen-backend v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99 Updating wasm-bindgen-shared v0.2.97 -> v0.2.99 Updating wasm-encoder v0.221.0 -> v0.221.2 Updating wasmparser v0.221.0 -> v0.221.2 Updating wast v221.0.0 -> v221.0.2 Updating wat v1.221.0 -> v1.221.2 library dependencies: Updating allocator-api2 v0.2.20 -> v0.2.21 Updating libc v0.2.167 -> v0.2.168 rustbook dependencies: Updating anyhow v1.0.93 -> v1.0.94 Updating bstr v1.11.0 -> v1.11.1 Updating chrono v0.4.38 -> v0.4.39 Updating clap v4.5.21 -> v4.5.23 Updating clap_builder v4.5.21 -> v4.5.23 Updating clap_complete v4.5.38 -> v4.5.39 Updating clap_lex v0.7.3 -> v0.7.4 Updating fastrand v2.2.0 -> v2.3.0 Updating js-sys v0.3.74 -> v0.3.76 Updating libc v0.2.167 -> v0.2.168 Updating miniz_oxide v0.8.0 -> v0.8.1 Updating pest v2.7.14 -> v2.7.15 Updating pest_derive v2.7.14 -> v2.7.15 Updating pest_generator v2.7.14 -> v2.7.15 Updating pest_meta v2.7.14 -> v2.7.15 Updating pulldown-cmark-to-cmark v19.0.0 -> v19.0.1 Updating redox_syscall v0.5.7 -> v0.5.8 Updating rustix v0.38.41 -> v0.38.42 Updating semver v1.0.23 -> v1.0.24 Updating serde v1.0.215 -> v1.0.216 Updating serde_derive v1.0.215 -> v1.0.216 Adding thiserror v2.0.7 Adding thiserror-impl v2.0.7 Updating wasm-bindgen v0.2.97 -> v0.2.99 Updating wasm-bindgen-backend v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99 Updating wasm-bindgen-shared v0.2.97 -> v0.2.99 Removing windows-sys v0.52.0
2024-12-17ci: remove duplicate task definitionMarcoIeni-49/+41
2024-12-18Add suggestion for `--keep-stage 0` (#2164)Eric Huss-0/+6
2024-12-17ci: use ubuntu-22 for large runnersMarcoIeni-3/+3
2024-12-18refactor: replace &PathBuf with &Path to enhance generalityIntegral-15/+12
2024-12-17Fix intra doc links not generated inside footnote definitionsGuillaume Gomez-16/+50
2024-12-17Auto merge of #130766 - clarfonthey:stable-coverage-attribute, r=wesleywiserbors-31/+1
Stabilize #[coverage] attribute Closes #84605, which passed FCP. Stabilisation report here: https://github.com/rust-lang/rust/issues/84605#issuecomment-2166514660 Also added to reference here: rust-lang/reference#1628 --- try-job: aarch64-apple try-job: x86_64-gnu try-job: x86_64-msvc
2024-12-17Update to LLVM 19.1.6Nikita Popov-0/+0
2024-12-17bootstrap: use specific-purpose ui test path许杰友 Jieyou Xu (Joe)-1/+1
I wanted to move some ui tests around, which broke `test_valid` since it was referencing a non-specific-purpose ui test.
2024-12-17Rollup merge of #134409 - RalfJung:bootstrap-comment, r=jieyouxuJacob Pratt-2/+4
bootstrap: fix a comment I don't actually know if this is right, though... but "a single call to `paths` will only ever generate a single call to `paths`" just does not make sense.
2024-12-17Rollup merge of #134202 - nnethercote:rm-existing_doc_keyword, r=GuillaumeGomezJacob Pratt-1/+1
Remove `rustc::existing_doc_keyword` lint The check doesn't require a lint. r? ``@GuillaumeGomez``
2024-12-17clarify that path() is for on-disk pathsRalf Jung-1/+3
2024-12-17bootstrap: fix a commentRalf Jung-1/+1
2024-12-17Auto merge of #134302 - bjorn3:remove_driver_queries, r=oli-obk,jieyouxubors-62/+53
Remove queries from the driver interface All uses of driver queries in the public api of rustc_driver have been removed in https://github.com/rust-lang/rust/pull/134130 already. This removes driver queries from rustc_interface and does a couple of cleanups around TyCtxt construction and entering enabled by this removal. Finishes the removal of driver queries started with https://github.com/rust-lang/rust/pull/126834.
2024-12-17Remove `rustc::existing_doc_keyword` lint.Nicholas Nethercote-1/+1
`CheckAttrVisitor::check_doc_keyword` checks `#[doc(keyword = "..")]` attributes to ensure they are on an empty module, and that the value is a non-empty identifier. The `rustc::existing_doc_keyword` lint checks these attributes to ensure that the value is the name of a keyword. It's silly to have two different checking mechanisms for these attributes. This commit does the following. - Changes `check_doc_keyword` to check that the value is the name of a keyword (avoiding the need for the identifier check, which removes a dependency on `rustc_lexer`). - Removes the lint. - Updates tests accordingly. There is one hack: the `SelfTy` FIXME case used to used to be handled by disabling the lint, but now is handled with a special case in `is_doc_keyword`. That hack will go away if/when the FIXME is fixed. Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
2024-12-16Stabilize #[coverage] attributeltdk-31/+1
2024-12-17Auto merge of #134132 - MarcoIeni:linux-4c-to-ubuntu-22, r=Kobzolbors-1/+1
CI: update linux 4c from ubuntu 20 to ubuntu 22
2024-12-16Auto merge of #134095 - Kobzol:datadog-lockfile, r=MarcoIenibors-8/+5015
[CI] Use a lockfile for installing the `datadog` package Without a lockfile, it could fail to compile when the dependencies have changed. Reported [here](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/CI.20failure.20in.20DataDog.20upload). r? `@jdno` try-job: x86_64-msvc-ext2
2024-12-16Merge pull request #18700 from ChayimFriedman2/dyn-sendLukas Wirth-1/+18
fix: Fix a panic with a diagnostics fix when a keyword is used as a field
2024-12-16Use a record struct instead of a tuple for each namespace in `PerNs`Chayim Refael Friedman-133/+162
The reason I did this is because I plan to add another field to this struct (indicating whether the item was cfg'ed out), but it seems worthy even separately and removes a bunch of one-letter variable names and tuple-indexing. It is also easy to separate from future changes, so it will be easier to review this way.
2024-12-16Rollup merge of #134277 - notriddle:notriddle/inline-into, r=GuillaumeGomezMatthias Krüger-8/+24
rustdoc-search: handle `impl Into<X>` better This PR fixes two bugs I ran into while searching the compiler docs: - It omitted an `impl Trait` entry in the type signature field, producing `TyCtxt, , Symbol -> bool` - It didn't let me search for `TyCtxt, DefId, Symbol -> bool` even though that's a perfectly good description of the function I was looking for (the function actually used `impl Into<DefId>` r? ``@GuillaumeGomez`` cc ``@lolbinarycat``
2024-12-16Rollup merge of #134260 - GuillaumeGomez:doctest-attrs, r=notriddleMatthias Krüger-18/+42
Correctly handle comments in attributes in doctests source code Fixes https://github.com/rust-lang/rust/issues/134221. The problem was that attributes are "inlined" (backlines are stripped), then when there is an inline comment inside it, the attribute is never considered valid (since unclosed). Fix was to simply put back backlines in case it's a multiline attribute. r? ``@notriddle``
2024-12-16Rollup merge of #134124 - MarcoIeni:split-llvm-jobs, r=KobzolMatthias Krüger-44/+143
CI: use free runners for x86_64-gnu-llvm jobs try-job: x86_64-gnu-llvm-19-1 try-job: x86_64-gnu-llvm-19-2 try-job: x86_64-gnu-llvm-19-3 try-job: x86_64-gnu-llvm-18-1 try-job: x86_64-gnu-llvm-18-2 try-job: x86_64-gnu-llvm-18-3
2024-12-16rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structuresJonathan Dönszelmann-24/+27
2024-12-16split attributesJonathan Dönszelmann-7/+6
2024-12-16Fix a panic with a diagnostics fix when a keyword is used as a fieldChayim Refael Friedman-1/+18
I found it easiest to fix in the quickfix code, and not deeper (e.g. body lowering).
2024-12-16Remove unneeded handling of backlines in doctest attributesGuillaume Gomez-2/+0
2024-12-16Auto merge of #134377 - lnicola:sync-from-ra, r=lnicolabors-2118/+8734
Subtree update of `rust-analyzer` r? `@ghost`
2024-12-16Also handle cases where attributes are unclosedGuillaume Gomez-16/+40
2024-12-16fix: Fix path qualified auto-importing completions not working with re-exportsLukas Wirth-134/+221
Prior to this commit we used to generate import paths, then zipped them with the existing qualifier to check if they agree on the path to import. This is brittle when re-exports come into play causing items to have multiple applicable paths that refer to them. This commit instead rewrites this logic by generating the import path for the qualifier, verifying that the rest of the qualifier resolves and then doing a final lookup on that resolution result for the final segment instead.
2024-12-16[CI] Use a lockfile for installing the `datadog` packageJakub Beránek-8/+5015
Without a lockfile, it could fail to compile when the dependencies have changed.
2024-12-16Merge pull request #18698 from Veykril/push-vpqwrwxptsqlLukas Wirth-4/+12
internal: Don't serialize empty fields in completions and resolve payloads
2024-12-16Merge pull request #18690 from Giga-Bowser/extract-variable-stringLukas Wirth-15/+168
feat: Use string literal contents as a name when extracting into variable
2024-12-16internal: Don't serialize empty fields in completions and resolve payloadsLukas Wirth-4/+12
2024-12-16Merge pull request #18695 from roife/improve-tuple-destructionLukas Wirth-74/+74
minor: improve name suggestion for destructure_tuple_binding
2024-12-16Merge pull request #18696 from ChayimFriedman2/syn-synLukas Wirth-63/+110
feat: Report unresolved idents for implicit captures in `format_args!()`
2024-12-16Merge pull request #18697 from Veykril/push-qtmmtvpyrntrLukas Wirth-30/+9
internal: Simplify ratoml testdir usage
2024-12-16internal: Simplify ratoml testdir usageLukas Wirth-30/+9
2024-12-16try fix hir-attrs perfJonathan Dönszelmann-1/+1
2024-12-16Report unresolved idents for implicit captures in `format_args!()`Chayim Refael Friedman-63/+110
And also a bit of cleanup by storing the capture's span with the open quote included.
2024-12-16specify what a CGU is (#2163)Connor Tsui-9/+8
2024-12-16refactor: simplify `edit_tuple_usages` in destructure_tuple_bindingroife-46/+30
2024-12-15Auto merge of #131808 - jdonszelmann:hir-attributes, r=oli-obk,petrochenkovbors-149/+142
Hir attributes This PR needs some explanation, it's somewhat large. - This is step one as described in https://github.com/rust-lang/compiler-team/issues/796. I've added a new `hir::Attribute` which is a lowered version of `ast::Attribute`. Right now, this has few concrete effects, however every place that after this PR parses a `hir::Attribute` should later get a pre-parsed attribute as described in https://github.com/rust-lang/compiler-team/issues/796 and transitively https://github.com/rust-lang/rust/issues/131229. - an extension trait `AttributeExt` is added, which is implemented for both `ast::Attribute` and `hir::Atribute`. This makes `hir::Attributes` mostly compatible with code that used to parse `ast::Attribute`. All its methods are also added as inherent methods to avoid having to import the trait everywhere in the compiler. - Incremental can not not hash `ast::Attribute` at all.
2024-12-15Merge pull request #18693 from Veykril/push-wzoomkkmuolmLaurențiu Nicola-6/+3
fix: Fix proc-macro dylib names on windows
2024-12-15Add hir::AttributeJonathan Dönszelmann-149/+142
2024-12-16Rollup merge of #134331 - RalfJung:bootstrap-error-index, r=onur-ozkan许杰友 Jieyou Xu (Joe)-1/+3
bootstrap: make ./x test error-index work This makes it more likely that someone who sees an error index CI failure will be able to figure out how to reproduce that locally. Note that bootstrap already prints "Testing stage2 error-index", which is misleading since the test is actually called error_index_generator.