diff --git a/compiler/rustc_query_impl/src/from_cycle_error.rs b/compiler/rustc_query_impl/src/from_cycle_error.rs index f2a2e4f82c0b8..317b2482c05cc 100644 --- a/compiler/rustc_query_impl/src/from_cycle_error.rs +++ b/compiler/rustc_query_impl/src/from_cycle_error.rs @@ -8,12 +8,12 @@ use rustc_errors::codes::*; use rustc_errors::{Applicability, Diag, MultiSpan, pluralize, struct_span_code_err}; use rustc_hir as hir; use rustc_hir::def::{DefKind, Res}; +use rustc_middle::bug; use rustc_middle::queries::{QueryVTables, TaggedQueryKey}; use rustc_middle::query::CycleError; use rustc_middle::query::erase::erase_val; use rustc_middle::ty::layout::LayoutError; use rustc_middle::ty::{self, Ty, TyCtxt}; -use rustc_middle::{bug, span_bug}; use rustc_span::def_id::{DefId, LocalDefId}; use rustc_span::{ErrorGuaranteed, Span}; @@ -31,9 +31,9 @@ pub(crate) fn specialize_query_vtables<'tcx>(vtables: &mut QueryVTables<'tcx>) { vtables.check_representability_adt_ty.value_from_cycle_error = |tcx, _, cycle, _err| check_representability(tcx, cycle); - vtables.variances_of.value_from_cycle_error = |tcx, _, cycle, err| { + vtables.variances_of.value_from_cycle_error = |tcx, key, _, err| { let _guar = err.delay_as_bug(); - erase_val(variances_of(tcx, cycle)) + erase_val(variances_of(tcx, key)) }; vtables.layout_of.value_from_cycle_error = |tcx, _, cycle, err| { @@ -103,26 +103,9 @@ fn check_representability<'tcx>(tcx: TyCtxt<'tcx>, cycle_error: CycleError<'tcx> guar.raise_fatal() } -fn variances_of<'tcx>(tcx: TyCtxt<'tcx>, cycle_error: CycleError<'tcx>) -> &'tcx [ty::Variance] { - search_for_cycle_permutation( - &cycle_error.cycle, - |cycle| { - if let Some(frame) = cycle.get(0) - && let TaggedQueryKey::variances_of(def_id) = frame.node.tagged_key - { - let n = tcx.generics_of(def_id).own_params.len(); - ControlFlow::Break(tcx.arena.alloc_from_iter(iter::repeat_n(ty::Bivariant, n))) - } else { - ControlFlow::Continue(()) - } - }, - || { - span_bug!( - cycle_error.usage.as_ref().unwrap().span, - "only `variances_of` returns `&[ty::Variance]`" - ) - }, - ) +fn variances_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx [ty::Variance] { + let n = tcx.generics_of(def_id).own_params.len(); + tcx.arena.alloc_from_iter(iter::repeat_n(ty::Bivariant, n)) } // Take a cycle of `Q` and try `try_cycle` on every permutation, falling back to `otherwise`. diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/ambiguity.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/ambiguity.rs index 2afc1b040353e..7de8891196d85 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/ambiguity.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/ambiguity.rs @@ -11,6 +11,7 @@ use rustc_infer::traits::util::elaborate; use rustc_infer::traits::{ Obligation, ObligationCause, ObligationCauseCode, PolyTraitObligation, PredicateObligation, }; +use rustc_middle::ty::print::PrintPolyTraitPredicateExt; use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitable as _, TypeVisitableExt as _}; use rustc_session::parse::feature_err_unstable_feature_bound; use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span}; @@ -306,8 +307,18 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { err.cancel(); return e; } - let pred = self.tcx.short_string(predicate, &mut err.long_ty_path()); - err.note(format!("cannot satisfy `{pred}`")); + if let Some(clause) = predicate.as_trait_clause() + && let ty::Infer(_) = clause.self_ty().skip_binder().kind() + { + let tr = self.tcx.short_string( + clause.print_modifiers_and_trait_path(), + &mut err.long_ty_path(), + ); + err.note(format!("the type must implement `{tr}`")); + } else { + let pred = self.tcx.short_string(predicate, &mut err.long_ty_path()); + err.note(format!("cannot satisfy `{pred}`")); + } let impl_candidates = self.find_similar_impl_candidates(predicate.as_trait_clause().unwrap()); if impl_candidates.len() < 40 { diff --git a/compiler/rustc_type_ir/src/region_kind.rs b/compiler/rustc_type_ir/src/region_kind.rs index 6a2fb95e467fd..4c1b0700da58d 100644 --- a/compiler/rustc_type_ir/src/region_kind.rs +++ b/compiler/rustc_type_ir/src/region_kind.rs @@ -34,26 +34,26 @@ rustc_index::newtype_index! { /// In general, the region lattice looks like /// /// ```text -/// static ----------+-----...------+ (greatest) +/// empty(Un) -------- (smallest) +/// | \ +/// ... \ +/// | \ +/// empty(U1) -- \ +/// | \ placeholder(Un) +/// | \ | +/// empty(root) placeholder(U1) | /// | | | -/// param regions | | /// | | | /// | | | +/// param regions | | /// | | | -/// empty(root) placeholder(U1) | -/// | / | -/// | / placeholder(Un) -/// empty(U1) -- / -/// | / -/// ... / -/// | / -/// empty(Un) -------- (smallest) +/// static ----------+-----...------+ (greatest) /// ``` /// -/// Early-bound/free regions are the named lifetimes in scope from the -/// function declaration. They have relationships to one another -/// determined based on the declared relationships from the -/// function. +/// Lifetimes in scope from a function declaration are represented via +/// [`RegionKind::ReEarlyParam`]/[`RegionKind::ReLateParam`]. They +/// have relationships to one another and `'static` based on the +/// declared relationships from the function. /// /// Note that inference variables and bound regions are not included /// in this diagram. In the case of inference variables, they should @@ -62,29 +62,36 @@ rustc_index::newtype_index! { /// include -- the diagram indicates the relationship between free /// regions. /// +/// You can read more about the distinction between early and late bound +/// parameters in the rustc dev guide: [Early vs Late bound parameters]. +/// +/// A note on subtyping: If we assume that references take their region +/// covariantly, and use that to define the subtyping relationship of regions, +/// it may be somewhat surprising that `'empty` is Top and `'static` is Bottom, +/// and that "`'a` is a subtype of `'b`" is defined as "`'a` is bigger than +/// `'b`" - good to keep in mind. +/// /// ## Inference variables /// /// During region inference, we sometimes create inference variables, -/// represented as `ReVar`. These will be inferred by the code in -/// `infer::lexical_region_resolve` to some free region from the -/// lattice above (the minimal region that meets the +/// represented as [`RegionKind::ReVar`]. These will be inferred by +/// the code in `infer::lexical_region_resolve` to some free region +/// from the lattice above (the minimal region that meets the /// constraints). /// /// During NLL checking, where regions are defined differently, we -/// also use `ReVar` -- in that case, the index is used to index into -/// the NLL region checker's data structures. The variable may in fact -/// represent either a free region or an inference variable, in that -/// case. +/// also use [`RegionKind::ReVar`] -- in that case, the index is used +/// to index into the NLL region checker's data structures. The +/// variable may in fact represent either a free region or an +/// inference variable, in that case. /// /// ## Bound Regions /// /// These are regions that are stored behind a binder and must be instantiated -/// with some concrete region before being used. There are two kind of -/// bound regions: early-bound, which are bound in an item's `Generics`, -/// and are instantiated by an `GenericArgs`, and late-bound, which are part of -/// higher-ranked types (e.g., `for<'a> fn(&'a ())`), and are instantiated by -/// the likes of `liberate_late_bound_regions`. The distinction exists -/// because higher-ranked lifetimes aren't supported in all places. See [1][2]. +/// with some concrete region before being used. A type can be wrapped in a +/// `Binder`, which introduces new type/const/lifetime variables (e.g., `for<'a> +/// fn(&'a ())`). These parameters are referred to via [`RegionKind::ReBound`]. +/// You can instantiate them by the likes of `liberate_late_bound_regions`. /// /// Unlike `Param`s, bound regions are not supposed to exist "in the wild" /// outside their binder, e.g., in types passed to type inference, and @@ -123,8 +130,7 @@ rustc_index::newtype_index! { /// happen, you can use `leak_check`. This is more clearly explained /// by the [rustc dev guide]. /// -/// [1]: https://smallcultfollowing.com/babysteps/blog/2013/10/29/intermingled-parameter-lists/ -/// [2]: https://smallcultfollowing.com/babysteps/blog/2013/11/04/intermingled-parameter-lists/ +/// [Early vs Late bound parameters]: https://rustc-dev-guide.rust-lang.org/early-late-parameters.html /// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/hrtb.html #[derive_where(Clone, Copy, Hash, PartialEq; I: Interner)] #[derive(GenericTypeVisitable)] @@ -160,7 +166,7 @@ pub enum RegionKind { /// more info about early and late bound lifetime parameters. ReLateParam(I::LateParamRegion), - /// Static data that has an "infinite" lifetime. Top in the region lattice. + /// Static data that has an "infinite" lifetime. Bottom in the region lattice. ReStatic, /// A region variable. Should not exist outside of type inference. diff --git a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile index ab29d0e80ac2a..ff80d0e3c2960 100644 --- a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile @@ -152,16 +152,14 @@ ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft CC_riscv64gc_unknown_none_elf=riscv64-unknown-elf-gcc \ CFLAGS_riscv64gc_unknown_none_elf=-march=rv64gc -mabi=lp64 -ENV RUST_CONFIGURE_ARGS \ - --musl-root-armv5te=/musl-armv5te \ +ENV RUST_CONFIGURE_ARGS="--musl-root-armv5te=/musl-armv5te \ --musl-root-arm=/musl-arm \ --musl-root-armhf=/musl-armhf \ --musl-root-armv7hf=/musl-armv7hf \ - --disable-docs + --disable-docs" -ENV SCRIPT \ - python3 ../x.py --stage 2 test --host='' --target $RUN_MAKE_TARGETS tests/run-make tests/run-make-cargo && \ - python3 ../x.py dist --host='' --target $TARGETS +ENV SCRIPT="python3 ../x.py --stage 2 test --host= --target $RUN_MAKE_TARGETS tests/run-make tests/run-make-cargo && \ + python3 ../x.py dist --host= --target $TARGETS" # sccache COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile index dacf3c0db2026..ac169d76ee864 100644 --- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile @@ -95,16 +95,14 @@ RUN /tmp/freebsd-toolchain.sh i686 COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -ENV CARGO_TARGET_X86_64_UNKNOWN_FUCHSIA_AR /usr/local/bin/llvm-ar -ENV CARGO_TARGET_X86_64_UNKNOWN_FUCHSIA_RUSTFLAGS \ --C link-arg=--sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot \ +ENV CARGO_TARGET_X86_64_UNKNOWN_FUCHSIA_AR="/usr/local/bin/llvm-ar" +ENV CARGO_TARGET_X86_64_UNKNOWN_FUCHSIA_RUSTFLAGS="-C link-arg=--sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot \ -Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot/lib \ --Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/lib -ENV CARGO_TARGET_AARCH64_UNKNOWN_FUCHSIA_AR /usr/local/bin/llvm-ar -ENV CARGO_TARGET_AARCH64_UNKNOWN_FUCHSIA_RUSTFLAGS \ --C link-arg=--sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/arm64/sysroot \ +-Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/lib" +ENV CARGO_TARGET_AARCH64_UNKNOWN_FUCHSIA_AR="/usr/local/bin/llvm-ar" +ENV CARGO_TARGET_AARCH64_UNKNOWN_FUCHSIA_RUSTFLAGS="-C link-arg=--sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/arm64/sysroot \ -Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/arm64/sysroot/lib \ --Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/arm64/lib +-Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/arm64/lib" ENV TARGETS=x86_64-unknown-fuchsia ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia @@ -136,8 +134,8 @@ RUN ln -s /usr/include/x86_64-linux-gnu/asm /usr/local/include/asm # musl-gcc can't find libgcc_s.so.1 since it doesn't use the standard search paths. RUN ln -s /usr/riscv64-linux-gnu/lib/libgcc_s.so.1 /usr/lib/gcc-cross/riscv64-linux-gnu/11/ -ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --enable-llvm-bitcode-linker --disable-docs \ +ENV RUST_CONFIGURE_ARGS="--enable-extended --enable-lld --enable-llvm-bitcode-linker --disable-docs \ --musl-root-armv7=/musl-armv7 \ - --musl-root-riscv64gc=/musl-riscv64gc + --musl-root-riscv64gc=/musl-riscv64gc" -ENV SCRIPT python3 ../x.py dist --host='' --target $TARGETS && python3 ../x.py dist --host='' --set build.sanitizers=true --target $TARGETS_SANITIZERS +ENV SCRIPT="python3 ../x.py dist --host= --target $TARGETS && python3 ../x.py dist --host= --set build.sanitizers=true --target $TARGETS_SANITIZERS" diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile index 6512240730cc8..10ea2646bf3b9 100644 --- a/src/ci/docker/host-x86_64/test-various/Dockerfile +++ b/src/ci/docker/host-x86_64/test-various/Dockerfile @@ -45,9 +45,8 @@ RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-3 tar -xz ENV WASI_SDK_PATH=/wasi-sdk-30.0-x86_64-linux -ENV RUST_CONFIGURE_ARGS \ - --musl-root-x86_64=/usr/local/x86_64-linux-musl \ - --set rust.lld +ENV RUST_CONFIGURE_ARGS="--musl-root-x86_64=/usr/local/x86_64-linux-musl \ + --set rust.lld" # Some run-make tests have assertions about code size, and enabling debug # assertions in libstd causes the binary to be much bigger than it would @@ -58,10 +57,10 @@ ENV NO_OVERFLOW_CHECKS=1 RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v38.0.4/wasmtime-v38.0.4-x86_64-linux.tar.xz | \ tar -xJ -ENV PATH "$PATH:/wasmtime-v38.0.4-x86_64-linux" +ENV PATH="$PATH:/wasmtime-v38.0.4-x86_64-linux" ENV WASM_WASIP_TARGET=wasm32-wasip1 -ENV WASM_WASIP_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_WASIP_TARGET \ +ENV WASM_WASIP_SCRIPT="python3 /checkout/x.py --stage 2 test --host= --target $WASM_WASIP_TARGET \ tests/run-make \ tests/run-make-cargo \ tests/ui \ @@ -69,18 +68,18 @@ ENV WASM_WASIP_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $ tests/codegen-units \ tests/codegen-llvm \ tests/assembly-llvm \ - library/core + library/core" ENV NVPTX_TARGETS=nvptx64-nvidia-cuda -ENV NVPTX_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $NVPTX_TARGETS \ +ENV NVPTX_SCRIPT="python3 /checkout/x.py --stage 2 test --host= --target $NVPTX_TARGETS \ tests/run-make \ tests/run-make-cargo \ - tests/assembly-llvm + tests/assembly-llvm" ENV MUSL_TARGETS=x86_64-unknown-linux-musl \ CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \ CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++ -ENV MUSL_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $MUSL_TARGETS +ENV MUSL_SCRIPT="python3 /checkout/x.py --stage 2 test --host= --target $MUSL_TARGETS" ENV UEFI_TARGETS=aarch64-unknown-uefi,i686-unknown-uefi,x86_64-unknown-uefi \ CC_aarch64_unknown_uefi=clang-11 \ @@ -89,9 +88,9 @@ ENV UEFI_TARGETS=aarch64-unknown-uefi,i686-unknown-uefi,x86_64-unknown-uefi \ CXX_i686_unknown_uefi=clang++-11 \ CC_x86_64_unknown_uefi=clang-11 \ CXX_x86_64_unknown_uefi=clang++-11 -ENV UEFI_SCRIPT python3 /checkout/x.py --stage 2 build --host='' --target $UEFI_TARGETS && \ +ENV UEFI_SCRIPT="python3 /checkout/x.py --stage 2 build --host= --target $UEFI_TARGETS && \ python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target aarch64-unknown-uefi && \ python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target i686-unknown-uefi && \ - python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target x86_64-unknown-uefi + python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target x86_64-unknown-uefi" -ENV SCRIPT $WASM_WASIP_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT && $UEFI_SCRIPT +ENV SCRIPT="$WASM_WASIP_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT && $UEFI_SCRIPT" diff --git a/src/doc/rustc-dev-guide/src/early-late-parameters.md b/src/doc/rustc-dev-guide/src/early-late-parameters.md index c472bdc2c4812..7651dee4ae23e 100644 --- a/src/doc/rustc-dev-guide/src/early-late-parameters.md +++ b/src/doc/rustc-dev-guide/src/early-late-parameters.md @@ -3,6 +3,12 @@ > **NOTE**: This chapter largely talks about early/late bound as being solely relevant when discussing function item types/function definitions. This is potentially not completely true, async blocks and closures should likely be discussed somewhat in this chapter. +See also these blog posts from when the distinction between early and late bound parameters was +introduced: [Intermingled parameter lists] and [Intermingled parameter lists, take 2]. + +[Intermingled parameter lists]: https://smallcultfollowing.com/babysteps/blog/2013/10/29/intermingled-parameter-lists/ +[Intermingled parameter lists, take 2]: https://smallcultfollowing.com/babysteps/blog/2013/11/04/intermingled-parameter-lists/ + ## What does it mean to be "early" bound or "late" bound Every function definition has a corresponding ZST that implements the `Fn*` traits known as a [function item type][function_item_type]. This part of the chapter will talk a little bit about the "desugaring" of function item types as it is useful context for explaining the difference between early bound and late bound generic parameters. diff --git a/src/doc/rustc-dev-guide/src/tests/compiletest.md b/src/doc/rustc-dev-guide/src/tests/compiletest.md index 6ca9653c18540..a239310d124ec 100644 --- a/src/doc/rustc-dev-guide/src/tests/compiletest.md +++ b/src/doc/rustc-dev-guide/src/tests/compiletest.md @@ -836,3 +836,20 @@ In CI, compare modes are only used in one Linux builder, and only with the follo Note that compare modes are separate to [revisions](#revisions). All revisions are tested when running `./x test tests/ui`, however compare-modes must be manually run individually via the `--compare-mode` flag. + +## Parallel frontend + +Compiletest can be run with the `--parallel-frontend-threads` flag to run the compiler in parallel mode. +This can be used to check that the compiler produces the same output in parallel mode as in non-parallel mode, and to check for any issues that might arise in parallel mode. + +To run the tests in parallel mode, you need to pass the `--parallel-frontend-threads` CLI flag: + +```bash +./x test tests/ui -- --parallel-frontend-threads=N --iteration-count=M +``` + +Where `N` is the number of threads to use for the parallel frontend, and `M` is the number of times to run each test in parallel mode (to increase the chances of catching any non-determinism). + +Also, when running with `--parallel-frontend-threads`, the `compare-output-by-lines` directive would be implied for all tests, since the output from the parallel frontend can be non-deterministic in terms of the order of lines. + +The parallel frontend is available in UI tests only at the moment, and is not currently supported in other test suites. diff --git a/src/doc/rustc-dev-guide/src/tests/directives.md b/src/doc/rustc-dev-guide/src/tests/directives.md index ac76a2e15d9ad..f160f3fffc10e 100644 --- a/src/doc/rustc-dev-guide/src/tests/directives.md +++ b/src/doc/rustc-dev-guide/src/tests/directives.md @@ -148,6 +148,7 @@ Some examples of `X` in `ignore-X` or `only-X`: - When [remote testing] is used: `remote` - When particular debuggers are being tested: `cdb`, `gdb`, `lldb` - When particular debugger versions are matched: `ignore-gdb-version` +- When the [parallel frontend] is enabled: `ignore-parallel-frontend` - Specific [compare modes]: `compare-mode-polonius`, `compare-mode-chalk`, `compare-mode-split-dwarf`, `compare-mode-split-dwarf-single` - The two different test modes used by coverage tests: @@ -233,6 +234,7 @@ The following directives will check LLVM support: See also [Debuginfo tests](compiletest.md#debuginfo-tests) for directives for ignoring debuggers. [remote testing]: running.md#running-tests-on-a-remote-machine +[parallel frontend]: compiletest.md#parallel-frontend [compare modes]: ui.md#compare-modes [`x86_64-gnu-debug`]: https://github.com/rust-lang/rust/blob/ab3dba92db355b8d97db915a2dca161a117e959c/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile#L32 [`aarch64-gnu-debug`]: https://github.com/rust-lang/rust/blob/20c909ff9cdd88d33768a4ddb8952927a675b0ad/src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile#L32 diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 54c0f2ec74309..bc94a81ba3b52 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -721,9 +721,17 @@ pub struct Config { /// /// This is forwarded from bootstrap's `jobs` configuration. pub jobs: u32, + + /// Number of parallel threads to use for the frontend when building test artifacts. + pub parallel_frontend_threads: u32, + /// Number of times to execute each test. + pub iteration_count: u32, } impl Config { + pub const DEFAULT_PARALLEL_FRONTEND_THREADS: u32 = 1; + pub const DEFAULT_ITERATION_COUNT: u32 = 1; + /// FIXME: this run scheme is... confusing. pub fn run_enabled(&self) -> bool { self.run.unwrap_or_else(|| { @@ -834,6 +842,17 @@ impl Config { || self.target_cfg().os == "emscripten"; !unsupported_target } + + /// Whether the parallel frontend is enabled, + /// which is the case when `parallel_frontend_threads` is not set to `1`. + /// + /// - `0` means auto-detect: use the number of available hardware threads on the host. + /// But we treat it as the parallel frontend being enabled in this case. + /// - `1` means single-threaded (parallel frontend disabled). + /// - `>1` means an explicitly configured thread count. + pub fn parallel_frontend_enabled(&self) -> bool { + self.parallel_frontend_threads != 1 + } } /// Known widths of `target_has_atomic`. diff --git a/src/tools/compiletest/src/directives.rs b/src/tools/compiletest/src/directives.rs index 462d9ae626b0a..b6a9a5b1b9f5f 100644 --- a/src/tools/compiletest/src/directives.rs +++ b/src/tools/compiletest/src/directives.rs @@ -67,7 +67,7 @@ impl EarlyProps { let mut props = EarlyProps::default(); iter_directives( - config.mode, + config, file_directives, // (dummy comment to force args into vertical layout) &mut |ln: &DirectiveLine<'_>| { @@ -362,7 +362,7 @@ impl TestProps { let file_directives = FileDirectives::from_file_contents(testfile, &file_contents); iter_directives( - config.mode, + config, &file_directives, // (dummy comment to force args into vertical layout) &mut |ln: &DirectiveLine<'_>| { @@ -574,43 +574,51 @@ fn check_directive<'a>( } fn iter_directives( - mode: TestMode, + config: &Config, file_directives: &FileDirectives<'_>, it: &mut dyn FnMut(&DirectiveLine<'_>), ) { let testfile = file_directives.path; - // Coverage tests in coverage-run mode always have these extra directives, without needing to - // specify them manually in every test file. - // - // FIXME(jieyouxu): I feel like there's a better way to do this, leaving for later. - if mode == TestMode::CoverageRun { - let extra_directives: &[&str] = &[ - "//@ needs-profiler-runtime", - // FIXME(pietroalbini): this test currently does not work on cross-compiled targets - // because remote-test is not capable of sending back the *.profraw files generated by - // the LLVM instrumentation. - "//@ ignore-cross-compile", - ]; - // Process the extra implied directives, with a dummy line number of 0. - for directive_str in extra_directives { - let directive_line = line_directive(testfile, LineNumber::ZERO, directive_str) - .unwrap_or_else(|| panic!("bad extra-directive line: {directive_str:?}")); - it(&directive_line); + let extra_directives = match config.mode { + TestMode::CoverageRun => { + // Coverage tests in coverage-run mode always have these extra directives, without needing to + // specify them manually in every test file. + // + // FIXME(jieyouxu): I feel like there's a better way to do this, leaving for later. + vec![ + "//@ needs-profiler-runtime", + // FIXME(pietroalbini): this test currently does not work on cross-compiled targets + // because remote-test is not capable of sending back the *.profraw files generated by + // the LLVM instrumentation. + "//@ ignore-cross-compile", + ] + } + TestMode::Codegen if !file_directives.has_explicit_no_std_core_attribute => { + // Note: affects all codegen test suites under test mode `codegen`, e.g. `codegen-llvm`. + // + // Codegen tests automatically receive implied `//@ needs-target-std`, unless + // `#![no_std]`/`#![no_core]` attribute was explicitly seen. The rationale is basically to avoid + // having to manually maintain a bunch of `//@ needs-target-std` directives esp. for targets + // tested/built out-of-tree. + vec!["//@ needs-target-std"] + } + TestMode::Ui if config.parallel_frontend_enabled() => { + // UI tests in parallel-frontend mode always have this extra directive, without needing to + // specify it manually in every test file. + vec!["//@ compare-output-by-lines"] } - } - // Note: affects all codegen test suites under test mode `codegen`, e.g. `codegen-llvm`. - // - // Codegen tests automatically receive implied `//@ needs-target-std`, unless - // `#![no_std]`/`#![no_core]` attribute was explicitly seen. The rationale is basically to avoid - // having to manually maintain a bunch of `//@ needs-target-std` directives esp. for targets - // tested/built out-of-tree. - if mode == TestMode::Codegen && !file_directives.has_explicit_no_std_core_attribute { - let implied_needs_target_std_line = - line_directive(testfile, LineNumber::ZERO, "//@ needs-target-std") - .expect("valid `needs-target-std` directive line"); - it(&implied_needs_target_std_line); + _ => { + // No extra directives for other test modes. + vec![] + } + }; + + for directive_str in extra_directives { + let directive_line = line_directive(testfile, LineNumber::ZERO, directive_str) + .unwrap_or_else(|| panic!("bad extra-directive line: {directive_str:?}")); + it(&directive_line); } for directive_line in &file_directives.lines { @@ -951,55 +959,52 @@ pub(crate) fn make_test_description( let mut should_fail = false; // Scan through the test file to handle `ignore-*`, `only-*`, and `needs-*` directives. - iter_directives( - config.mode, - file_directives, - &mut |ln @ &DirectiveLine { line_number, .. }| { - if !ln.applies_to_test_revision(test_revision) { - return; - } + iter_directives(config, file_directives, &mut |ln @ &DirectiveLine { line_number, .. }| { + if !ln.applies_to_test_revision(test_revision) { + return; + } + + // Parse `aux-*` directives, for use by up-to-date checks. + parse_and_update_aux(config, ln, aux_props); - // Parse `aux-*` directives, for use by up-to-date checks. - parse_and_update_aux(config, ln, aux_props); - - macro_rules! decision { - ($e:expr) => { - match $e { - IgnoreDecision::Ignore { reason } => { - ignore = true; - ignore_message = Some(reason.into()); - } - IgnoreDecision::Error { message } => { - error!("{path}:{line_number}: {message}"); - *poisoned = true; - return; - } - IgnoreDecision::Continue => {} + macro_rules! decision { + ($e:expr) => { + match $e { + IgnoreDecision::Ignore { reason } => { + ignore = true; + ignore_message = Some(reason.into()); } - }; - } + IgnoreDecision::Error { message } => { + error!("{path}:{line_number}: {message}"); + *poisoned = true; + return; + } + IgnoreDecision::Continue => {} + } + }; + } - decision!(cfg::handle_ignore(&cache.cfg_conditions, ln)); - decision!(cfg::handle_only(&cache.cfg_conditions, ln)); - decision!(needs::handle_needs(&cache.needs, config, ln)); - decision!(ignore_llvm(config, ln)); - decision!(ignore_backends(config, ln)); - decision!(needs_backends(config, ln)); - decision!(ignore_cdb(config, ln)); - decision!(ignore_gdb(config, ln)); - decision!(ignore_lldb(config, ln)); - - if config.target == "wasm32-unknown-unknown" - && config.parse_name_directive(ln, directives::CHECK_RUN_RESULTS) - { - decision!(IgnoreDecision::Ignore { - reason: "ignored on WASM as the run results cannot be checked there".into(), - }); - } + decision!(cfg::handle_ignore(&cache.cfg_conditions, ln)); + decision!(cfg::handle_only(&cache.cfg_conditions, ln)); + decision!(needs::handle_needs(&cache.needs, config, ln)); + decision!(ignore_llvm(config, ln)); + decision!(ignore_backends(config, ln)); + decision!(needs_backends(config, ln)); + decision!(ignore_cdb(config, ln)); + decision!(ignore_gdb(config, ln)); + decision!(ignore_lldb(config, ln)); + decision!(ignore_parallel_frontend(config, ln)); + + if config.target == "wasm32-unknown-unknown" + && config.parse_name_directive(ln, directives::CHECK_RUN_RESULTS) + { + decision!(IgnoreDecision::Ignore { + reason: "ignored on WASM as the run results cannot be checked there".into(), + }); + } - should_fail |= config.parse_name_directive(ln, "should-fail"); - }, - ); + should_fail |= config.parse_name_directive(ln, "should-fail"); + }); // The `should-fail` annotation doesn't apply to pretty tests, // since we run the pretty printer across all tests by default. @@ -1270,6 +1275,17 @@ fn ignore_llvm(config: &Config, line: &DirectiveLine<'_>) -> IgnoreDecision { IgnoreDecision::Continue } +fn ignore_parallel_frontend(config: &Config, line: &DirectiveLine<'_>) -> IgnoreDecision { + if config.parallel_frontend_enabled() + && config.parse_name_directive(line, "ignore-parallel-frontend") + { + return IgnoreDecision::Ignore { + reason: "ignored when the parallel frontend is enabled".into(), + }; + } + IgnoreDecision::Continue +} + enum IgnoreDecision { Ignore { reason: String }, Continue, diff --git a/src/tools/compiletest/src/directives/cfg.rs b/src/tools/compiletest/src/directives/cfg.rs index 6431eb6b090b1..2587acb7fe106 100644 --- a/src/tools/compiletest/src/directives/cfg.rs +++ b/src/tools/compiletest/src/directives/cfg.rs @@ -11,6 +11,7 @@ const EXTERNAL_IGNORES_LIST: &[&str] = &[ "ignore-backends", "ignore-gdb-version", "ignore-llvm-version", + "ignore-parallel-frontend", "ignore-pass", // tidy-alphabetical-end ]; diff --git a/src/tools/compiletest/src/directives/directive_names.rs b/src/tools/compiletest/src/directives/directive_names.rs index 2fc5c0e8ec1ee..eaf91ff26158d 100644 --- a/src/tools/compiletest/src/directives/directive_names.rs +++ b/src/tools/compiletest/src/directives/directive_names.rs @@ -101,6 +101,7 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "ignore-nvptx64", "ignore-nvptx64-nvidia-cuda", "ignore-openbsd", + "ignore-parallel-frontend", "ignore-pass", "ignore-powerpc", "ignore-powerpc64", diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs index 82e8a0da6b609..6dae2ca0b4759 100644 --- a/src/tools/compiletest/src/lib.rs +++ b/src/tools/compiletest/src/lib.rs @@ -219,7 +219,14 @@ fn parse_config(args: Vec) -> Config { "CODEGEN BACKEND [NAME | PATH]", ) .optflag("", "bypass-ignore-backends", "ignore `//@ ignore-backends` directives") - .reqopt("", "jobs", "number of parallel jobs bootstrap was configured with", "JOBS"); + .reqopt("", "jobs", "number of parallel jobs bootstrap was configured with", "JOBS") + .optopt( + "", + "parallel-frontend-threads", + "number of parallel threads to use for the frontend when building test artifacts", + "THREADS_COUNT", + ) + .optopt("", "iteration-count", "number of times to execute each test", "COUNT"); let (argv0, args_) = args.split_first().unwrap(); if args.len() == 1 || args[1] == "-h" || args[1] == "--help" { @@ -369,6 +376,20 @@ fn parse_config(args: Vec) -> Config { None => panic!("`--jobs` is required"), }; + let parallel_frontend_threads = match matches.opt_str("parallel-frontend-threads") { + Some(threads) => { + threads.parse::().expect("expected `--parallel-frontend-threads` to be an `u32`") + } + None => Config::DEFAULT_PARALLEL_FRONTEND_THREADS, + }; + let iteration_count = match matches.opt_str("iteration-count") { + Some(count) => { + count.parse::().expect("expected `--iteration-count` to be a positive integer") + } + None => Config::DEFAULT_ITERATION_COUNT, + }; + assert!(iteration_count > 0, "`--iteration-count` must be a positive integer"); + Config { bless: matches.opt_present("bless"), fail_fast: matches.opt_present("fail-fast") @@ -489,6 +510,9 @@ fn parse_config(args: Vec) -> Config { bypass_ignore_backends: matches.opt_present("bypass-ignore-backends"), jobs, + + parallel_frontend_threads, + iteration_count, } } diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 69a9e04afe1ca..b674c6e29d424 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -272,22 +272,26 @@ impl<'test> TestCx<'test> { { self.fatal("cannot use should-ice in a test that is not cfail"); } - match self.config.mode { - TestMode::Pretty => self.run_pretty_test(), - TestMode::DebugInfo => self.run_debuginfo_test(), - TestMode::Codegen => self.run_codegen_test(), - TestMode::RustdocHtml => self.run_rustdoc_html_test(), - TestMode::RustdocJson => self.run_rustdoc_json_test(), - TestMode::CodegenUnits => self.run_codegen_units_test(), - TestMode::Incremental => self.run_incremental_test(), - TestMode::RunMake => self.run_rmake_test(), - TestMode::Ui => self.run_ui_test(), - TestMode::MirOpt => self.run_mir_opt_test(), - TestMode::Assembly => self.run_assembly_test(), - TestMode::RustdocJs => self.run_rustdoc_js_test(), - TestMode::CoverageMap => self.run_coverage_map_test(), // see self::coverage - TestMode::CoverageRun => self.run_coverage_run_test(), // see self::coverage - TestMode::Crashes => self.run_crash_test(), + // Run the test multiple times if requested. + // This is useful for catching flaky tests under the parallel frontend. + for _ in 0..self.config.iteration_count { + match self.config.mode { + TestMode::Pretty => self.run_pretty_test(), + TestMode::DebugInfo => self.run_debuginfo_test(), + TestMode::Codegen => self.run_codegen_test(), + TestMode::RustdocHtml => self.run_rustdoc_html_test(), + TestMode::RustdocJson => self.run_rustdoc_json_test(), + TestMode::CodegenUnits => self.run_codegen_units_test(), + TestMode::Incremental => self.run_incremental_test(), + TestMode::RunMake => self.run_rmake_test(), + TestMode::Ui => self.run_ui_test(), + TestMode::MirOpt => self.run_mir_opt_test(), + TestMode::Assembly => self.run_assembly_test(), + TestMode::RustdocJs => self.run_rustdoc_js_test(), + TestMode::CoverageMap => self.run_coverage_map_test(), // see self::coverage + TestMode::CoverageRun => self.run_coverage_run_test(), // see self::coverage + TestMode::Crashes => self.run_crash_test(), + } } } @@ -1752,6 +1756,14 @@ impl<'test> TestCx<'test> { compiler.arg("-Zwrite-long-types-to-disk=no"); // FIXME: use this for other modes too, for perf? compiler.arg("-Cstrip=debuginfo"); + + if self.config.parallel_frontend_enabled() { + // Currently, we only use multiple threads for the UI test suite, + // because UI tests can effectively verify the parallel frontend and + // require minimal modification. The option will later be extended to + // other test suites. + compiler.arg(&format!("-Zthreads={}", self.config.parallel_frontend_threads)); + } } TestMode::MirOpt => { // We check passes under test to minimize the mir-opt test dump diff --git a/src/tools/compiletest/src/rustdoc_gui_test.rs b/src/tools/compiletest/src/rustdoc_gui_test.rs index f02918ae683b0..c71fd714aa660 100644 --- a/src/tools/compiletest/src/rustdoc_gui_test.rs +++ b/src/tools/compiletest/src/rustdoc_gui_test.rs @@ -140,5 +140,7 @@ fn incomplete_config_for_rustdoc_gui_test() -> Config { override_codegen_backend: None, bypass_ignore_backends: Default::default(), jobs: Default::default(), + parallel_frontend_threads: Config::DEFAULT_PARALLEL_FRONTEND_THREADS, + iteration_count: Config::DEFAULT_ITERATION_COUNT, } } diff --git a/tests/assembly-llvm/asm/aarch64-types.rs b/tests/assembly-llvm/asm/aarch64-types.rs index a304bf8688daa..fde0aad946951 100644 --- a/tests/assembly-llvm/asm/aarch64-types.rs +++ b/tests/assembly-llvm/asm/aarch64-types.rs @@ -98,8 +98,8 @@ pub unsafe fn issue_75761() { macro_rules! check { ($func:ident $ty:ident $class:ident $mov:literal $modifier:literal) => { - // FIXME(f16_f128): Change back to `$func(x: $ty) -> $ty` once arm64ec can pass and return - // `f16` and `f128` without LLVM erroring. + // FIXME(f128): Change back to `$func(x: $ty) -> $ty` once arm64ec can pass and return + // `f128` without LLVM erroring. // LLVM issue: #[no_mangle] pub unsafe fn $func(inp: &$ty, out: &mut $ty) { @@ -117,7 +117,7 @@ macro_rules! check { macro_rules! check_reg { ($func:ident $ty:ident $reg:tt $mov:literal) => { - // FIXME(f16_f128): See FIXME in `check!` + // FIXME(f128): See FIXME in `check!` #[no_mangle] pub unsafe fn $func(inp: &$ty, out: &mut $ty) { let x = *inp; diff --git a/tests/ui/README.md b/tests/ui/README.md index 9911353af5cd0..848df58f27143 100644 --- a/tests/ui/README.md +++ b/tests/ui/README.md @@ -344,10 +344,6 @@ Tests for `#![feature(coverage_attribute)]`. See [Tracking issue for function at Tests for crate resolution and loading behavior, including `extern crate` declarations, `--extern` flags, or the `use` keyword. -## `tests/ui/cross/`: Various tests related to the concept of "cross" - -**FIXME**: The unifying topic of these tests appears to be that their filenames begin with the word "cross". The similarities end there - one test is about "cross-borrowing" a `Box` into `&T`, while another is about a global trait used "across" files. Some of this terminology is really outdated and does not match the current terminology. Additionally, "cross" is also way too generic, it's easy to confuse with cross-compile. - ## `tests/ui/cross-crate/`: Cross-Crate Interaction Tests for behavior spanning multiple crates, including visibility rules, trait implementations, and type resolution across crate boundaries. diff --git a/tests/ui/abi/simd-abi-checks-avx.rs b/tests/ui/abi/simd-abi-checks-avx.rs index 7432381d15b72..c68ba2fb5f890 100644 --- a/tests/ui/abi/simd-abi-checks-avx.rs +++ b/tests/ui/abi/simd-abi-checks-avx.rs @@ -1,7 +1,7 @@ //@ only-x86_64 //@ build-fail //@ compile-flags: -C target-feature=-avx - +//@ ignore-parallel-frontend post-monomorphization errors #![feature(portable_simd)] #![feature(simd_ffi)] #![allow(improper_ctypes_definitions)] diff --git a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs index 645a136eeb4ee..69c4777ecb443 100644 --- a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs +++ b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs @@ -1,7 +1,7 @@ //@ edition:2018 // Test that impl trait does not allow creating recursive types that are // otherwise forbidden when using `async` and `await`. - +//@ ignore-parallel-frontend query cycle async fn rec_1() { //~ ERROR recursion in an async fn rec_2().await; } diff --git a/tests/ui/coercion/no-implicit-box-to-ref-coercion.rs b/tests/ui/coercion/no-implicit-box-to-ref-coercion.rs new file mode 100644 index 0000000000000..f061117d67ed8 --- /dev/null +++ b/tests/ui/coercion/no-implicit-box-to-ref-coercion.rs @@ -0,0 +1,11 @@ +// Test that implicitly converting from `Box` to `&T` is +// forbidden when `T` is a trait. + +struct Foo; +trait Trait { fn foo(&self) {} } +impl Trait for Foo {} + +pub fn main() { + let x: Box = Box::new(Foo); + let _y: &dyn Trait = x; //~ ERROR E0308 +} diff --git a/tests/ui/cross/cross-borrow-trait.stderr b/tests/ui/coercion/no-implicit-box-to-ref-coercion.stderr similarity index 88% rename from tests/ui/cross/cross-borrow-trait.stderr rename to tests/ui/coercion/no-implicit-box-to-ref-coercion.stderr index 5fe80b5a3eef6..da0b28b0149d2 100644 --- a/tests/ui/cross/cross-borrow-trait.stderr +++ b/tests/ui/coercion/no-implicit-box-to-ref-coercion.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/cross-borrow-trait.rs:12:26 + --> $DIR/no-implicit-box-to-ref-coercion.rs:10:26 | LL | let _y: &dyn Trait = x; | ---------- ^ expected `&dyn Trait`, found `Box` diff --git a/tests/ui/const-generics/issues/issue-100313.rs b/tests/ui/const-generics/issues/issue-100313.rs index 1f61356162ca6..3eed2e71ae859 100644 --- a/tests/ui/const-generics/issues/issue-100313.rs +++ b/tests/ui/const-generics/issues/issue-100313.rs @@ -1,5 +1,5 @@ //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend different alloc ids #![allow(incomplete_features)] #![feature(adt_const_params, unsized_const_params)] diff --git a/tests/ui/const-generics/issues/issue-83249.stderr b/tests/ui/const-generics/issues/issue-83249.stderr index 2d561dbd6b1cc..2668348613a40 100644 --- a/tests/ui/const-generics/issues/issue-83249.stderr +++ b/tests/ui/const-generics/issues/issue-83249.stderr @@ -6,7 +6,7 @@ LL | let _ = foo([0; 1]); | | | required by a bound introduced by this call | - = note: cannot satisfy `_: Foo` + = note: the type must implement `Foo` help: the trait `Foo` is implemented for `u8` --> $DIR/issue-83249.rs:8:1 | diff --git a/tests/ui/const-generics/min_const_generics/invalid-patterns.rs b/tests/ui/const-generics/min_const_generics/invalid-patterns.rs index 85f019adf6649..847b51abb6af5 100644 --- a/tests/ui/const-generics/min_const_generics/invalid-patterns.rs +++ b/tests/ui/const-generics/min_const_generics/invalid-patterns.rs @@ -1,6 +1,6 @@ //@ stderr-per-bitwidth //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend different alloc ids use std::mem::transmute; fn get_flag() -> Option { diff --git a/tests/ui/const-ptr/forbidden_slices.rs b/tests/ui/const-ptr/forbidden_slices.rs index fcb0dccf750e3..b7c02e6735b4e 100644 --- a/tests/ui/const-ptr/forbidden_slices.rs +++ b/tests/ui/const-ptr/forbidden_slices.rs @@ -1,7 +1,7 @@ // Strip out raw byte dumps to make comparison platform-independent: //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" - +//@ ignore-parallel-frontend different alloc ids #![feature( slice_from_ptr_range, const_slice_from_ptr_range, diff --git a/tests/ui/const-ptr/out_of_bounds_read.rs b/tests/ui/const-ptr/out_of_bounds_read.rs index b09978badde5f..51accc657b81f 100644 --- a/tests/ui/const-ptr/out_of_bounds_read.rs +++ b/tests/ui/const-ptr/out_of_bounds_read.rs @@ -1,6 +1,6 @@ fn main() { use std::ptr; - +//@ ignore-parallel-frontend different alloc ids const DATA: [u32; 1] = [42]; const PAST_END_PTR: *const u32 = unsafe { DATA.as_ptr().add(1) }; diff --git a/tests/ui/consts/chained-constants-stackoverflow.rs b/tests/ui/consts/chained-constants-stackoverflow.rs index 0f0ce40a1edcc..0775ea56bbe00 100644 --- a/tests/ui/consts/chained-constants-stackoverflow.rs +++ b/tests/ui/consts/chained-constants-stackoverflow.rs @@ -1,5 +1,5 @@ //@ run-pass - +//@ ignore-parallel-frontend queries overflow the depth limit // https://github.com/rust-lang/rust/issues/34997 pub const CST_1: u32 = 0; diff --git a/tests/ui/consts/const-compare-bytes-ub.rs b/tests/ui/consts/const-compare-bytes-ub.rs index 7e3df92a2bf5a..f30507858f209 100644 --- a/tests/ui/consts/const-compare-bytes-ub.rs +++ b/tests/ui/consts/const-compare-bytes-ub.rs @@ -1,5 +1,5 @@ //@ check-fail - +//@ ignore-parallel-frontend different alloc ids #![feature(core_intrinsics, const_cmp)] use std::intrinsics::compare_bytes; use std::mem::MaybeUninit; diff --git a/tests/ui/consts/const-err-enum-discriminant.rs b/tests/ui/consts/const-err-enum-discriminant.rs index 5567460058434..f6142707f9223 100644 --- a/tests/ui/consts/const-err-enum-discriminant.rs +++ b/tests/ui/consts/const-err-enum-discriminant.rs @@ -1,5 +1,5 @@ //@ stderr-per-bitwidth - +//@ ignore-parallel-frontend different alloc ids #[derive(Copy, Clone)] union Foo { a: isize, diff --git a/tests/ui/consts/const-eval/c-variadic-fail.rs b/tests/ui/consts/const-eval/c-variadic-fail.rs index b5a400a8bf255..2cf5d05cb248f 100644 --- a/tests/ui/consts/const-eval/c-variadic-fail.rs +++ b/tests/ui/consts/const-eval/c-variadic-fail.rs @@ -1,5 +1,5 @@ //@ build-fail - +//@ ignore-parallel-frontend different alloc ids #![feature(c_variadic)] #![feature(const_c_variadic)] #![feature(const_trait_impl)] diff --git a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs index 5720d6ea91ed5..c6aae902c8bdb 100644 --- a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs +++ b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs @@ -1,7 +1,7 @@ //@ only-x86_64 //@ stderr-per-bitwidth //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend different alloc ids #[repr(C)] union Nonsense { u: usize, diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs index c54115de2045d..3ef18a5f43695 100644 --- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs +++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs @@ -3,7 +3,7 @@ #![feature(core_intrinsics)] #![feature(const_heap)] use std::intrinsics; - +//@ ignore-parallel-frontend different alloc ids const BAR: &i32 = unsafe { //~ ERROR: uninitialized memory // Make the pointer immutable to avoid errors related to mutable pointers in constants. &*(intrinsics::const_make_global(intrinsics::const_allocate(4, 4)) as *const i32) diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs index de9fc5d092137..a377ee35d92b2 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs @@ -1,6 +1,6 @@ #![feature(core_intrinsics)] #![feature(const_heap)] - +//@ ignore-parallel-frontend different alloc ids // Strip out raw byte dumps to make comparison platform-independent: //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs index 5b7cd039b9baa..bc9227b31f807 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs @@ -1,6 +1,6 @@ #![feature(core_intrinsics)] #![feature(const_heap)] - +//@ ignore-parallel-frontend different alloc ids use std::intrinsics; const _X: () = unsafe { diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.rs index 75c3601f2166e..8800188e9036c 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.rs +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.rs @@ -1,6 +1,6 @@ #![feature(core_intrinsics)] #![feature(const_heap)] - +//@ ignore-parallel-frontend different alloc ids use std::intrinsics; const _X: () = unsafe { diff --git a/tests/ui/consts/const-eval/heap/make-global-dangling.rs b/tests/ui/consts/const-eval/heap/make-global-dangling.rs index f4c5929bc416d..12b9ca7a6980f 100644 --- a/tests/ui/consts/const-eval/heap/make-global-dangling.rs +++ b/tests/ui/consts/const-eval/heap/make-global-dangling.rs @@ -1,5 +1,5 @@ // Ensure that we can't call `const_make_global` on dangling pointers. - +//@ ignore-parallel-frontend different alloc ids #![feature(core_intrinsics)] #![feature(const_heap)] diff --git a/tests/ui/consts/const-eval/heap/make-global-other.rs b/tests/ui/consts/const-eval/heap/make-global-other.rs index 4e2a59de13edc..9250f7a55be41 100644 --- a/tests/ui/consts/const-eval/heap/make-global-other.rs +++ b/tests/ui/consts/const-eval/heap/make-global-other.rs @@ -1,5 +1,5 @@ // Ensure that we can't call `const_make_global` on pointers not in the current interpreter. - +//@ ignore-parallel-frontend different alloc ids #![feature(core_intrinsics)] #![feature(const_heap)] diff --git a/tests/ui/consts/const-eval/heap/make-global-twice.rs b/tests/ui/consts/const-eval/heap/make-global-twice.rs index 0cd617cea3e6e..a4d01170812cc 100644 --- a/tests/ui/consts/const-eval/heap/make-global-twice.rs +++ b/tests/ui/consts/const-eval/heap/make-global-twice.rs @@ -1,5 +1,5 @@ // Ensure that we can't call `const_make_global` twice. - +//@ ignore-parallel-frontend different alloc ids #![feature(core_intrinsics)] #![feature(const_heap)] diff --git a/tests/ui/consts/const-eval/heap/ptr_made_global_mutated.rs b/tests/ui/consts/const-eval/heap/ptr_made_global_mutated.rs index bea2a5949c261..c405f73160481 100644 --- a/tests/ui/consts/const-eval/heap/ptr_made_global_mutated.rs +++ b/tests/ui/consts/const-eval/heap/ptr_made_global_mutated.rs @@ -2,7 +2,7 @@ #![feature(core_intrinsics)] #![feature(const_heap)] use std::intrinsics; - +//@ ignore-parallel-frontend different alloc ids const A: &u8 = unsafe { let ptr = intrinsics::const_allocate(1, 1); *ptr = 1; diff --git a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs index 6777bee050a16..dbe507e3cd137 100644 --- a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs +++ b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs @@ -1,5 +1,5 @@ //@ build-fail - +//@ ignore-parallel-frontend post-monomorphization errors // Regression test for #66975 #![warn(unconditional_panic)] #![feature(never_type)] diff --git a/tests/ui/consts/const-eval/issue-49296.rs b/tests/ui/consts/const-eval/issue-49296.rs index a427b642899a5..35797fbf248bf 100644 --- a/tests/ui/consts/const-eval/issue-49296.rs +++ b/tests/ui/consts/const-eval/issue-49296.rs @@ -1,5 +1,5 @@ // issue-49296: Unsafe shenigans in constants can result in missing errors - +//@ ignore-parallel-frontend different alloc ids use std::mem::transmute; const fn wat(x: u64) -> &'static u64 { diff --git a/tests/ui/consts/const-eval/issue-50814-2.rs b/tests/ui/consts/const-eval/issue-50814-2.rs index 1b917a0916da3..34a200e2887b9 100644 --- a/tests/ui/consts/const-eval/issue-50814-2.rs +++ b/tests/ui/consts/const-eval/issue-50814-2.rs @@ -2,7 +2,7 @@ //@ revisions: normal mir-opt //@ [mir-opt]compile-flags: -Zmir-opt-level=4 //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend post-monomorphization errors trait C { const BOO: usize; } diff --git a/tests/ui/consts/const-eval/issue-50814.rs b/tests/ui/consts/const-eval/issue-50814.rs index 011f065ad814b..3901a2c0c9316 100644 --- a/tests/ui/consts/const-eval/issue-50814.rs +++ b/tests/ui/consts/const-eval/issue-50814.rs @@ -1,6 +1,6 @@ //@ build-fail //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend post-monomorphization errors trait Unsigned { const MAX: u8; } diff --git a/tests/ui/consts/const-eval/ptr_fragments_mixed.rs b/tests/ui/consts/const-eval/ptr_fragments_mixed.rs index 24169eac4780d..471d464055960 100644 --- a/tests/ui/consts/const-eval/ptr_fragments_mixed.rs +++ b/tests/ui/consts/const-eval/ptr_fragments_mixed.rs @@ -1,6 +1,6 @@ //! This mixes fragments from different pointers, in a way that we should not accept. //! See . - +//@ ignore-parallel-frontend different alloc ids static A: u8 = 123; static B: u8 = 123; diff --git a/tests/ui/consts/const-eval/raw-bytes.rs b/tests/ui/consts/const-eval/raw-bytes.rs index 199f4d1ea0e10..274b1ae039fbc 100644 --- a/tests/ui/consts/const-eval/raw-bytes.rs +++ b/tests/ui/consts/const-eval/raw-bytes.rs @@ -3,7 +3,7 @@ // ignore-tidy-linelength //@ normalize-stderr: "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼" -> "╾ALLOC_ID$1╼" //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend different alloc ids #![allow(invalid_value, unnecessary_transmutes)] #![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)] diff --git a/tests/ui/consts/const-eval/raw-pointer-ub.rs b/tests/ui/consts/const-eval/raw-pointer-ub.rs index df7bc2fe4fb18..0998617b5b71d 100644 --- a/tests/ui/consts/const-eval/raw-pointer-ub.rs +++ b/tests/ui/consts/const-eval/raw-pointer-ub.rs @@ -4,7 +4,7 @@ const MISALIGNED_LOAD: () = unsafe { let _val = *ptr; //~NOTE: failed here //~^ERROR: based on pointer with alignment 1, but alignment 4 is required }; - +//@ ignore-parallel-frontend different alloc ids const MISALIGNED_STORE: () = unsafe { let mut mem = [0u32; 8]; let ptr = mem.as_mut_ptr().byte_add(1); diff --git a/tests/ui/consts/const-eval/read_partial_ptr.rs b/tests/ui/consts/const-eval/read_partial_ptr.rs index bccef9c0bc6ca..5248f92a92db4 100644 --- a/tests/ui/consts/const-eval/read_partial_ptr.rs +++ b/tests/ui/consts/const-eval/read_partial_ptr.rs @@ -1,5 +1,5 @@ //! Ensure we error when trying to load from a pointer whose provenance has been messed with. - +//@ ignore-parallel-frontend different alloc ids const PARTIAL_OVERWRITE: () = { let mut p = &42; // Overwrite one byte with a no-provenance value. diff --git a/tests/ui/consts/const-eval/ub-enum-overwrite.rs b/tests/ui/consts/const-eval/ub-enum-overwrite.rs index 005f3c78c1d7d..a1bd49f53acea 100644 --- a/tests/ui/consts/const-eval/ub-enum-overwrite.rs +++ b/tests/ui/consts/const-eval/ub-enum-overwrite.rs @@ -2,7 +2,7 @@ enum E { A(u8), B, } - +//@ ignore-parallel-frontend different alloc ids const _: u8 = { let mut e = E::A(1); let p = if let E::A(x) = &mut e { x as *mut u8 } else { unreachable!() }; diff --git a/tests/ui/consts/const-eval/ub-enum.rs b/tests/ui/consts/const-eval/ub-enum.rs index 63029e17da229..61ab3581e3479 100644 --- a/tests/ui/consts/const-eval/ub-enum.rs +++ b/tests/ui/consts/const-eval/ub-enum.rs @@ -4,7 +4,7 @@ //@ normalize-stderr: "0x0+" -> "0x0" //@ normalize-stderr: "0x[0-9](\.\.|\])" -> "0x%$1" //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend different alloc ids #![feature(never_type)] #![allow(invalid_value, unnecessary_transmutes)] diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs index 4185b0261b296..09129012e083c 100644 --- a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs +++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs @@ -12,7 +12,7 @@ //@ stderr-per-bitwidth //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend different alloc ids trait Trait {} const INVALID_VTABLE_ALIGNMENT: &dyn Trait = diff --git a/tests/ui/consts/const-eval/ub-nonnull.rs b/tests/ui/consts/const-eval/ub-nonnull.rs index 851f3996cd104..daa4c40f98a96 100644 --- a/tests/ui/consts/const-eval/ub-nonnull.rs +++ b/tests/ui/consts/const-eval/ub-nonnull.rs @@ -2,7 +2,7 @@ //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP" //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend different alloc ids #![allow(invalid_value)] // make sure we cannot allow away the errors tested here #![feature(rustc_attrs, ptr_metadata)] diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs index a5fdde1f9a4e9..f7421ee344463 100644 --- a/tests/ui/consts/const-eval/ub-ref-ptr.rs +++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs @@ -6,7 +6,7 @@ //@ normalize-stderr: "0x[0-9](\.\.|\])" -> "0x%$1" #![feature(rustc_attrs)] #![allow(invalid_value)] - +//@ ignore-parallel-frontend different alloc ids use std::mem; #[repr(C)] diff --git a/tests/ui/consts/const-eval/ub-upvars.rs b/tests/ui/consts/const-eval/ub-upvars.rs index c5bf074ec4626..7270d90bf7927 100644 --- a/tests/ui/consts/const-eval/ub-upvars.rs +++ b/tests/ui/consts/const-eval/ub-upvars.rs @@ -1,7 +1,7 @@ //@ edition:2015..2021 //@ stderr-per-bitwidth #![allow(invalid_value)] // make sure we cannot allow away the errors tested here - +//@ ignore-parallel-frontend different alloc ids use std::mem; const BAD_UPVAR: &dyn FnOnce() = &{ //~ ERROR null reference diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.rs b/tests/ui/consts/const-eval/ub-wide-ptr.rs index 0bbb104c0322c..6297d2f3d3af3 100644 --- a/tests/ui/consts/const-eval/ub-wide-ptr.rs +++ b/tests/ui/consts/const-eval/ub-wide-ptr.rs @@ -3,7 +3,7 @@ #![feature(ptr_metadata)] use std::{ptr, mem}; - +//@ ignore-parallel-frontend different alloc ids // Strip out raw byte dumps to make comparison platform-independent: //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" diff --git a/tests/ui/consts/const-eval/union-const-eval-field.rs b/tests/ui/consts/const-eval/union-const-eval-field.rs index 2c9061a7a50f8..92d056b3b1ef8 100644 --- a/tests/ui/consts/const-eval/union-const-eval-field.rs +++ b/tests/ui/consts/const-eval/union-const-eval-field.rs @@ -1,7 +1,7 @@ //@ dont-require-annotations: NOTE //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" //@ normalize-stderr: "([[:xdigit:]]{2}\s){4}(__\s){4}\s+│\s+([?|\.]){4}\W{4}" -> "HEX_DUMP" - +//@ ignore-parallel-frontend different alloc ids type Field1 = i32; type Field2 = f32; type Field3 = i64; diff --git a/tests/ui/consts/const-eval/union-ice.rs b/tests/ui/consts/const-eval/union-ice.rs index 7a4909e8ce281..055a130cf0e89 100644 --- a/tests/ui/consts/const-eval/union-ice.rs +++ b/tests/ui/consts/const-eval/union-ice.rs @@ -1,5 +1,5 @@ //@ only-x86_64 - +//@ ignore-parallel-frontend different alloc ids type Field1 = i32; type Field3 = i64; diff --git a/tests/ui/consts/const-eval/union-ub.rs b/tests/ui/consts/const-eval/union-ub.rs index 0fa5d31285604..8de54f5749f35 100644 --- a/tests/ui/consts/const-eval/union-ub.rs +++ b/tests/ui/consts/const-eval/union-ub.rs @@ -1,6 +1,6 @@ //@ stderr-per-bitwidth //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend different alloc ids #[repr(C)] union DummyUnion { unit: (), diff --git a/tests/ui/consts/const-item-no-type/in-macro.rs b/tests/ui/consts/const-item-no-type/in-macro.rs index c200a1fd0b41e..49bd3862852ec 100644 --- a/tests/ui/consts/const-item-no-type/in-macro.rs +++ b/tests/ui/consts/const-item-no-type/in-macro.rs @@ -8,7 +8,7 @@ macro_rules! suite { )* } } - +//@ ignore-parallel-frontend different infer type: bool suite! { len; is_empty; diff --git a/tests/ui/consts/copy-intrinsic.rs b/tests/ui/consts/copy-intrinsic.rs index 480f1c5f460d0..5329e5bc242ed 100644 --- a/tests/ui/consts/copy-intrinsic.rs +++ b/tests/ui/consts/copy-intrinsic.rs @@ -1,6 +1,6 @@ // ignore-tidy-linelength #![feature(core_intrinsics)] - +//@ ignore-parallel-frontend different alloc ids use std::intrinsics::{copy, copy_nonoverlapping}; use std::mem; diff --git a/tests/ui/consts/interior-mut-const-via-union.rs b/tests/ui/consts/interior-mut-const-via-union.rs index 5e624671aee02..cba3b36bd98a0 100644 --- a/tests/ui/consts/interior-mut-const-via-union.rs +++ b/tests/ui/consts/interior-mut-const-via-union.rs @@ -3,7 +3,7 @@ // //@ build-fail //@ stderr-per-bitwidth - +//@ ignore-parallel-frontend different alloc ids use std::cell::Cell; use std::mem::ManuallyDrop; diff --git a/tests/ui/consts/issue-63952.rs b/tests/ui/consts/issue-63952.rs index fce6013b4d310..c0ee7a5dc1e7e 100644 --- a/tests/ui/consts/issue-63952.rs +++ b/tests/ui/consts/issue-63952.rs @@ -1,6 +1,6 @@ // Regression test for #63952, shouldn't hang. //@ stderr-per-bitwidth - +//@ ignore-parallel-frontend different alloc ids #[repr(C)] #[derive(Copy, Clone)] struct SliceRepr { diff --git a/tests/ui/consts/issue-79690.rs b/tests/ui/consts/issue-79690.rs index 24e3220155d18..5e1e65cdb8d57 100644 --- a/tests/ui/consts/issue-79690.rs +++ b/tests/ui/consts/issue-79690.rs @@ -1,7 +1,7 @@ //@ ignore-32bit // This test gives a different error on 32-bit architectures. //@ stderr-per-bitwidth - +//@ ignore-parallel-frontend different alloc ids union Transmute { t: T, u: U, diff --git a/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs b/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs index 0e87442f6a698..27eb9a6c7c344 100644 --- a/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs +++ b/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs @@ -1,6 +1,6 @@ //@ stderr-per-bitwidth //@ compile-flags: -Zunleash-the-miri-inside-of-you - +//@ ignore-parallel-frontend different alloc ids // All "inner" allocations that come with a `static` are interned immutably. This means it is // crucial that we do not accept any form of (interior) mutability there. use std::sync::atomic::*; diff --git a/tests/ui/consts/missing_span_in_backtrace.rs b/tests/ui/consts/missing_span_in_backtrace.rs index b679493eb08eb..897b37b3e65ae 100644 --- a/tests/ui/consts/missing_span_in_backtrace.rs +++ b/tests/ui/consts/missing_span_in_backtrace.rs @@ -1,7 +1,7 @@ //! Check what happens when the error occurs inside a std function that we can't print the span of. //@ ignore-backends: gcc //@ compile-flags: -Z ui-testing=no --diagnostic-width=80 - +//@ ignore-parallel-frontend different alloc ids use std::{ mem::{self, MaybeUninit}, ptr, diff --git a/tests/ui/consts/mono-reachable-invalid-const.rs b/tests/ui/consts/mono-reachable-invalid-const.rs index aba41dabe71f9..3d76e4a65a4e2 100644 --- a/tests/ui/consts/mono-reachable-invalid-const.rs +++ b/tests/ui/consts/mono-reachable-invalid-const.rs @@ -1,5 +1,5 @@ //@ build-fail - +//@ ignore-parallel-frontend post-monomorphization errors struct Bar; impl Bar { diff --git a/tests/ui/consts/offset_ub.rs b/tests/ui/consts/offset_ub.rs index 98a50156a9487..c9c34e19e4dd6 100644 --- a/tests/ui/consts/offset_ub.rs +++ b/tests/ui/consts/offset_ub.rs @@ -1,5 +1,5 @@ use std::ptr; - +//@ ignore-parallel-frontend different alloc ids //@ normalize-stderr: "0xf+" -> "0xf..f" //@ normalize-stderr: "0x7f+" -> "0x7f..f" //@ normalize-stderr: "\d+ bytes" -> "$$BYTES bytes" diff --git a/tests/ui/consts/recursive-zst-static.rs b/tests/ui/consts/recursive-zst-static.rs index 853af6d70eb09..003707aeeab6f 100644 --- a/tests/ui/consts/recursive-zst-static.rs +++ b/tests/ui/consts/recursive-zst-static.rs @@ -1,6 +1,6 @@ //@ revisions: default unleash //@[unleash]compile-flags: -Zunleash-the-miri-inside-of-you - +//@ ignore-parallel-frontend query cycle // This test ensures that we do not allow ZST statics to initialize themselves without ever // actually creating a value of that type. This is important, as the ZST may have private fields // that users can reasonably expect to only get initialized by their own code. Thus unsafe code diff --git a/tests/ui/consts/required-consts/collect-in-called-fn.rs b/tests/ui/consts/required-consts/collect-in-called-fn.rs index 2045b8266c792..d07c0927a16a9 100644 --- a/tests/ui/consts/required-consts/collect-in-called-fn.rs +++ b/tests/ui/consts/required-consts/collect-in-called-fn.rs @@ -4,7 +4,7 @@ //@[opt] compile-flags: -O //! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is //! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090) - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-dead-closure.rs b/tests/ui/consts/required-consts/collect-in-dead-closure.rs index 5f8b6bbb174c4..825336e9d3ef3 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-closure.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-closure.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-dead-drop.rs b/tests/ui/consts/required-consts/collect-in-dead-drop.rs index f7293d162df7b..fa9b8730c11c9 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-drop.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-drop.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.rs b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.rs index e6be9f56cb7a0..a76481b673132 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.rs @@ -4,7 +4,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.rs b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.rs index a86902af52677..4fe05db34d78e 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.rs b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.rs index 4cdb27413540f..a6132ef1fe07e 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.rs @@ -4,7 +4,7 @@ //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. #![feature(type_alias_impl_trait)] - +//@ ignore-parallel-frontend post-monomorphization errors mod m { struct Fail(T); impl Fail { diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn.rs b/tests/ui/consts/required-consts/collect-in-dead-fn.rs index 0c4795801068d..f4627323249d4 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-fn.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-fn.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.rs b/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.rs index 04544cb413984..8808a4e26f0cb 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Late(T); impl Late { const FAIL: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-dead-fnptr.rs b/tests/ui/consts/required-consts/collect-in-dead-fnptr.rs index 4cdb50f4385a1..1a9b99f9868f6 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-fnptr.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-fnptr.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-dead-forget.rs b/tests/ui/consts/required-consts/collect-in-dead-forget.rs index 7586004116c36..bc717edbe73ee 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-forget.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-forget.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This passes without optimizations, so it can (and should) also pass with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); diff --git a/tests/ui/consts/required-consts/collect-in-dead-move.rs b/tests/ui/consts/required-consts/collect-in-dead-move.rs index 4e2d959db32c7..05491136e8d5e 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-move.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-move.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-dead-vtable.rs b/tests/ui/consts/required-consts/collect-in-dead-vtable.rs index d4ad730837730..1ca52064a3fdd 100644 --- a/tests/ui/consts/required-consts/collect-in-dead-vtable.rs +++ b/tests/ui/consts/required-consts/collect-in-dead-vtable.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! This fails without optimizations, so it should also fail with optimizations. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/collect-in-promoted-const.rs b/tests/ui/consts/required-consts/collect-in-promoted-const.rs index c475720938697..415f22fd05dda 100644 --- a/tests/ui/consts/required-consts/collect-in-promoted-const.rs +++ b/tests/ui/consts/required-consts/collect-in-promoted-const.rs @@ -3,7 +3,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! Make sure we error on erroneous consts even if they get promoted. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR evaluation panicked: explicit panic diff --git a/tests/ui/consts/required-consts/interpret-in-const-called-fn.rs b/tests/ui/consts/required-consts/interpret-in-const-called-fn.rs index 9309457e22a46..2d63c620a0384 100644 --- a/tests/ui/consts/required-consts/interpret-in-const-called-fn.rs +++ b/tests/ui/consts/required-consts/interpret-in-const-called-fn.rs @@ -2,7 +2,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! Make sure we error on erroneous consts even if they are unused. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR explicit panic diff --git a/tests/ui/consts/required-consts/interpret-in-promoted.rs b/tests/ui/consts/required-consts/interpret-in-promoted.rs index b223e6d16aa12..cbb1a309006c5 100644 --- a/tests/ui/consts/required-consts/interpret-in-promoted.rs +++ b/tests/ui/consts/required-consts/interpret-in-promoted.rs @@ -2,7 +2,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend post-monomorphization errors //! Make sure we evaluate const fn calls even if they get promoted and their result ignored. const unsafe fn ub() { diff --git a/tests/ui/consts/required-consts/interpret-in-static.rs b/tests/ui/consts/required-consts/interpret-in-static.rs index 19ad6be1c9fa7..edc7b1d01fd6c 100644 --- a/tests/ui/consts/required-consts/interpret-in-static.rs +++ b/tests/ui/consts/required-consts/interpret-in-static.rs @@ -2,7 +2,7 @@ //@[noopt] compile-flags: -Copt-level=0 //@[opt] compile-flags: -O //! Make sure we error on erroneous consts even if they are unused. - +//@ ignore-parallel-frontend post-monomorphization errors struct Fail(T); impl Fail { const C: () = panic!(); //~ERROR explicit panic diff --git a/tests/ui/cross/cross-crate-macro-backtrace/auxiliary/extern_macro_crate.rs b/tests/ui/cross-crate/auxiliary/extern_macro_crate.rs similarity index 100% rename from tests/ui/cross/cross-crate-macro-backtrace/auxiliary/extern_macro_crate.rs rename to tests/ui/cross-crate/auxiliary/extern_macro_crate.rs diff --git a/tests/ui/cross/cross-crate-macro-backtrace/main.rs b/tests/ui/cross-crate/cross-crate-macro-backtrace.rs similarity index 100% rename from tests/ui/cross/cross-crate-macro-backtrace/main.rs rename to tests/ui/cross-crate/cross-crate-macro-backtrace.rs diff --git a/tests/ui/cross/cross-crate-macro-backtrace/main.stderr b/tests/ui/cross-crate/cross-crate-macro-backtrace.stderr similarity index 88% rename from tests/ui/cross/cross-crate-macro-backtrace/main.stderr rename to tests/ui/cross-crate/cross-crate-macro-backtrace.stderr index d6f20b1f8e9f2..9d6a2fbbf0026 100644 --- a/tests/ui/cross/cross-crate-macro-backtrace/main.stderr +++ b/tests/ui/cross-crate/cross-crate-macro-backtrace.stderr @@ -1,5 +1,5 @@ error: 1 positional argument in format string, but no arguments were given - --> $DIR/main.rs:6:5 + --> $DIR/cross-crate-macro-backtrace.rs:6:5 | LL | myprintln!("{}"); | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/cross/cross-borrow-trait.rs b/tests/ui/cross/cross-borrow-trait.rs deleted file mode 100644 index 88ea78e44b3a4..0000000000000 --- a/tests/ui/cross/cross-borrow-trait.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Test that cross-borrowing (implicitly converting from `Box` to `&T`) is -// forbidden when `T` is a trait. - -//@ dont-require-annotations: NOTE - -struct Foo; -trait Trait { fn foo(&self) {} } -impl Trait for Foo {} - -pub fn main() { - let x: Box = Box::new(Foo); - let _y: &dyn Trait = x; //~ ERROR E0308 - //~| NOTE expected reference `&dyn Trait` - //~| NOTE found struct `Box` -} diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.rs b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.rs index 9a72b65da883e..3324444d3351b 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.rs +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.rs @@ -1,6 +1,6 @@ // Test a supertrait cycle where the first trait we find (`A`) is not // a direct participant in the cycle. - +//@ ignore-parallel-frontend query cycle trait A: B { } diff --git a/tests/ui/cycle-trait/issue-12511.rs b/tests/ui/cycle-trait/issue-12511.rs index ea83e3fd9dc2f..1d33b03c57a2c 100644 --- a/tests/ui/cycle-trait/issue-12511.rs +++ b/tests/ui/cycle-trait/issue-12511.rs @@ -1,7 +1,7 @@ trait T1 : T2 { //~^ ERROR cycle detected } - +//@ ignore-parallel-frontend query cycle trait T2 : T1 { } diff --git a/tests/ui/delegation/unsupported.rs b/tests/ui/delegation/unsupported.rs index adb798aab71d0..af3b87ee7c8c5 100644 --- a/tests/ui/delegation/unsupported.rs +++ b/tests/ui/delegation/unsupported.rs @@ -2,7 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ check-fail - +//@ ignore-parallel-frontend query cycle // Next solver revision included because of trait-system-refactor-initiative#234. // If we end up in a query cycle, it should be okay as long as results are the same. diff --git a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs index 9a7a10529fa6f..e04975f9c99b0 100644 --- a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs +++ b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs @@ -1,6 +1,6 @@ // Test that when a trait impl changes, fns whose body uses that trait // must also be recompiled. - +//@ ignore-parallel-frontend dep graph //@ incremental //@ compile-flags: -Z query-dep-graph diff --git a/tests/ui/dep-graph/dep-graph-caller-callee.rs b/tests/ui/dep-graph/dep-graph-caller-callee.rs index b1318a169d9c9..df959a93c9c28 100644 --- a/tests/ui/dep-graph/dep-graph-caller-callee.rs +++ b/tests/ui/dep-graph/dep-graph-caller-callee.rs @@ -3,7 +3,7 @@ //@ incremental //@ compile-flags: -Z query-dep-graph - +//@ ignore-parallel-frontend dep graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/dep-graph/dep-graph-struct-signature.rs b/tests/ui/dep-graph/dep-graph-struct-signature.rs index eea81b26f9f6a..080a1b5c583d2 100644 --- a/tests/ui/dep-graph/dep-graph-struct-signature.rs +++ b/tests/ui/dep-graph/dep-graph-struct-signature.rs @@ -1,6 +1,6 @@ // Test cases where a changing struct appears in the signature of fns // and methods. - +//@ ignore-parallel-frontend dep graph //@ incremental //@ compile-flags: -Z query-dep-graph diff --git a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs index eab4c79210579..397a8c6a39d41 100644 --- a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs +++ b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs @@ -1,6 +1,6 @@ // Test that adding an impl to a trait `Foo` DOES affect functions // that only use `Bar` if they have methods in common. - +//@ ignore-parallel-frontend dep graph //@ incremental //@ compile-flags: -Z query-dep-graph diff --git a/tests/ui/dep-graph/dep-graph-trait-impl.rs b/tests/ui/dep-graph/dep-graph-trait-impl.rs index 5cf0d34e0070a..80925ddfe0c0d 100644 --- a/tests/ui/dep-graph/dep-graph-trait-impl.rs +++ b/tests/ui/dep-graph/dep-graph-trait-impl.rs @@ -1,6 +1,6 @@ // Test that when a trait impl changes, fns whose body uses that trait // must also be recompiled. - +//@ ignore-parallel-frontend dep graph //@ incremental //@ compile-flags: -Z query-dep-graph diff --git a/tests/ui/dep-graph/dep-graph-type-alias.rs b/tests/ui/dep-graph/dep-graph-type-alias.rs index 30cef4b27ef06..1796ebda1fc76 100644 --- a/tests/ui/dep-graph/dep-graph-type-alias.rs +++ b/tests/ui/dep-graph/dep-graph-type-alias.rs @@ -1,5 +1,5 @@ // Test that changing what a `type` points to does not go unnoticed. - +//@ ignore-parallel-frontend dep graph //@ incremental //@ compile-flags: -Z query-dep-graph diff --git a/tests/ui/dep-graph/dep-graph-variance-alias.rs b/tests/ui/dep-graph/dep-graph-variance-alias.rs index 8a67fe6d7271d..5e86e77b24a27 100644 --- a/tests/ui/dep-graph/dep-graph-variance-alias.rs +++ b/tests/ui/dep-graph/dep-graph-variance-alias.rs @@ -1,6 +1,6 @@ // Test that changing what a `type` points to does not go unnoticed // by the variance analysis. - +//@ ignore-parallel-frontend dep graph //@ incremental //@ compile-flags: -Z query-dep-graph diff --git a/tests/ui/error-emitter/multiline-removal-suggestion.rs b/tests/ui/error-emitter/multiline-removal-suggestion.rs index 72e9ea357c9e6..36127ab13123a 100644 --- a/tests/ui/error-emitter/multiline-removal-suggestion.rs +++ b/tests/ui/error-emitter/multiline-removal-suggestion.rs @@ -56,3 +56,4 @@ fn bay() -> Vec<(bool, HashSet)> { .collect() } fn main() {} +//@ ignore-parallel-frontend invalid svg(multiple threads trying to write to the same file) diff --git a/tests/ui/float/classify-runtime-const.rs b/tests/ui/float/classify-runtime-const.rs index fb7361f9cbad5..5727d5d7b859d 100644 --- a/tests/ui/float/classify-runtime-const.rs +++ b/tests/ui/float/classify-runtime-const.rs @@ -2,7 +2,11 @@ //@ revisions: opt noopt ctfe //@[opt] compile-flags: -O //@[noopt] compile-flags: -Zmir-opt-level=0 +//@ min-llvm-version: 22 +//@ compile-flags: --check-cfg=cfg(target_has_reliable_f16) // ignore-tidy-linelength +#![feature(cfg_target_has_reliable_f16_f128)] +#![cfg_attr(target_has_reliable_f16, feature(f16))] // This tests the float classification functions, for regular runtime code and for const evaluation. @@ -50,6 +54,13 @@ macro_rules! assert_test { macro_rules! suite { ( $tyname:ident => $( $tt:tt )* ) => { + #[cfg(target_has_reliable_f16)] + fn f16() { + #[allow(unused)] + type $tyname = f16; + suite_inner!(f16 => $($tt)*); + } + fn f32() { #[allow(unused)] type $tyname = f32; @@ -121,7 +132,9 @@ suite! { T => // type alias for the type we are testing } fn main() { + #[cfg(target_has_reliable_f16)] + f16(); f32(); f64(); - // FIXME(f16_f128): also test f16 and f128 + // FIXME(f128): also test f128 } diff --git a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr index d913b2e91ca0e..58ed71fad4a66 100644 --- a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr +++ b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed LL | cmp_eq | ^^^^^^ cannot infer type of the type parameter `A` declared on the function `cmp_eq` | - = note: cannot satisfy `_: Scalar` + = note: the type must implement `Scalar` note: required by a bound in `cmp_eq` --> $DIR/ambig-hr-projection-issue-93340.rs:10:22 | diff --git a/tests/ui/generic-associated-types/bugs/issue-88382.stderr b/tests/ui/generic-associated-types/bugs/issue-88382.stderr index ce20a4eeac040..dcadd5ce8deb8 100644 --- a/tests/ui/generic-associated-types/bugs/issue-88382.stderr +++ b/tests/ui/generic-associated-types/bugs/issue-88382.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed LL | do_something(SomeImplementation(), test); | ^^^^ cannot infer type of the type parameter `I` declared on the function `test` | - = note: cannot satisfy `_: Iterable` + = note: the type must implement `Iterable` help: the trait `Iterable` is implemented for `SomeImplementation` --> $DIR/issue-88382.rs:13:1 | diff --git a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs index f74d7cf281116..94f832f494a2d 100644 --- a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs +++ b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs @@ -4,7 +4,7 @@ trait Foo { where Self: 'c; } - +//@ ignore-parallel-frontend query cycle impl Foo for Box {} fn main() {} diff --git a/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak.rs b/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak.rs index c2fab7d4c5f68..5f9fe0d141ffe 100644 --- a/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak.rs +++ b/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak.rs @@ -1,6 +1,6 @@ use std::cell::Cell; use std::rc::Rc; - +//@ ignore-parallel-frontend query cycle fn send(_: T) {} fn main() {} diff --git a/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr b/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr index c08fc511500c5..14baf94598577 100644 --- a/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr +++ b/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed LL | ().publish_typed(); | ^^^^^^^^^^^^^ cannot infer type of the type parameter `F` declared on the method `publish_typed` | - = note: cannot satisfy `_: Clone` + = note: the type must implement `Clone` = note: opaque types cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl` note: required by a bound in `TypedClient::publish_typed::{anon_assoc#0}` --> $DIR/not-inferred-generic.rs:4:12 diff --git a/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr b/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr index 6866f3f5350b3..8abced84ab86b 100644 --- a/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr +++ b/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr @@ -7,7 +7,7 @@ LL | LL | loop {} | ------- return type was inferred to be `!` here | - = note: cannot satisfy `_: Future` + = note: the type must implement `Future` error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/where-allowed-2.stderr b/tests/ui/impl-trait/where-allowed-2.stderr index 83364e6e7724f..d731e5ce9e577 100644 --- a/tests/ui/impl-trait/where-allowed-2.stderr +++ b/tests/ui/impl-trait/where-allowed-2.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed LL | fn in_adt_in_return() -> Vec { panic!() } | ^^^^^^^^^^ cannot infer type | - = note: cannot satisfy `_: Debug` + = note: the type must implement `Debug` error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/where-allowed.stderr b/tests/ui/impl-trait/where-allowed.stderr index 2d97215de3bbe..2d925165d583a 100644 --- a/tests/ui/impl-trait/where-allowed.stderr +++ b/tests/ui/impl-trait/where-allowed.stderr @@ -374,7 +374,7 @@ error[E0283]: type annotations needed LL | fn in_dyn_Fn_return_in_return() -> &'static dyn Fn() -> impl Debug { panic!() } | ^^^^^^^^^^ cannot infer type | - = note: cannot satisfy `_: Debug` + = note: the type must implement `Debug` error[E0283]: type annotations needed --> $DIR/where-allowed.rs:65:46 diff --git a/tests/ui/imports/import-trait-method.stderr b/tests/ui/imports/import-trait-method.stderr index 8fe774111b962..1cb2d734a9258 100644 --- a/tests/ui/imports/import-trait-method.stderr +++ b/tests/ui/imports/import-trait-method.stderr @@ -14,7 +14,7 @@ error[E0283]: type annotations needed LL | fn main() { foo(); } | ^^^^^ cannot infer type | - = note: cannot satisfy `_: Foo` + = note: the type must implement `Foo` error: aborting due to 2 previous errors diff --git a/tests/ui/inference/erase-type-params-in-label.stderr b/tests/ui/inference/erase-type-params-in-label.stderr index 1ec8a33eb8205..5056d63586861 100644 --- a/tests/ui/inference/erase-type-params-in-label.stderr +++ b/tests/ui/inference/erase-type-params-in-label.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed for `Foo` LL | let foo = foo(1, ""); | ^^^ ---------- type must be known at this point | - = note: cannot satisfy `_: Default` + = note: the type must implement `Default` note: required by a bound in `foo` --> $DIR/erase-type-params-in-label.rs:25:17 | @@ -21,7 +21,7 @@ error[E0283]: type annotations needed for `Bar` LL | let bar = bar(1, ""); | ^^^ ---------- type must be known at this point | - = note: cannot satisfy `_: Default` + = note: the type must implement `Default` note: required by a bound in `bar` --> $DIR/erase-type-params-in-label.rs:14:17 | diff --git a/tests/ui/inference/issue-86162-1.stderr b/tests/ui/inference/issue-86162-1.stderr index fe3cee771609c..d36ea12f6f041 100644 --- a/tests/ui/inference/issue-86162-1.stderr +++ b/tests/ui/inference/issue-86162-1.stderr @@ -6,7 +6,7 @@ LL | foo(gen()); //<- Do not suggest `foo::()`! | | | required by a bound introduced by this call | - = note: cannot satisfy `_: Clone` + = note: the type must implement `Clone` note: required by a bound in `foo` --> $DIR/issue-86162-1.rs:3:16 | diff --git a/tests/ui/inference/issue-86162-2.stderr b/tests/ui/inference/issue-86162-2.stderr index 7b45b196629ec..adbc585d46924 100644 --- a/tests/ui/inference/issue-86162-2.stderr +++ b/tests/ui/inference/issue-86162-2.stderr @@ -6,7 +6,7 @@ LL | Foo::bar(gen()); //<- Do not suggest `Foo::bar::()`! | | | required by a bound introduced by this call | - = note: cannot satisfy `_: Clone` + = note: the type must implement `Clone` note: required by a bound in `Foo::bar` --> $DIR/issue-86162-2.rs:8:20 | diff --git a/tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr b/tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr index 455304524edc4..bf67c10098d56 100644 --- a/tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr +++ b/tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr @@ -6,7 +6,7 @@ LL | (S {}).owo(None) | | | required by a bound introduced by this call | - = note: cannot satisfy `_: T` + = note: the type must implement `T` note: required by a bound in `S::owo` --> $DIR/issue-113264-incorrect-impl-trait-in-path-suggestion.rs:6:35 | diff --git a/tests/ui/inference/question-mark-type-infer.stderr b/tests/ui/inference/question-mark-type-infer.stderr index 9e1232cb4a6fa..b531d42ff93cf 100644 --- a/tests/ui/inference/question-mark-type-infer.stderr +++ b/tests/ui/inference/question-mark-type-infer.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed LL | l.iter().map(f).collect()? | ^^^^^^^ cannot infer type of the type parameter `B` declared on the method `collect` | - = note: cannot satisfy `_: FromIterator>` + = note: the type must implement `FromIterator>` note: required by a bound in `collect` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL help: consider specifying the generic argument @@ -18,7 +18,7 @@ error[E0283]: type annotations needed LL | let x = l.iter().map(f).collect()?; | ^^^^^^^ cannot infer type of the type parameter `B` declared on the method `collect` | - = note: cannot satisfy `_: FromIterator>` + = note: the type must implement `FromIterator>` note: required by a bound in `collect` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL help: consider specifying the generic argument @@ -32,7 +32,7 @@ error[E0283]: type annotations needed LL | let x: Vec = l.iter().map(f).collect()?; | ^^^^^^^ cannot infer type of the type parameter `B` declared on the method `collect` | - = note: cannot satisfy `_: FromIterator>` + = note: the type must implement `FromIterator>` note: required by a bound in `collect` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL help: consider specifying the generic argument diff --git a/tests/ui/inference/question-mark-type-inference-in-chain.rs b/tests/ui/inference/question-mark-type-inference-in-chain.rs index 47c41e52b9acc..f3e36b7c40167 100644 --- a/tests/ui/inference/question-mark-type-inference-in-chain.rs +++ b/tests/ui/inference/question-mark-type-inference-in-chain.rs @@ -41,7 +41,7 @@ pub fn error2(lines: &[&str]) -> Result> { let mut tags: Vec = lines.iter().map(|e| parse(e)).collect()?; //~^ ERROR: type annotations needed //~| NOTE: cannot infer type of the type parameter `B` - //~| NOTE: cannot satisfy `_: FromIterator>` + //~| NOTE: the type must implement `FromIterator>` //~| NOTE: required by a bound in `collect` //~| HELP: consider specifying the generic argument tags.sort(); diff --git a/tests/ui/inference/question-mark-type-inference-in-chain.stderr b/tests/ui/inference/question-mark-type-inference-in-chain.stderr index 0c11cdccd174f..af8a5c8aebadc 100644 --- a/tests/ui/inference/question-mark-type-inference-in-chain.stderr +++ b/tests/ui/inference/question-mark-type-inference-in-chain.stderr @@ -18,7 +18,7 @@ error[E0283]: type annotations needed LL | let mut tags: Vec = lines.iter().map(|e| parse(e)).collect()?; | ^^^^^^^ cannot infer type of the type parameter `B` declared on the method `collect` | - = note: cannot satisfy `_: FromIterator>` + = note: the type must implement `FromIterator>` note: required by a bound in `collect` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL help: consider specifying the generic argument diff --git a/tests/ui/infinite/infinite-trait-alias-recursion.rs b/tests/ui/infinite/infinite-trait-alias-recursion.rs index 0bd4624de3f1e..df884cca22b77 100644 --- a/tests/ui/infinite/infinite-trait-alias-recursion.rs +++ b/tests/ui/infinite/infinite-trait-alias-recursion.rs @@ -1,5 +1,5 @@ #![feature(trait_alias)] - +//@ ignore-parallel-frontend query cycle trait T1 = T2; //~^ ERROR cycle detected when computing the implied predicates of `T1` diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs b/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs index cf9ea0db4cbee..6a43c4ac78720 100644 --- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs +++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs @@ -1,5 +1,5 @@ //@ revisions: feature gated - +//@ ignore-parallel-frontend query cycle #![cfg_attr(feature, feature(lazy_type_alias))] #![allow(incomplete_features)] diff --git a/tests/ui/inline-const/required-const.rs b/tests/ui/inline-const/required-const.rs index 8f640e933d019..437652532ec54 100644 --- a/tests/ui/inline-const/required-const.rs +++ b/tests/ui/inline-const/required-const.rs @@ -1,6 +1,6 @@ //@ build-fail //@ compile-flags: -Zmir-opt-level=3 - +//@ ignore-parallel-frontend post-monomorphization errors fn foo() { if false { const { panic!() } //~ ERROR E0080 diff --git a/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs b/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs index ed15f5bba9622..d2e5e158b7226 100644 --- a/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs +++ b/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs @@ -1,6 +1,6 @@ //@ normalize-stderr: "[[:xdigit:]]{2} __ ([[:xdigit:]]{2}\s){2}" -> "HEX_DUMP" #![feature(core_intrinsics)] - +//@ ignore-parallel-frontend different alloc ids const RAW_EQ_PADDING: bool = unsafe { std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16)) //~^ ERROR requires initialized memory diff --git a/tests/ui/issues/issue-17252.rs b/tests/ui/issues/issue-17252.rs index 5941e10f8b068..dd002bfd187a0 100644 --- a/tests/ui/issues/issue-17252.rs +++ b/tests/ui/issues/issue-17252.rs @@ -1,5 +1,5 @@ const FOO: usize = FOO; //~ ERROR E0391 - +//@ ignore-parallel-frontend query cycle fn main() { let _x: [u8; FOO]; // caused stack overflow prior to fix let _y: usize = 1 + { diff --git a/tests/ui/issues/issue-34373.rs b/tests/ui/issues/issue-34373.rs index a9bd79f6830b8..02e1048e5a330 100644 --- a/tests/ui/issues/issue-34373.rs +++ b/tests/ui/issues/issue-34373.rs @@ -1,5 +1,5 @@ #![allow(warnings)] - +//@ ignore-parallel-frontend query cycle trait Trait { fn foo(_: T) {} } diff --git a/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs b/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs index dfa0b8015d037..a8e23c0246eeb 100644 --- a/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs +++ b/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs @@ -3,7 +3,7 @@ #![move_size_limit = "1000"] //@ build-fail //@ only-64bit - +//@ ignore-parallel-frontend post-monomorphization errors //@ edition:2018 //@ compile-flags: -Zmir-opt-level=1 diff --git a/tests/ui/lint/large_assignments/copy_into_fn.rs b/tests/ui/lint/large_assignments/copy_into_fn.rs index 5222e833bcc8f..8f8e7f0822bbc 100644 --- a/tests/ui/lint/large_assignments/copy_into_fn.rs +++ b/tests/ui/lint/large_assignments/copy_into_fn.rs @@ -1,5 +1,5 @@ //@ build-fail - +//@ ignore-parallel-frontend post-monomorphization errors #![feature(large_assignments)] #![move_size_limit = "1000"] #![deny(large_assignments)] diff --git a/tests/ui/lint/large_assignments/inline_mir.rs b/tests/ui/lint/large_assignments/inline_mir.rs index d16aae6ab145b..68c5de4902f34 100644 --- a/tests/ui/lint/large_assignments/inline_mir.rs +++ b/tests/ui/lint/large_assignments/inline_mir.rs @@ -13,7 +13,7 @@ //! ``` //! //! We want the diagnostics to point to the relevant user code. - +//@ ignore-parallel-frontend post-monomorphization errors //@ build-fail //@ compile-flags: -Zmir-opt-level=1 -Zinline-mir diff --git a/tests/ui/lint/large_assignments/large_future.rs b/tests/ui/lint/large_assignments/large_future.rs index 28c358bdbf086..1be66f16313bb 100644 --- a/tests/ui/lint/large_assignments/large_future.rs +++ b/tests/ui/lint/large_assignments/large_future.rs @@ -5,7 +5,7 @@ //@ only-64bit //@ revisions: attribute option //@ [option]compile-flags: -Zmove-size-limit=1000 - +//@ ignore-parallel-frontend post-monomorphization errors //@ edition:2018 //@ compile-flags: -Zmir-opt-level=0 diff --git a/tests/ui/lint/large_assignments/move_into_fn.rs b/tests/ui/lint/large_assignments/move_into_fn.rs index b3b2160ca36e1..1e793a082e3ea 100644 --- a/tests/ui/lint/large_assignments/move_into_fn.rs +++ b/tests/ui/lint/large_assignments/move_into_fn.rs @@ -1,5 +1,5 @@ //@ build-fail - +//@ ignore-parallel-frontend post-monomorphization errors #![feature(large_assignments)] #![move_size_limit = "1000"] #![deny(large_assignments)] diff --git a/tests/ui/lint/non-snake-case/lint-uppercase-variables.rs b/tests/ui/lint/non-snake-case/lint-uppercase-variables.rs index aefbe63606a14..be3450494aaf2 100644 --- a/tests/ui/lint/non-snake-case/lint-uppercase-variables.rs +++ b/tests/ui/lint/non-snake-case/lint-uppercase-variables.rs @@ -1,7 +1,7 @@ #![warn(unused)] #![allow(dead_code)] #![deny(non_snake_case)] - +//@ ignore-parallel-frontend `note`s on different source lines mod foo { pub enum Foo { Foo } } diff --git a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs index ad85a777ef9a2..3b8cbe99a65e3 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs @@ -2,7 +2,7 @@ //@ compile-flags: --force-warn unused_variables //@ compile-flags: --force-warn unused_mut //@ check-pass - +//@ ignore-parallel-frontend `note`s on different source lines fn expect_early_pass_lint() { #[expect(while_true)] while true { diff --git a/tests/ui/liveness/liveness-unused.rs b/tests/ui/liveness/liveness-unused.rs index a291d2489695f..95345c22b0411 100644 --- a/tests/ui/liveness/liveness-unused.rs +++ b/tests/ui/liveness/liveness-unused.rs @@ -3,7 +3,7 @@ #![deny(unused_assignments)] #![allow(dead_code, non_camel_case_types, trivial_numeric_casts, dropping_copy_types)] #![feature(intrinsics)] - +//@ ignore-parallel-frontend `note`s on different source lines use std::ops::AddAssign; fn f1(x: isize) { diff --git a/tests/ui/cross/cross-file-errors/main.rs b/tests/ui/macros/cross-file-errors.rs similarity index 100% rename from tests/ui/cross/cross-file-errors/main.rs rename to tests/ui/macros/cross-file-errors.rs diff --git a/tests/ui/cross/cross-file-errors/main.stderr b/tests/ui/macros/cross-file-errors.stderr similarity index 92% rename from tests/ui/cross/cross-file-errors/main.stderr rename to tests/ui/macros/cross-file-errors.stderr index db7b3a84fc8b3..70db7d5185eac 100644 --- a/tests/ui/cross/cross-file-errors/main.stderr +++ b/tests/ui/macros/cross-file-errors.stderr @@ -4,7 +4,7 @@ error: in expressions, `_` can only be used on the left-hand side of an assignme LL | _ | ^ `_` not allowed here | - ::: $DIR/main.rs:5:5 + ::: $DIR/cross-file-errors.rs:5:5 | LL | underscore!(); | ------------- in this macro invocation diff --git a/tests/ui/cross/cross-file-errors/underscore.rs b/tests/ui/macros/underscore.rs similarity index 100% rename from tests/ui/cross/cross-file-errors/underscore.rs rename to tests/ui/macros/underscore.rs diff --git a/tests/ui/pattern/non-structural-match-types-cycle-err.rs b/tests/ui/pattern/non-structural-match-types-cycle-err.rs index a8e494c35b0c3..3bc1964eb21fc 100644 --- a/tests/ui/pattern/non-structural-match-types-cycle-err.rs +++ b/tests/ui/pattern/non-structural-match-types-cycle-err.rs @@ -1,5 +1,5 @@ //@ edition:2021 - +//@ ignore-parallel-frontend query cycle struct AnyOption(T); impl AnyOption { const NONE: Option = None; diff --git a/tests/ui/recursion/issue-23302-3.rs b/tests/ui/recursion/issue-23302-3.rs index da75f33079886..2e29433ae22d4 100644 --- a/tests/ui/recursion/issue-23302-3.rs +++ b/tests/ui/recursion/issue-23302-3.rs @@ -1,5 +1,5 @@ const A: i32 = B; //~ ERROR cycle detected - +//@ ignore-parallel-frontend query cycle const B: i32 = A; fn main() { } diff --git a/tests/ui/resolve/proc_macro_generated_packed.rs b/tests/ui/resolve/proc_macro_generated_packed.rs index a8175895af04b..e35f50911663c 100644 --- a/tests/ui/resolve/proc_macro_generated_packed.rs +++ b/tests/ui/resolve/proc_macro_generated_packed.rs @@ -1,6 +1,6 @@ //! This test ICEs because the `repr(packed)` attribute //! was generated by a proc macro, so `#[derive]` didn't see it. - +//@ ignore-parallel-frontend failed to collect active jobs //@proc-macro: proc_macro_generate_packed.rs //@known-bug: #120873 //@ failure-status: 101 diff --git a/tests/ui/resolve/resolve-self-in-impl.rs b/tests/ui/resolve/resolve-self-in-impl.rs index d0872d1b76f20..c05a7146fe08b 100644 --- a/tests/ui/resolve/resolve-self-in-impl.rs +++ b/tests/ui/resolve/resolve-self-in-impl.rs @@ -1,5 +1,5 @@ #![feature(associated_type_defaults)] - +//@ ignore-parallel-frontend query cycle struct S(T); trait Tr { type A = (); diff --git a/tests/ui/rust-2018/edition-lint-inter-outlives/edition-lint-infer-outlives-macro.fixed b/tests/ui/rust-2018/edition-lint-inter-outlives/edition-lint-infer-outlives-macro.fixed index 435857224ac31..e7c10f71b831a 100644 --- a/tests/ui/rust-2018/edition-lint-inter-outlives/edition-lint-infer-outlives-macro.fixed +++ b/tests/ui/rust-2018/edition-lint-inter-outlives/edition-lint-infer-outlives-macro.fixed @@ -1,7 +1,7 @@ //@ edition:2018 //@ aux-build:edition-lint-infer-outlives-macro.rs //@ run-rustfix - +//@ ignore-parallel-frontend `note`s on different source lines #![deny(explicit_outlives_requirements)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/edition-lint-inter-outlives/edition-lint-infer-outlives-macro.rs b/tests/ui/rust-2018/edition-lint-inter-outlives/edition-lint-infer-outlives-macro.rs index 6c879231a1681..a39d766263e9a 100644 --- a/tests/ui/rust-2018/edition-lint-inter-outlives/edition-lint-infer-outlives-macro.rs +++ b/tests/ui/rust-2018/edition-lint-inter-outlives/edition-lint-infer-outlives-macro.rs @@ -1,7 +1,7 @@ //@ edition:2018 //@ aux-build:edition-lint-infer-outlives-macro.rs //@ run-rustfix - +//@ ignore-parallel-frontend `note`s on different source lines #![deny(explicit_outlives_requirements)] #![allow(dead_code)] diff --git a/tests/ui/simd/const-err-trumps-simd-err.rs b/tests/ui/simd/const-err-trumps-simd-err.rs index 33f0abb06f3ea..282d5dabf72fa 100644 --- a/tests/ui/simd/const-err-trumps-simd-err.rs +++ b/tests/ui/simd/const-err-trumps-simd-err.rs @@ -1,6 +1,6 @@ //@build-fail //@ dont-require-annotations: NOTE - +//@ ignore-parallel-frontend post-monomorphization errors //! Make sure that monomorphization-time const errors from `static_assert` take priority over the //! error from simd_extract. Basically this checks that if a const fails to evaluate in some //! function, we don't bother codegen'ing the function. diff --git a/tests/ui/structs/default-field-values/post-mono.rs b/tests/ui/structs/default-field-values/post-mono.rs index 68dfa391bb485..57092083ca102 100644 --- a/tests/ui/structs/default-field-values/post-mono.rs +++ b/tests/ui/structs/default-field-values/post-mono.rs @@ -1,6 +1,6 @@ //@ build-fail //@ revisions: direct indirect - +//@ ignore-parallel-frontend post-monomorphization errors #![feature(default_field_values)] struct Z { diff --git a/tests/ui/suggestions/types/into-inference-needs-type.stderr b/tests/ui/suggestions/types/into-inference-needs-type.stderr index dd688f9028982..5fbc281072047 100644 --- a/tests/ui/suggestions/types/into-inference-needs-type.stderr +++ b/tests/ui/suggestions/types/into-inference-needs-type.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed LL | .into()?; | ^^^^ | - = note: cannot satisfy `_: From, {closure@$DIR/into-inference-needs-type.rs:10:14: 10:17}>, fn(Option<&str>) -> Option> {Option::>::Some}>>` + = note: the type must implement `From, {closure@$DIR/into-inference-needs-type.rs:10:14: 10:17}>, fn(Option<&str>) -> Option> {Option::>::Some}>>` = note: required for `FilterMap, {closure@$DIR/into-inference-needs-type.rs:10:14: 10:17}>, fn(Option<&str>) -> Option> {Option::>::Some}>` to implement `Into<_>` help: try using a fully qualified path to specify the expected types | diff --git a/tests/ui/trait-bounds/argument-with-unnecessary-method-call.stderr b/tests/ui/trait-bounds/argument-with-unnecessary-method-call.stderr index f0c9931252792..870a865f02dd6 100644 --- a/tests/ui/trait-bounds/argument-with-unnecessary-method-call.stderr +++ b/tests/ui/trait-bounds/argument-with-unnecessary-method-call.stderr @@ -6,7 +6,7 @@ LL | qux(Bar.into()); | | | required by a bound introduced by this call | - = note: cannot satisfy `_: From` + = note: the type must implement `From` note: required by a bound in `qux` --> $DIR/argument-with-unnecessary-method-call.rs:6:16 | diff --git a/tests/ui/traits/alias/infinite_normalization.rs b/tests/ui/traits/alias/infinite_normalization.rs index 848afc1efb23a..9e3b7df7085b6 100644 --- a/tests/ui/traits/alias/infinite_normalization.rs +++ b/tests/ui/traits/alias/infinite_normalization.rs @@ -2,7 +2,7 @@ //! recursion during normalization. //! //! issue: https://github.com/rust-lang/rust/issues/133901 - +//@ ignore-parallel-frontend query cycle #![feature(trait_alias)] fn foo>() {} trait Baz = Baz>; diff --git a/tests/ui/cross/cross-fn-cache-hole.rs b/tests/ui/traits/cross-fn-cache-hole.rs similarity index 100% rename from tests/ui/cross/cross-fn-cache-hole.rs rename to tests/ui/traits/cross-fn-cache-hole.rs diff --git a/tests/ui/cross/cross-fn-cache-hole.stderr b/tests/ui/traits/cross-fn-cache-hole.stderr similarity index 100% rename from tests/ui/cross/cross-fn-cache-hole.stderr rename to tests/ui/traits/cross-fn-cache-hole.stderr diff --git a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr index 4bd55ee80c6bb..ac427c8f0cba7 100644 --- a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr +++ b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed LL | println!("{:?}", iter::<_>()); | ^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `iter` | - = note: cannot satisfy `_: Iterator` + = note: the type must implement `Iterator` note: required by a bound in `iter` --> $DIR/runaway-impl-candidate-selection.rs:8:12 | diff --git a/tests/ui/traits/overflow-computing-ambiguity.stderr b/tests/ui/traits/overflow-computing-ambiguity.stderr index ab59f14cb6d0a..f52f2e60757cc 100644 --- a/tests/ui/traits/overflow-computing-ambiguity.stderr +++ b/tests/ui/traits/overflow-computing-ambiguity.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed LL | hello(); | ^^^^^ cannot infer type of the type parameter `T` declared on the function `hello` | - = note: cannot satisfy `_: Hello` + = note: the type must implement `Hello` help: the following types implement trait `Hello` --> $DIR/overflow-computing-ambiguity.rs:8:1 | diff --git a/tests/ui/type-inference/panic-with-unspecified-type.stderr b/tests/ui/type-inference/panic-with-unspecified-type.stderr index cd8485f392bc7..99c6e83ef3225 100644 --- a/tests/ui/type-inference/panic-with-unspecified-type.stderr +++ b/tests/ui/type-inference/panic-with-unspecified-type.stderr @@ -7,7 +7,7 @@ LL | panic!(std::default::Default::default()); | | cannot infer type | required by a bound introduced by this call | - = note: cannot satisfy `_: Any` + = note: the type must implement `Any` note: required by a bound in `std::rt::begin_panic` --> $SRC_DIR/std/src/panicking.rs:LL:COL diff --git a/tests/ui/type-inference/sort_by_key.stderr b/tests/ui/type-inference/sort_by_key.stderr index 3d2e0250dd21c..74d89b2459f95 100644 --- a/tests/ui/type-inference/sort_by_key.stderr +++ b/tests/ui/type-inference/sort_by_key.stderr @@ -6,7 +6,7 @@ LL | lst.sort_by_key(|&(v, _)| v.iter().sum()); | | | type must be known at this point | - = note: cannot satisfy `_: Ord` + = note: the type must implement `Ord` note: required by a bound in `slice::::sort_by_key` --> $SRC_DIR/alloc/src/slice.rs:LL:COL help: consider specifying the generic argument diff --git a/tests/ui/type/pattern_types/validity.rs b/tests/ui/type/pattern_types/validity.rs index 432aacb9be3fe..8323049188db7 100644 --- a/tests/ui/type/pattern_types/validity.rs +++ b/tests/ui/type/pattern_types/validity.rs @@ -1,7 +1,7 @@ //! Check that pattern types have their validity checked // Strip out raw byte dumps to make tests platform-independent: //@ normalize-stderr: "([[:xdigit:]]{2}\s){4,8}\s+│\s.{4,8}" -> "HEX_DUMP" - +//@ ignore-parallel-frontend different alloc ids #![feature(pattern_types, const_trait_impl, pattern_type_range_trait)] #![feature(pattern_type_macro)] diff --git a/tests/ui/type/type-annotation-needed.rs b/tests/ui/type/type-annotation-needed.rs index 347887f4bcfd5..a063ad77742a1 100644 --- a/tests/ui/type/type-annotation-needed.rs +++ b/tests/ui/type/type-annotation-needed.rs @@ -6,5 +6,5 @@ fn main() { foo(42); //~^ ERROR type annotations needed //~| NOTE cannot infer type - //~| NOTE cannot satisfy + //~| NOTE the type must implement } diff --git a/tests/ui/type/type-annotation-needed.stderr b/tests/ui/type/type-annotation-needed.stderr index 521d25537f3b9..78726643a3ab0 100644 --- a/tests/ui/type/type-annotation-needed.stderr +++ b/tests/ui/type/type-annotation-needed.stderr @@ -4,7 +4,7 @@ error[E0283]: type annotations needed LL | foo(42); | ^^^ cannot infer type of the type parameter `T` declared on the function `foo` | - = note: cannot satisfy `_: Into` + = note: the type must implement `Into` note: required by a bound in `foo` --> $DIR/type-annotation-needed.rs:1:11 | diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.rs b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.rs index f2b9f037ea5f3..1948e76af7ec9 100644 --- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.rs +++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.rs @@ -6,7 +6,7 @@ trait Foo> { //~| ERROR cycle detected when computing type of `Foo::N` fn func() {} } - +//@ ignore-parallel-frontend query cycle trait Bar> {} //~^ WARN trait objects without an explicit `dyn` are deprecated //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!