about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-09-20Add --enable-profiler to armhf distElli Howard-1/+1
Adds the --enable-profiler flag to the RUST_CONFIGURE_ARGS for armhf distribution for Linux. This enables running coverage for tests
2024-09-21Rollup merge of #130642 - cuviper:run-make-cargo, r=jieyouxuMatthias Krüger-0/+19
Pass the current cargo to `run-make` tests A couple tests were using `BOOTSTRAP_CARGO` with `-Zbuild-std`, but that stage0 cargo might not always be in sync with in-tree changes. In particular, those tests started failing on the beta branch because the older cargo couldn't find the library `Cargo.lock`, and then couldn't build the latest version of `compiler_builtins` that had nightly changes. Fixes #130634 r? `@saethlin`
2024-09-21Fix clippyBen Kimock-1/+1
2024-09-21move enzyme flags from general cargo to rustc-specific cargoonur-ozkan-6/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-20Pass the current cargo to `run-make` testsJosh Stone-0/+19
A couple tests were using `BOOTSTRAP_CARGO` with `-Zbuild-std`, but that stage0 cargo might not always be in sync with in-tree changes. In particular, those tests started failing on the beta branch because the older cargo couldn't find the library `Cargo.lock`, and then couldn't build the latest version of `compiler_builtins` that had nightly changes.
2024-09-20Auto merge of #130632 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 16 commits in a9a418d1a22f29e7dfd034e3b93f15657e608a29..eaee77dc1584be45949b75e4c4c9a841605e3a4b 2024-09-15 19:13:12 +0000 to 2024-09-19 21:10:23 +0000 - fix(complete): Harden `--target` completions (rust-lang/cargo#14564) - Cleanup duplicated check-cfg lint logic (rust-lang/cargo#14567) - Revert "remove reference to incomplete crates.io feature from docs" (rust-lang/cargo#14562) - feat: Add custom completer for `cargo help &lt;TAB&gt;` (rust-lang/cargo#14557) - docs(unstable): Expand on completion documentation (rust-lang/cargo#14563) - feat: Add custom completer for `cargo build --example=&lt;TAB&gt;` (rust-lang/cargo#14531) - remove reference to incomplete crates.io feature from docs (rust-lang/cargo#14561) - fix(complete): Fix problems on my machine (rust-lang/cargo#14558) - feat: Add custom completer for completing benchmark names (rust-lang/cargo#14532) - refactor(info): Use the `shell.note` to print the note (rust-lang/cargo#14554) - feat: Add custom completer for completing test names (rust-lang/cargo#14548) - Suggest `cargo info` command in the `cargo search` result (rust-lang/cargo#14537) - feat: Add custom completer for completing target triple (rust-lang/cargo#14535) - feat: Add custom completer for `cargo -Z &lt;TAB&gt;` (rust-lang/cargo#14536) - feat: Add custom completer for completing installed binaries (rust-lang/cargo#14534) - feat: Add custom completer for completing bin names (rust-lang/cargo#14533) r? ghost
2024-09-20Update to LLVM 19.1.0Josh Stone-0/+0
2024-09-20Auto merge of #130631 - GuillaumeGomez:rollup-jpgy1iv, r=GuillaumeGomezbors-5/+52
Rollup of 7 pull requests Successful merges: - #128209 (Remove macOS 10.10 dynamic linker bug workaround) - #130526 (Begin experimental support for pin reborrowing) - #130611 (Address diagnostics regression for `const_char_encode_utf8`.) - #130614 (Add arm64e-apple-tvos target) - #130617 (bail if there are too many non-region infer vars in the query response) - #130619 (Fix scraped examples height) - #130624 (Add `Vec::as_non_null`) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-20Update cargoWeihang Lo-0/+0
2024-09-20Rollup merge of #130619 - GuillaumeGomez:scraped-examples-height, r=notriddleGuillaume Gomez-2/+9
Fix scraped examples height Fixes [#130562](https://github.com/rust-lang/rust/issues/130562). You can test it [here](https://rustdoc.crud.net/imperio/scraped-examples-height/doc/scrape_examples/fn.test_many.html). I also used this opportunity to reduce the padding on line numbers: | before | after | | - | - | | ![Screenshot from 2024-09-20 16-20-40](https://github.com/user-attachments/assets/9434704c-afe0-4ec3-a1dc-6f3c16d03b3b) | ![Screenshot from 2024-09-20 16-20-13](https://github.com/user-attachments/assets/f3bd01bf-760a-4acd-ba34-8e7db083245a) | r? `@notriddle`
2024-09-20Rollup merge of #130614 - arttet:arm64e-apple-tvos, r=bjorn3Guillaume Gomez-3/+43
Add arm64e-apple-tvos target This introduces * `arm64e-apple-tvos` ## Tier 3 Target Policy > * A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) I will be a target maintainer. > * Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo. The `arm64e-apple-tvos` target names like `arm64e-apple-ios`, `arm64e-apple-darwin`. So, **I have chosen this name because there are similar triplets in LLVM**. I think there are no more suitable names for these targets. > * Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. The target must not introduce license incompatibilities. Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0). The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements. Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. No dependencies were added to Rust. > * Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. > * This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. Understood. I am not a member of a Rust team. > * Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. Understood. `std` is supported. > * The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. Building is described in the derived target doc. > * Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via `@)` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. > * Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. Understood. > * Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. > * In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. Understood. https://github.com/rust-lang/rust/issues/121663 https://github.com/rust-lang/rust/issues/73628
2024-09-20analysis-stats: respect --disable-proc-macros flagDavid Barsky-1/+5
2024-09-20Auto merge of #124895 - obeis:static-mut-hidden-ref, r=compiler-errorsbors-93/+157
Disallow hidden references to mutable static Closes #123060 Tracking: - https://github.com/rust-lang/rust/issues/123758
2024-09-20miri: An error message got changedJubilee Young-2/+2
2024-09-20Normalize being an annoying little compile testJubilee Young-1/+0
The issue-112505-overflow test just extended a case of transmute-fail.rs so simply put them in the same file. Then we normalize away other cases of this.
2024-09-21Support clobber_abi and vector/access registers (clobber-only) in s390x ↵Taiki Endo-0/+7
inline assembly
2024-09-20skip `FileCheck` check when running in dry-run modeonur-ozkan-11/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-20Add arm64e-apple-tvos targetArtyom Tetyukhin-3/+43
2024-09-20remove workaround for make prepare and use dry-run build insteadonur-ozkan-10/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-20Improve paddings for code blocks line numbersGuillaume Gomez-2/+6
2024-09-20Revert additional scraped examples heightGuillaume Gomez-0/+3
2024-09-20Rollup merge of #130607 - GnomedDev:remove-seekfrom-paths, r=compiler-errorsGuillaume Gomez-25/+18
[Clippy] Remove final std paths for diagnostic item Removes the paths to SeekFrom::Start/Current that were left in #130553. This was split off as it involves introducing a utility to check for enum ctors, as both: - enum variants cannot be diagnostic items - even if they could, that wouldn't help because we need to get the enum variant ctor While adding the `is_enum_variant_ctor`, I removed both `is_diagnostic_ctor` and `is_res_diagnostic_ctor` as they are unused and never worked due to the above bullet points.
2024-09-20Rollup merge of #130585 - GuillaumeGomez:add-rustdoc-template-tidy-check, ↵Guillaume Gomez-0/+60
r=notriddle Add tidy check for rustdoc templates to ensure the whitespace characters are all stripped Fixes https://github.com/rust-lang/rust/issues/130559. I'm planning to send a follow-up in case a tag at the end of a line isn't needed (if the next line starts with a jinja tag for example). r? `@notriddle`
2024-09-20Rollup merge of #130566 - jieyouxu:breakup-runtest, r=compiler-errorsGuillaume Gomez-2041/+2156
Break up compiletest `runtest.rs` into smaller helper modules Previously compiletest's `runtest.rs` was a massive 4700 lines file that made reading and navigation very awkward. This PR breaks the `runtest.rs` file up into smaller helper modules, one for each test suite/mode. > [!NOTE] > This PR should not contain functional changes, it is intended to be mostly code motion to breakup `runtest.rs` into smaller helper modules to make it easier to digest. > > This PR intentionally does not neatly reorganize where all the methods on `TestCx` goes, that is intended for a follow-up PR. Some methods on `TestCx` do not need to be on `TestCx`. It also does not address a weirdness in valgrind, that is intended for a follow-up PR as well. Part of a series of compiletest cleanups #130565. Fixes #89475. r? `@ghost` (I need to do a self-review pass first)
2024-09-20Update std support for all vxworks target archsB I Mohammed Abbas-2/+2
2024-09-20Add Vxworks RISC-V targetsB I Mohammed Abbas-0/+4
2024-09-20Add flake.nix and .envrcMaybe Lapkin-0/+105
2024-09-20[Clippy] Remove final std paths for diagnostic itemGnomedDev-25/+18
2024-09-20Auto merge of #130508 - adwinwhite:niche-not-depend-on-order, r=the8472bors-4/+5
Get rid of niche selection's dependence on fields's order Fixes #125630. Use the optimal niche selection decided in `univariant()` rather than picking niche field manually. r? `@the8472`
2024-09-20Auto merge of #18132 - ChayimFriedman2:fix-closure-semi, r=Veykrilbors-32/+100
fix: Don't complete `;` when in closure return expression Completing it will break syntax. Fixes #18130.
2024-09-20Auto merge of #18151 - ChayimFriedman2:metavar-concat, r=Veykrilbors-5/+304
feat: Support the `${concat(...)}` metavariable expression I didn't follow rustc precisely, because I think it does some things wrongly (or they are FIXME), but I only allowed more code, not less. So we're all fine. Closes #18145.
2024-09-20Emphasize how to run a single tool test (#2070)adwin-0/+11
2024-09-20Auto merge of #18108 - ChayimFriedman2:lint-level-cfg, r=Veykrilbors-16/+120
fix: Handle lint attributes that are under `#[cfg_attr]` I forgot `cfg_attr` while working on #18099. Although the original code also didn't handle that (although case lints specifically were correct, by virtue of using hir attrs).
2024-09-20Auto merge of #130597 - matthiaskrgr:rollup-9ls4066, r=matthiaskrgrbors-17/+16
Rollup of 3 pull requests Successful merges: - #130485 (Do not expect infer/bound/placeholder/error in v0 symbol mangling) - #130567 (Register tool docs for compiletest) - #130582 (rustdoc: use the correct span for doctests) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-20Rollup merge of #130582 - notriddle:notriddle/doctest-span, r=GuillaumeGomezMatthias Krüger-11/+2
rustdoc: use the correct span for doctests Fixes #130470
2024-09-20Rollup merge of #130567 - jieyouxu:tool-docs-compiletest, r=KobzolMatthias Krüger-6/+14
Register tool docs for compiletest This PR registers tool docs for `src/tools/compiletest`, meaning that ``` $ ./x doc src/tools/compiletest ``` or ``` $ ./x doc compiletest ``` will now generate docs, like for `run-make-support`. Fixes #130564.
2024-09-19Merge commit 'b23b69900eab1260be510b2bd8922f4b6de6cf1e' into sync-from-rustfmtYacin Tmimi-1556/+4708
2024-09-19Add `field@` and `variant@` doc-link disambiguatorsNoa-43/+56
2024-09-19bless issue-56762.rs as huge-static.rsJubilee Young-1/+0
2024-09-19Add tidy check for rustdoc templates to ensure the whitespace characters are ↵Guillaume Gomez-0/+60
all stripped
2024-09-19rustdoc: use the correct span for doctestsMichael Howell-11/+2
2024-09-19When checking for forbidden expr kind matches, account for rawnessChayim Refael Friedman-1/+25
An expression starting with `r#const` etc. should be accepted even in edition <=2021.
2024-09-19feat: Highlight exit points of async blocksChristopher Serr-71/+93
Async blocks act similar to async functions in that the await keywords are related, but also act like functions where the exit points are related.
2024-09-19Handle lint attributes that are under `#[cfg_attr]`Chayim Refael Friedman-16/+120
2024-09-19Support the `${concat(...)}` metavariable expressionChayim Refael Friedman-5/+304
I didn't follow rustc precisely, because I think it does some things wrongly (or they are FIXME), but I only allowed more code, not less. So we're all fine.
2024-09-19Rollup merge of #130553 - GnomedDev:remove-clippy-paths, r=compiler-errorsMatthias Krüger-163/+111
[Clippy] Get rid of most `std` `match_def_path` usage, swap to diagnostic items. Part of https://github.com/rust-lang/rust-clippy/issues/5393. This was going to remove all `std` paths, but `SeekFrom` has issues being cleanly replaced with a diagnostic item as the paths are for variants, which currently cannot be diagnostic items. This also, as a last step, categories the paths to help with future path removals.
2024-09-19Fix compiletest doc comments许杰友 Jieyou Xu (Joe)-6/+6
2024-09-19Register tool docs for compiletest许杰友 Jieyou Xu (Joe)-0/+8
2024-09-19Break up compiletest runtest.rs into smaller helper modules许杰友 Jieyou Xu (Joe)-2041/+2156
Previously compiletest's `runtest.rs` was a massive 4700 lines file that made reading and navigation very awkward. This commit intentionally does not neatly reorganize where all the methods on `TestCx` goes, that is intended for a follow-up PR.
2024-09-19Auto merge of #130069 - GuillaumeGomez:gen-scraped-buttons, r=notriddlebors-38/+44
Generate scraped examples buttons in JS Follow-up of https://github.com/rust-lang/rust/pull/129796. To reduce the page size when there are scraped examples, we can generate their buttons in JS since they require JS to work in any case. There should be no changes in display or in functionality. You can test it [here](https://rustdoc.crud.net/imperio/gen-scraped-buttons/doc/scrape_examples/fn.test.html). cc `@willcrichton` r? `@notriddle`