about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-04-08Update browser-ui-test version to 0.17.2Guillaume Gomez-1/+1
2024-04-08Auto merge of #123569 - c410-f3r:testsssssss, r=jieyouxubors-26/+26
Move some tests r? `@petrochenkov`
2024-04-08Auto merge of #123506 - RalfJung:miri-test-libstd, r=Mark-Simulacrumbors-10/+55
check-aux: test core, alloc, std in Miri Let's see if this works, and how long it takes.
2024-04-07Move testsCaio-26/+26
2024-04-07Auto merge of #123601 - jieyouxu:compiletest-run-rustfix-revisions, ↵bors-1/+21
r=WaffleLapkin compiletest: properly handle revisioned run-rustfix tests Before this PR, if you have a revisioned `//@ run-rustfix` test like `//`@[foo]` run-rustfix`, you would run into an error saying crate name cannot contain `.` characters because the fixed test file trying to be compiled is named `<test-name>.<revision>.fixed`, from which `rustc` infers the crate name to be `<test-name>.<revision>` which is not a valid crate name. This PR fixes the problem by constructing a synthetic crate name from `<test-name>.<revision>`, by 1. replacing all `-` with `_`, and 2. replacing all `.` with `__` and pass that constructed crate name with `--crate-name` to rustc to compile the fixed file. Fixes https://github.com/rust-lang/rust/issues/123596.
2024-04-07compiletest: properly handle revisioned run-rustfix tests许杰友 Jieyou Xu (Joe)-1/+21
2024-04-07Rollup merge of #123584 - tgross35:rustc_doc_primitive-usage-error, r=fmeaseMatthias Krüger-2/+10
Emit an error when `rustc_doc_primitive` has an unknown value Currently rustdoc silently does nothing. Change this to raise an error instead.
2024-04-07Auto merge of #123221 - pacak:cache_emit, r=fmease,jieyouxubors-18/+30
Save/restore more items in cache with incremental compilation Right now they don't play very well together, consider a simple example: ``` $ export RUSTFLAGS="--emit asm" $ cargo new --lib foo Created library `foo` package $ cargo build -q $ touch src/lib.rs $ cargo build error: could not copy "/path/to/foo/target/debug/deps/foo-e307cc7fa7b6d64f.4qbzn9k8mosu50a5.rcgu.s" to "/path/to/foo/target/debug/deps/foo-e307cc7fa7b6d64f.s": No such file or directory (os error 2) ``` Touch triggers the rebuild, incremental compilation detects no changes (yay) and everything explodes while trying to copy files were they should go. This pull request fixes it by copying and restoring more files in the incremental compilation cache Fixes https://github.com/rust-lang/rust/issues/89149 Fixes https://github.com/rust-lang/rust/issues/88829 Related: https://internals.rust-lang.org/t/interaction-between-incremental-compilation-and-emit/20551
2024-04-07Auto merge of #123585 - matthiaskrgr:rollup-dexaj7a, r=matthiaskrgrbors-0/+8
Rollup of 4 pull requests Successful merges: - #123410 (Relax framework linking test) - #123446 (Fix incorrect 'llvm_target' value used on watchOS target) - #123579 (add some more tests) - #123581 (Add `f16` and `f128` to rustdoc's `PrimitiveType`) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-07also test core+alloc on a 32bit big-endian targetRalf Jung-1/+5
2024-04-07disable debug assertions to speed up the check-aux jobRalf Jung-0/+4
2024-04-07run some std tests on more targetsRalf Jung-11/+28
2024-04-07also test parts of stdRalf Jung-0/+10
requires disabling some tests that do not work
2024-04-07check-aux: test core and alloc in MiriRalf Jung-0/+10
2024-04-07rustdoc: error when `rustc_doc_primitive` has an unknown typeTrevor Gross-2/+10
Currently rustdoc silently does nothing if it isn't aware of the specified primitive type. Change this to raise an error instead.
2024-04-07Rollup merge of #123581 - tgross35:f16-f128-rustdoc-updates, r=fmeaseMatthias Krüger-0/+8
Add `f16` and `f128` to rustdoc's `PrimitiveType` Fix a few places where these primitives were missing from librustdoc. This should fix the CI failures from doc links in https://github.com/rust-lang/rust/pull/122470.
2024-04-07Auto merge of #123555 - DianQK:update-llvm-18, r=cuviperbors-0/+0
Update to LLVM 18.1.3 Fixes #122805. This should work on all targets: https://rust.godbolt.org/z/svW8ha31z. r? `@cuviper`
2024-04-06Add `f16` and `f128` to rustdoc's `PrimitiveType`Trevor Gross-0/+8
Fix a few places where these primitives were missing from librustdoc.
2024-04-07Rollup merge of #123563 - Oneirical:version, r=jieyouxuMatthias Krüger-2/+1
Rewrite `version` test run-make as an UI test Claiming the simple `version` test from #121876. Reasoning: As discussed in #123297, 10 years ago, some changes to CLI flags warranted the creation of the `version` test. Since it's not actually executing the compiled binary, it has no purpose being a `run-make` test and should instead be an UI test. This is the exact same change as it was shown on my closed PR #123297. Changes were ready, but I did a major Git mishap while trying to fix a tidy error and messed up my branch. The details of this error are explained [here](https://github.com/rust-lang/rust/pull/123297#issuecomment-2041152379).
2024-04-07Rollup merge of #123411 - saethlin:ub-checks, r=Urgau,RalfJungMatthias Krüger-1/+19
Put checks that detect UB under their own flag below debug_assertions Implementation of https://github.com/rust-lang/compiler-team/issues/725
2024-04-06MIRI_REPLACE_LIBRS_IF_NOT_TEST: also apply to crates.io cratesRalf Jung-7/+2
2024-04-06Rewrite version test as UI testOneirical-2/+1
fix: re-add stout ignore restore does-nothing fix: universal check-pass
2024-04-06Auto merge of #123557 - GuillaumeGomez:rollup-3af7urf, r=GuillaumeGomezbors-954/+990
Rollup of 4 pull requests Successful merges: - #123541 (remove miri-test-libstd hacks that are no longer needed) - #123552 (Add missing -Zquery-dep-graph to the spike-neg incr comp tests) - #123553 (Miri subtree update) - #123554 (Simplify/cleanup `search-result-color.goml`) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-06Rollup merge of #123553 - RalfJung:miri, r=RalfJungGuillaume Gomez-954/+990
Miri subtree update r? `@ghost`
2024-04-06Put checks that detect UB under their own flag below debug_assertionsBen Kimock-1/+19
2024-04-06Auto merge of #123339 - onur-ozkan:optimize-tidy-check, r=Mark-Simulacrumbors-4397/+4402
optimize tidy check on `src/tools/tidy/src/issues.txt` This change applies to the following: - Handles `is_sorted` in the first iteration without needing a second. - Fixes line sorting on `--bless`. - Reads `issues.txt` as str rather than making it part of the source code. Fixes #123002
2024-04-06extend run-make test runner with some helper functionsMichael Baikov-18/+30
2024-04-06Update to LLVM 18.1.3DianQK-0/+0
2024-04-06Auto merge of #123545 - matthiaskrgr:rollup-vyx8cfv, r=matthiaskrgrbors-9/+42
Rollup of 4 pull requests Successful merges: - #114788 (impl get_mut_or_init and get_mut_or_try_init for OnceCell and OnceLock) - #122291 (Stabilize `const_caller_location` and `const_location_fields`) - #123357 (CI: Redirect stderr to stdout to order GHA logs) - #123504 (bootstrap: split cargo-miri test into separate Step) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-06make 'missing extern static' error consistent with missing shimRalf Jung-15/+11
2024-04-06optimize tidy check on `src/tools/tidy/src/issues.txt`onur-ozkan-4397/+4402
This change applies to the following: - Handles `is_sorted` in the first iteration without needing a second. - Fixes line sorting on `--bless`. - Reads `issues.txt` as str rather than making it part of the source code. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-06Rollup merge of #123504 - RalfJung:test-cargo-miri, r=Mark-SimulacrumMatthias Krüger-8/+40
bootstrap: split cargo-miri test into separate Step This makes it easier to test just the driver or the cargo-miri integration. ````@rust-lang/miri```` this means to test both you now need to do `./x.py test miri cargo-miri`.
2024-04-06Rollup merge of #123357 - Kobzol:ci-combine-streams, r=Mark-SimulacrumMatthias Krüger-1/+2
CI: Redirect stderr to stdout to order GHA logs This PR modifies the main CI workflow so that its stderr is redirected to stdout. This should make it so that stderr and stdout output is not interleaved in the wrong order in GHA logs (see discussion [here](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Github.20actions.20logs.20show.20lines.20in.20the.20wrong.20order)).
2024-04-06bootstrap: remove unused pub fnsklensy-30/+0
2024-04-06Auto merge of #123321 - clubby789:cargo-uupdate, r=Mark-Simulacrumbors-2/+2
Bump dependencies Follow up for #123252 Unfortunately this file needs to be manually bumped when any dependencies are bumped in the main lockfile ``` Updating autocfg v1.1.0 -> v1.2.0 Updating chrono v0.4.35 -> v0.4.37 Updating clap v4.5.3 -> v4.5.4 Updating clap_derive v4.5.3 -> v4.5.4 Updating handlebars v5.1.0 -> v5.1.2 Updating itoa v1.0.10 -> v1.0.11 Updating memoffset v0.9.0 -> v0.9.1 Updating openssl-sys v0.9.101 -> v0.9.102 Updating pin-project-lite v0.2.13 -> v0.2.14 Updating r-efi v4.3.0 -> v4.4.0 Updating regex-syntax v0.8.2 -> v0.8.3 Updating security-framework v2.9.2 -> v2.10.0 Updating security-framework-sys v2.9.1 -> v2.10.0 Updating serde_json v1.0.114 -> v1.0.115 Updating syn v2.0.55 -> v2.0.57 Updating tokio v1.36.0 -> v1.37.0 ```
2024-04-06Merge from rustcRalf Jung-2043/+6202
2024-04-06Preparing for merge from rustcRalf Jung-1/+1
2024-04-06chore: fix some typosfindseat-7/+7
Signed-off-by: findseat <penglili@outlook.com>
2024-04-06Add target riscv32im_unknown_none_elf to dist-various-19names-0/+3
2024-04-05Update cargoWeihang Lo-0/+0
2024-04-05bootstrap: move all of rustc's flags to `rustc_cargo`Josh Stone-54/+59
This ensures that `RUSTFLAGS` will be consistent between all modes of building the compiler, so they won't trigger a rebuild by cargo. This kind of fix was started in #119414 just for LTO flags, but it's applicable to all kinds of flags that might be configured.
2024-04-05Rollup merge of #123500 - belovdv:remove-miri-jobserver-fixme, ↵Guillaume Gomez-0/+7
r=RalfJung,oli-obk Revert removing miri jobserver workaround Reverts #123469. r? ``@ghost``
2024-04-05Rollup merge of #121419 - agg23:xrOS-pr, r=davidtwcoGuillaume Gomez-3/+62
Add aarch64-apple-visionos and aarch64-apple-visionos-sim tier 3 targets Introduces `aarch64-apple-visionos` and `aarch64-apple-visionos-sim` as tier 3 targets. This allows native development for the Apple Vision Pro's visionOS platform. This work has been tracked in https://github.com/rust-lang/compiler-team/issues/642. There is a corresponding `libc` change https://github.com/rust-lang/libc/pull/3568 that is not required for merge. Ideally we would be able to incorporate [this change](https://github.com/gimli-rs/object/pull/626) to the `object` crate, but the author has stated that a release will not be cut for quite a while. Therefore, the two locations that would reference the xrOS constant from `object` are hardcoded to their MachO values of 11 and 12, accompanied by TODOs to mark the code as needing change. I am open to suggestions on what to do here to get this checked in. # Tier 3 Target Policy At this tier, the Rust project provides no official support for a target, so we place minimal requirements on the introduction of targets. > 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.) See [src/doc/rustc/src/platform-support/apple-visionos.md](https://github.com/rust-lang/rust/blob/e88379034a0fe7d90a8f305bbaf4ad66dd2ce8dc/src/doc/rustc/src/platform-support/apple-visionos.md) > 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. This naming scheme matches `$ARCH-$VENDOR-$OS-$ABI` which is matches the iOS Apple Silicon simulator (`aarch64-apple-ios-sim`) and other Apple 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 besubject 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. This contribution is fully available under the standard Rust license with no additional legal restrictions whatsoever. This PR does not introduce any new dependency less permissive than the Rust license policy. The new targets do not depend on proprietary libraries. > 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. This new target mirrors the standard library for watchOS and iOS, with minor divergences. > 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. Documentation is provided in [src/doc/rustc/src/platform-support/apple-visionos.md](https://github.com/rust-lang/rust/blob/e88379034a0fe7d90a8f305bbaf4ad66dd2ce8dc/src/doc/rustc/src/platform-support/apple-visionos.md) > 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. > 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. > 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. I acknowledge these requirements and intend to ensure that they are met. This target does not touch any existing tier 2 or tier 1 targets and should not break any other targets.
2024-04-05bootstrap: split cargo-miri test into separate StepRalf Jung-8/+40
2024-04-05Revert "remove miri jobserver workaround"belovdv-0/+7
This reverts commit af81ab762888eb04d01e9ad5269df5202d6a38b8.
2024-04-05Auto merge of #123497 - GuillaumeGomez:rollup-usqb4q9, r=GuillaumeGomezbors-30/+354
Rollup of 8 pull requests Successful merges: - #122334 (Vendor rustc_codegen_gcc) - #122894 (Move check for error in impl header outside of reporting) - #123149 (Port argument-non-c-like-enum to Rust) - #123311 (Match ergonomics: implement "`&`pat everywhere") - #123350 (Actually use the inferred `ClosureKind` from signature inference in coroutine-closures) - #123474 (Port `run-make/issue-7349` to a codegen test) - #123489 (handle rustc args properly in bootstrap) - #123496 (ping on wf changes, remove fixme) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-05Rollup merge of #123489 - onur-ozkan:handle-rustc-args-properly, r=clubby789Guillaume Gomez-6/+4
handle rustc args properly in bootstrap Because `RUSTFLAGS` gets overwritten during the conversion from `Cargo` to `Command`, the passed rustc args were being lost. This change combines the rustc args with the values that override `RUSTFLAGS`. Fixes #123228
2024-04-05Rollup merge of #123474 - jieyouxu:issue-7349-port, r=Mark-SimulacrumGuillaume Gomez-1/+0
Port `run-make/issue-7349` to a codegen test The test does not need to be a run-make test, it can use the codegen test infrastructure. Also took the opportunity to rename the test to `no-redundant-item-monomorphization` so it's not just some opaque issue number. Part of #121876.
2024-04-05Rollup merge of #123350 - compiler-errors:async-closure-by-move, r=oli-obkGuillaume Gomez-0/+38
Actually use the inferred `ClosureKind` from signature inference in coroutine-closures A follow-up to https://github.com/rust-lang/rust/pull/123349, which fixes another subtle bug: We were not taking into account the async closure kind we infer during closure signature inference. When I pass a closure directly to an arg like `fn(x: impl async FnOnce())`, that should have the side-effect of artificially restricting the kind of the async closure to `ClosureKind::FnOnce`. We weren't doing this -- that's a quick fix; however, it uncovers a second, more subtle bug with the way that `move`, async closures, and `FnOnce` interact. Specifically, when we have an async closure like: ``` let x = Struct; let c = infer_as_fnonce(async move || { println!("{x:?}"); } ``` The outer closure captures `x` by move, but the inner coroutine still immutably borrows `x` from the outer closure. Since we've forced the closure to by `async FnOnce()`, we can't actually *do* a self borrow, since the signature of `AsyncFnOnce::call_once` doesn't have a borrowed lifetime. This means that all `async move` closures that are constrained to `FnOnce` will fail borrowck. We can fix that by detecting this case specifically, and making the *inner* async closure `move` as well. This is always beneficial to closure analysis, since if we have an `async FnOnce()` that's `move`, there's no reason to ever borrow anything, so `move` isn't artificially restrictive.
2024-04-05Rollup merge of #123149 - jieyouxu:rmake-arguments-non-c-like-enum, ↵Guillaume Gomez-19/+308
r=Mark-Simulacrum Port argument-non-c-like-enum to Rust Part of #121876.