diff options
Diffstat (limited to 'tests')
208 files changed, 1716 insertions, 1033 deletions
diff --git a/tests/auxiliary/minicore.rs b/tests/auxiliary/minicore.rs index 49a7580eccc..1e9f2ee59b4 100644 --- a/tests/auxiliary/minicore.rs +++ b/tests/auxiliary/minicore.rs @@ -6,6 +6,7 @@ //! //! - `minicore` is **only** intended for `core` items, and the stubs should match the actual `core` //! items. +//! - Be careful of adding new features and things that are only available for a subset of targets. //! //! # References //! @@ -13,8 +14,9 @@ //! <https://github.com/rust-lang/rust/blob/c0b5cc9003f6464c11ae1c0662c6a7e06f6f5cab/compiler/rustc_codegen_cranelift/example/mini_core.rs>. // ignore-tidy-linelength -#![feature(no_core, lang_items, rustc_attrs)] +#![feature(no_core, lang_items, rustc_attrs, decl_macro)] #![allow(unused, improper_ctypes_definitions, internal_features)] +#![feature(asm_experimental_arch)] #![no_std] #![no_core] @@ -37,7 +39,9 @@ impl<T: ?Sized> LegacyReceiver for &mut T {} #[lang = "copy"] pub trait Copy: Sized {} -impl_marker_trait!(Copy => [ bool, char, isize, usize, i8, i16, i32, i64, u8, u16, u32, u64 ]); +impl_marker_trait!( + Copy => [ bool, char, isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64 ] +); impl<'a, T: ?Sized> Copy for &'a T {} impl<T: ?Sized> Copy for *const T {} impl<T: ?Sized> Copy for *mut T {} @@ -70,3 +74,8 @@ impl<T: Copy + ?Sized> Copy for ManuallyDrop<T> {} pub struct UnsafeCell<T: ?Sized> { value: T, } + +#[rustc_builtin_macro] +pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) { + /* compiler built-in */ +} diff --git a/tests/crashes/112623.rs b/tests/crashes/112623.rs index fc7361bfcb2..592ad742e5f 100644 --- a/tests/crashes/112623.rs +++ b/tests/crashes/112623.rs @@ -1,6 +1,6 @@ //@ known-bug: #112623 -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Value { diff --git a/tests/crashes/119701.rs b/tests/crashes/119701.rs index 5f681bb8da8..bdb326ea76b 100644 --- a/tests/crashes/119701.rs +++ b/tests/crashes/119701.rs @@ -1,5 +1,5 @@ //@ known-bug: #119701 -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] fn main() { let _ = process::<()>([()]); diff --git a/tests/crashes/121411.rs b/tests/crashes/121411.rs index ef7b16579dd..2456910e6fa 100644 --- a/tests/crashes/121411.rs +++ b/tests/crashes/121411.rs @@ -1,5 +1,5 @@ //@ known-bug: #121411 -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/run-make/target-specs/definitely-not-builtin-target.json b/tests/run-make/target-specs/definitely-not-builtin-target.json deleted file mode 100644 index b36fa993d97..00000000000 --- a/tests/run-make/target-specs/definitely-not-builtin-target.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "arch": "x86_64", - "is-builtin": true, - "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", - "llvm-target": "x86_64-unknown-unknown-gnu", - "target-pointer-width": "64" -} diff --git a/tests/run-make/target-specs/rmake.rs b/tests/run-make/target-specs/rmake.rs index 499c6c2079a..79c888ab340 100644 --- a/tests/run-make/target-specs/rmake.rs +++ b/tests/run-make/target-specs/rmake.rs @@ -54,11 +54,6 @@ fn main() { .run(); rustc() .input("foo.rs") - .target("definitely-not-builtin-target") - .run_fail() - .assert_stderr_contains("may not set is_builtin"); - rustc() - .input("foo.rs") .target("endianness-mismatch") .run_fail() .assert_stderr_contains(r#""data-layout" claims architecture is little-endian"#); diff --git a/tests/rustdoc/const-effect-param.rs b/tests/rustdoc/const-effect-param.rs index 3c81700ba83..cceb0adac30 100644 --- a/tests/rustdoc/const-effect-param.rs +++ b/tests/rustdoc/const-effect-param.rs @@ -1,8 +1,7 @@ // Check that we don't render host effect parameters & arguments. #![crate_name = "foo"] -#![feature(effects, const_trait_impl)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] pub trait Tr { diff --git a/tests/rustdoc/const-fn-effects.rs b/tests/rustdoc/const-fn-effects.rs index 4523870c8a5..df060a1aa1a 100644 --- a/tests/rustdoc/const-fn-effects.rs +++ b/tests/rustdoc/const-fn-effects.rs @@ -1,6 +1,4 @@ #![crate_name = "foo"] -#![feature(effects)] -#![allow(incomplete_features)] //@ has foo/fn.bar.html //@ has - '//pre[@class="rust item-decl"]' 'pub const fn bar() -> ' diff --git a/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs b/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs index 161d0c9d54e..db198e0fce9 100644 --- a/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs +++ b/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(effects, const_trait_impl)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] pub trait Resource {} diff --git a/tests/rustdoc/rfc-2632-const-trait-impl.rs b/tests/rustdoc/rfc-2632-const-trait-impl.rs index eb3e00af3b0..8a86e3e5e97 100644 --- a/tests/rustdoc/rfc-2632-const-trait-impl.rs +++ b/tests/rustdoc/rfc-2632-const-trait-impl.rs @@ -6,10 +6,9 @@ // stabilized when changing `@!has` to `@has`, and please do // not remove this test. // -// FIXME(effects) add `const_trait` to `Fn` so we use `~const` -// FIXME(effects) restore `const_trait` to `Destruct` -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +// FIXME(const_trait_impl) add `const_trait` to `Fn` so we use `~const` +// FIXME(const_trait_impl) restore `const_trait` to `Destruct` +#![feature(const_trait_impl)] #![crate_name = "foo"] use std::marker::Destruct; diff --git a/tests/ui/asm/riscv/bad-reg.riscv32e.stderr b/tests/ui/asm/riscv/bad-reg.riscv32e.stderr new file mode 100644 index 00000000000..0ca566b7933 --- /dev/null +++ b/tests/ui/asm/riscv/bad-reg.riscv32e.stderr @@ -0,0 +1,212 @@ +error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:34:18 + | +LL | asm!("", out("s1") _); + | ^^^^^^^^^^^ + +error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:36:18 + | +LL | asm!("", out("fp") _); + | ^^^^^^^^^^^ + +error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:38:18 + | +LL | asm!("", out("sp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:40:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:42:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:44:18 + | +LL | asm!("", out("tp") _); + | ^^^^^^^^^^^ + +error: invalid register `zero`: the zero register cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:46:18 + | +LL | asm!("", out("zero") _); + | ^^^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:97:18 + | +LL | asm!("", in("v0") x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:100:18 + | +LL | asm!("", out("v0") x); + | ^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:103:26 + | +LL | asm!("/* {} */", in(vreg) x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:106:26 + | +LL | asm!("/* {} */", out(vreg) _); + | ^^^^^^^^^^^ + +error: cannot use register `x16`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:49:18 + | +LL | asm!("", out("x16") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x17`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:51:18 + | +LL | asm!("", out("x17") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x18`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:53:18 + | +LL | asm!("", out("x18") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x19`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:55:18 + | +LL | asm!("", out("x19") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x20`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:57:18 + | +LL | asm!("", out("x20") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x21`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:59:18 + | +LL | asm!("", out("x21") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x22`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:61:18 + | +LL | asm!("", out("x22") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x23`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:63:18 + | +LL | asm!("", out("x23") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x24`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:65:18 + | +LL | asm!("", out("x24") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x25`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:67:18 + | +LL | asm!("", out("x25") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x26`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:69:18 + | +LL | asm!("", out("x26") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x27`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:71:18 + | +LL | asm!("", out("x27") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x28`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:73:18 + | +LL | asm!("", out("x28") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x29`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:75:18 + | +LL | asm!("", out("x29") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x30`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:77:18 + | +LL | asm!("", out("x30") _); + | ^^^^^^^^^^^^ + +error: cannot use register `x31`: register can't be used with the `e` target feature + --> $DIR/bad-reg.rs:79:18 + | +LL | asm!("", out("x31") _); + | ^^^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:83:26 + | +LL | asm!("/* {} */", in(freg) f); + | ^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:85:26 + | +LL | asm!("/* {} */", out(freg) _); + | ^^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:87:26 + | +LL | asm!("/* {} */", in(freg) d); + | ^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:90:26 + | +LL | asm!("/* {} */", out(freg) d); + | ^^^^^^^^^^^ + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:97:27 + | +LL | asm!("", in("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:100:28 + | +LL | asm!("", out("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:103:35 + | +LL | asm!("/* {} */", in(vreg) x); + | ^ + | + = note: register class `vreg` supports these types: + +error: aborting due to 34 previous errors + diff --git a/tests/ui/asm/riscv/bad-reg.riscv32gc.stderr b/tests/ui/asm/riscv/bad-reg.riscv32gc.stderr new file mode 100644 index 00000000000..81b72884a12 --- /dev/null +++ b/tests/ui/asm/riscv/bad-reg.riscv32gc.stderr @@ -0,0 +1,92 @@ +error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:34:18 + | +LL | asm!("", out("s1") _); + | ^^^^^^^^^^^ + +error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:36:18 + | +LL | asm!("", out("fp") _); + | ^^^^^^^^^^^ + +error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:38:18 + | +LL | asm!("", out("sp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:40:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:42:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:44:18 + | +LL | asm!("", out("tp") _); + | ^^^^^^^^^^^ + +error: invalid register `zero`: the zero register cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:46:18 + | +LL | asm!("", out("zero") _); + | ^^^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:97:18 + | +LL | asm!("", in("v0") x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:100:18 + | +LL | asm!("", out("v0") x); + | ^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:103:26 + | +LL | asm!("/* {} */", in(vreg) x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:106:26 + | +LL | asm!("/* {} */", out(vreg) _); + | ^^^^^^^^^^^ + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:97:27 + | +LL | asm!("", in("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:100:28 + | +LL | asm!("", out("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:103:35 + | +LL | asm!("/* {} */", in(vreg) x); + | ^ + | + = note: register class `vreg` supports these types: + +error: aborting due to 14 previous errors + diff --git a/tests/ui/asm/riscv/bad-reg.riscv32i.stderr b/tests/ui/asm/riscv/bad-reg.riscv32i.stderr new file mode 100644 index 00000000000..b951ffb3982 --- /dev/null +++ b/tests/ui/asm/riscv/bad-reg.riscv32i.stderr @@ -0,0 +1,116 @@ +error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:34:18 + | +LL | asm!("", out("s1") _); + | ^^^^^^^^^^^ + +error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:36:18 + | +LL | asm!("", out("fp") _); + | ^^^^^^^^^^^ + +error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:38:18 + | +LL | asm!("", out("sp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:40:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:42:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:44:18 + | +LL | asm!("", out("tp") _); + | ^^^^^^^^^^^ + +error: invalid register `zero`: the zero register cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:46:18 + | +LL | asm!("", out("zero") _); + | ^^^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:97:18 + | +LL | asm!("", in("v0") x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:100:18 + | +LL | asm!("", out("v0") x); + | ^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:103:26 + | +LL | asm!("/* {} */", in(vreg) x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:106:26 + | +LL | asm!("/* {} */", out(vreg) _); + | ^^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:83:26 + | +LL | asm!("/* {} */", in(freg) f); + | ^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:85:26 + | +LL | asm!("/* {} */", out(freg) _); + | ^^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:87:26 + | +LL | asm!("/* {} */", in(freg) d); + | ^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:90:26 + | +LL | asm!("/* {} */", out(freg) d); + | ^^^^^^^^^^^ + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:97:27 + | +LL | asm!("", in("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:100:28 + | +LL | asm!("", out("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:103:35 + | +LL | asm!("/* {} */", in(vreg) x); + | ^ + | + = note: register class `vreg` supports these types: + +error: aborting due to 18 previous errors + diff --git a/tests/ui/asm/riscv/bad-reg.riscv32imafc.stderr b/tests/ui/asm/riscv/bad-reg.riscv32imafc.stderr new file mode 100644 index 00000000000..aba4ecc1886 --- /dev/null +++ b/tests/ui/asm/riscv/bad-reg.riscv32imafc.stderr @@ -0,0 +1,108 @@ +error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:34:18 + | +LL | asm!("", out("s1") _); + | ^^^^^^^^^^^ + +error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:36:18 + | +LL | asm!("", out("fp") _); + | ^^^^^^^^^^^ + +error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:38:18 + | +LL | asm!("", out("sp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:40:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:42:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:44:18 + | +LL | asm!("", out("tp") _); + | ^^^^^^^^^^^ + +error: invalid register `zero`: the zero register cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:46:18 + | +LL | asm!("", out("zero") _); + | ^^^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:97:18 + | +LL | asm!("", in("v0") x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:100:18 + | +LL | asm!("", out("v0") x); + | ^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:103:26 + | +LL | asm!("/* {} */", in(vreg) x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:106:26 + | +LL | asm!("/* {} */", out(vreg) _); + | ^^^^^^^^^^^ + +error: `d` target feature is not enabled + --> $DIR/bad-reg.rs:87:35 + | +LL | asm!("/* {} */", in(freg) d); + | ^ + | + = note: this is required to use type `f64` with register class `freg` + +error: `d` target feature is not enabled + --> $DIR/bad-reg.rs:90:36 + | +LL | asm!("/* {} */", out(freg) d); + | ^ + | + = note: this is required to use type `f64` with register class `freg` + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:97:27 + | +LL | asm!("", in("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:100:28 + | +LL | asm!("", out("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:103:35 + | +LL | asm!("/* {} */", in(vreg) x); + | ^ + | + = note: register class `vreg` supports these types: + +error: aborting due to 16 previous errors + diff --git a/tests/ui/asm/riscv/bad-reg.riscv64gc.stderr b/tests/ui/asm/riscv/bad-reg.riscv64gc.stderr new file mode 100644 index 00000000000..81b72884a12 --- /dev/null +++ b/tests/ui/asm/riscv/bad-reg.riscv64gc.stderr @@ -0,0 +1,92 @@ +error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:34:18 + | +LL | asm!("", out("s1") _); + | ^^^^^^^^^^^ + +error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:36:18 + | +LL | asm!("", out("fp") _); + | ^^^^^^^^^^^ + +error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:38:18 + | +LL | asm!("", out("sp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:40:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:42:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:44:18 + | +LL | asm!("", out("tp") _); + | ^^^^^^^^^^^ + +error: invalid register `zero`: the zero register cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:46:18 + | +LL | asm!("", out("zero") _); + | ^^^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:97:18 + | +LL | asm!("", in("v0") x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:100:18 + | +LL | asm!("", out("v0") x); + | ^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:103:26 + | +LL | asm!("/* {} */", in(vreg) x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:106:26 + | +LL | asm!("/* {} */", out(vreg) _); + | ^^^^^^^^^^^ + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:97:27 + | +LL | asm!("", in("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:100:28 + | +LL | asm!("", out("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:103:35 + | +LL | asm!("/* {} */", in(vreg) x); + | ^ + | + = note: register class `vreg` supports these types: + +error: aborting due to 14 previous errors + diff --git a/tests/ui/asm/riscv/bad-reg.riscv64imac.stderr b/tests/ui/asm/riscv/bad-reg.riscv64imac.stderr new file mode 100644 index 00000000000..b951ffb3982 --- /dev/null +++ b/tests/ui/asm/riscv/bad-reg.riscv64imac.stderr @@ -0,0 +1,116 @@ +error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:34:18 + | +LL | asm!("", out("s1") _); + | ^^^^^^^^^^^ + +error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:36:18 + | +LL | asm!("", out("fp") _); + | ^^^^^^^^^^^ + +error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:38:18 + | +LL | asm!("", out("sp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:40:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:42:18 + | +LL | asm!("", out("gp") _); + | ^^^^^^^^^^^ + +error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:44:18 + | +LL | asm!("", out("tp") _); + | ^^^^^^^^^^^ + +error: invalid register `zero`: the zero register cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:46:18 + | +LL | asm!("", out("zero") _); + | ^^^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:97:18 + | +LL | asm!("", in("v0") x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:100:18 + | +LL | asm!("", out("v0") x); + | ^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:103:26 + | +LL | asm!("/* {} */", in(vreg) x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:106:26 + | +LL | asm!("/* {} */", out(vreg) _); + | ^^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:83:26 + | +LL | asm!("/* {} */", in(freg) f); + | ^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:85:26 + | +LL | asm!("/* {} */", out(freg) _); + | ^^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:87:26 + | +LL | asm!("/* {} */", in(freg) d); + | ^^^^^^^^^^ + +error: register class `freg` requires at least one of the following target features: d, f + --> $DIR/bad-reg.rs:90:26 + | +LL | asm!("/* {} */", out(freg) d); + | ^^^^^^^^^^^ + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:97:27 + | +LL | asm!("", in("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:100:28 + | +LL | asm!("", out("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:103:35 + | +LL | asm!("/* {} */", in(vreg) x); + | ^ + | + = note: register class `vreg` supports these types: + +error: aborting due to 18 previous errors + diff --git a/tests/ui/asm/riscv/bad-reg.rs b/tests/ui/asm/riscv/bad-reg.rs new file mode 100644 index 00000000000..7bf25b6e0b5 --- /dev/null +++ b/tests/ui/asm/riscv/bad-reg.rs @@ -0,0 +1,109 @@ +//@ add-core-stubs +//@ needs-asm-support +//@ revisions: riscv32i riscv32imafc riscv32gc riscv32e riscv64imac riscv64gc +//@[riscv32i] compile-flags: --target riscv32i-unknown-none-elf +//@[riscv32i] needs-llvm-components: riscv +//@[riscv32imafc] compile-flags: --target riscv32imafc-unknown-none-elf +//@[riscv32imafc] needs-llvm-components: riscv +//@[riscv32gc] compile-flags: --target riscv32gc-unknown-linux-gnu +//@[riscv32gc] needs-llvm-components: riscv +//@[riscv32e] compile-flags: --target riscv32e-unknown-none-elf +//@[riscv32e] needs-llvm-components: riscv +//@[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf +//@[riscv64imac] needs-llvm-components: riscv +//@[riscv64gc] compile-flags: --target riscv64gc-unknown-linux-gnu +//@[riscv64gc] needs-llvm-components: riscv + +// Unlike riscv32e-registers.rs, this tests if the rustc can reject invalid registers +// usage in the asm! API (in, out, inout, etc.). + +#![crate_type = "lib"] +#![feature(no_core, rustc_attrs)] +#![feature(asm_experimental_arch)] +#![no_core] + +extern crate minicore; +use minicore::*; + +fn f() { + let mut x = 0; + let mut f = 0.0_f32; + let mut d = 0.0_f64; + unsafe { + // Unsupported registers + asm!("", out("s1") _); + //~^ ERROR invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm + asm!("", out("fp") _); + //~^ ERROR invalid register `fp`: the frame pointer cannot be used as an operand for inline asm + asm!("", out("sp") _); + //~^ ERROR invalid register `sp`: the stack pointer cannot be used as an operand for inline asm + asm!("", out("gp") _); + //~^ ERROR invalid register `gp`: the global pointer cannot be used as an operand for inline asm + asm!("", out("gp") _); + //~^ ERROR invalid register `gp`: the global pointer cannot be used as an operand for inline asm + asm!("", out("tp") _); + //~^ ERROR invalid register `tp`: the thread pointer cannot be used as an operand for inline asm + asm!("", out("zero") _); + //~^ ERROR invalid register `zero`: the zero register cannot be used as an operand for inline asm + + asm!("", out("x16") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x17") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x18") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x19") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x20") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x21") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x22") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x23") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x24") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x25") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x26") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x27") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x28") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x29") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x30") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + asm!("", out("x31") _); + //[riscv32e]~^ ERROR register can't be used with the `e` target feature + + asm!("", out("f0") _); // ok + asm!("/* {} */", in(freg) f); + //[riscv32i,riscv32e,riscv64imac]~^ ERROR register class `freg` requires at least one of the following target features: d, f + asm!("/* {} */", out(freg) _); + //[riscv32i,riscv32e,riscv64imac]~^ ERROR register class `freg` requires at least one of the following target features: d, f + asm!("/* {} */", in(freg) d); + //[riscv32i,riscv32e,riscv64imac]~^ ERROR register class `freg` requires at least one of the following target features: d, f + //[riscv32imafc]~^^ ERROR `d` target feature is not enabled + asm!("/* {} */", out(freg) d); + //[riscv32i,riscv32e,riscv64imac]~^ ERROR register class `freg` requires at least one of the following target features: d, f + //[riscv32imafc]~^^ ERROR `d` target feature is not enabled + + // Clobber-only registers + // vreg + asm!("", out("v0") _); // ok + asm!("", in("v0") x); + //~^ ERROR can only be used as a clobber + //~| ERROR type `i32` cannot be used with this register class + asm!("", out("v0") x); + //~^ ERROR can only be used as a clobber + //~| ERROR type `i32` cannot be used with this register class + asm!("/* {} */", in(vreg) x); + //~^ ERROR can only be used as a clobber + //~| ERROR type `i32` cannot be used with this register class + asm!("/* {} */", out(vreg) _); + //~^ ERROR can only be used as a clobber + } +} diff --git a/tests/ui/abi/riscv32e-registers.riscv32e.stderr b/tests/ui/asm/riscv/riscv32e-registers.riscv32e.stderr index e3894431eb4..e7a86805b26 100644 --- a/tests/ui/abi/riscv32e-registers.riscv32e.stderr +++ b/tests/ui/asm/riscv/riscv32e-registers.riscv32e.stderr @@ -1,5 +1,5 @@ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:43:11 + --> $DIR/riscv32e-registers.rs:46:11 | LL | asm!("li x16, 0"); | ^ @@ -11,7 +11,7 @@ LL | li x16, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:46:11 + --> $DIR/riscv32e-registers.rs:49:11 | LL | asm!("li x17, 0"); | ^ @@ -23,7 +23,7 @@ LL | li x17, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:49:11 + --> $DIR/riscv32e-registers.rs:52:11 | LL | asm!("li x18, 0"); | ^ @@ -35,7 +35,7 @@ LL | li x18, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:52:11 + --> $DIR/riscv32e-registers.rs:55:11 | LL | asm!("li x19, 0"); | ^ @@ -47,7 +47,7 @@ LL | li x19, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:55:11 + --> $DIR/riscv32e-registers.rs:58:11 | LL | asm!("li x20, 0"); | ^ @@ -59,7 +59,7 @@ LL | li x20, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:58:11 + --> $DIR/riscv32e-registers.rs:61:11 | LL | asm!("li x21, 0"); | ^ @@ -71,7 +71,7 @@ LL | li x21, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:61:11 + --> $DIR/riscv32e-registers.rs:64:11 | LL | asm!("li x22, 0"); | ^ @@ -83,7 +83,7 @@ LL | li x22, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:64:11 + --> $DIR/riscv32e-registers.rs:67:11 | LL | asm!("li x23, 0"); | ^ @@ -95,7 +95,7 @@ LL | li x23, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:67:11 + --> $DIR/riscv32e-registers.rs:70:11 | LL | asm!("li x24, 0"); | ^ @@ -107,7 +107,7 @@ LL | li x24, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:70:11 + --> $DIR/riscv32e-registers.rs:73:11 | LL | asm!("li x25, 0"); | ^ @@ -119,7 +119,7 @@ LL | li x25, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:73:11 + --> $DIR/riscv32e-registers.rs:76:11 | LL | asm!("li x26, 0"); | ^ @@ -131,7 +131,7 @@ LL | li x26, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:76:11 + --> $DIR/riscv32e-registers.rs:79:11 | LL | asm!("li x27, 0"); | ^ @@ -143,7 +143,7 @@ LL | li x27, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:79:11 + --> $DIR/riscv32e-registers.rs:82:11 | LL | asm!("li x28, 0"); | ^ @@ -155,7 +155,7 @@ LL | li x28, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:82:11 + --> $DIR/riscv32e-registers.rs:85:11 | LL | asm!("li x29, 0"); | ^ @@ -167,7 +167,7 @@ LL | li x29, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:85:11 + --> $DIR/riscv32e-registers.rs:88:11 | LL | asm!("li x30, 0"); | ^ @@ -179,7 +179,7 @@ LL | li x30, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:88:11 + --> $DIR/riscv32e-registers.rs:91:11 | LL | asm!("li x31, 0"); | ^ diff --git a/tests/ui/abi/riscv32e-registers.riscv32em.stderr b/tests/ui/asm/riscv/riscv32e-registers.riscv32em.stderr index e3894431eb4..e7a86805b26 100644 --- a/tests/ui/abi/riscv32e-registers.riscv32em.stderr +++ b/tests/ui/asm/riscv/riscv32e-registers.riscv32em.stderr @@ -1,5 +1,5 @@ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:43:11 + --> $DIR/riscv32e-registers.rs:46:11 | LL | asm!("li x16, 0"); | ^ @@ -11,7 +11,7 @@ LL | li x16, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:46:11 + --> $DIR/riscv32e-registers.rs:49:11 | LL | asm!("li x17, 0"); | ^ @@ -23,7 +23,7 @@ LL | li x17, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:49:11 + --> $DIR/riscv32e-registers.rs:52:11 | LL | asm!("li x18, 0"); | ^ @@ -35,7 +35,7 @@ LL | li x18, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:52:11 + --> $DIR/riscv32e-registers.rs:55:11 | LL | asm!("li x19, 0"); | ^ @@ -47,7 +47,7 @@ LL | li x19, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:55:11 + --> $DIR/riscv32e-registers.rs:58:11 | LL | asm!("li x20, 0"); | ^ @@ -59,7 +59,7 @@ LL | li x20, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:58:11 + --> $DIR/riscv32e-registers.rs:61:11 | LL | asm!("li x21, 0"); | ^ @@ -71,7 +71,7 @@ LL | li x21, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:61:11 + --> $DIR/riscv32e-registers.rs:64:11 | LL | asm!("li x22, 0"); | ^ @@ -83,7 +83,7 @@ LL | li x22, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:64:11 + --> $DIR/riscv32e-registers.rs:67:11 | LL | asm!("li x23, 0"); | ^ @@ -95,7 +95,7 @@ LL | li x23, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:67:11 + --> $DIR/riscv32e-registers.rs:70:11 | LL | asm!("li x24, 0"); | ^ @@ -107,7 +107,7 @@ LL | li x24, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:70:11 + --> $DIR/riscv32e-registers.rs:73:11 | LL | asm!("li x25, 0"); | ^ @@ -119,7 +119,7 @@ LL | li x25, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:73:11 + --> $DIR/riscv32e-registers.rs:76:11 | LL | asm!("li x26, 0"); | ^ @@ -131,7 +131,7 @@ LL | li x26, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:76:11 + --> $DIR/riscv32e-registers.rs:79:11 | LL | asm!("li x27, 0"); | ^ @@ -143,7 +143,7 @@ LL | li x27, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:79:11 + --> $DIR/riscv32e-registers.rs:82:11 | LL | asm!("li x28, 0"); | ^ @@ -155,7 +155,7 @@ LL | li x28, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:82:11 + --> $DIR/riscv32e-registers.rs:85:11 | LL | asm!("li x29, 0"); | ^ @@ -167,7 +167,7 @@ LL | li x29, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:85:11 + --> $DIR/riscv32e-registers.rs:88:11 | LL | asm!("li x30, 0"); | ^ @@ -179,7 +179,7 @@ LL | li x30, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:88:11 + --> $DIR/riscv32e-registers.rs:91:11 | LL | asm!("li x31, 0"); | ^ diff --git a/tests/ui/abi/riscv32e-registers.riscv32emc.stderr b/tests/ui/asm/riscv/riscv32e-registers.riscv32emc.stderr index e3894431eb4..e7a86805b26 100644 --- a/tests/ui/abi/riscv32e-registers.riscv32emc.stderr +++ b/tests/ui/asm/riscv/riscv32e-registers.riscv32emc.stderr @@ -1,5 +1,5 @@ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:43:11 + --> $DIR/riscv32e-registers.rs:46:11 | LL | asm!("li x16, 0"); | ^ @@ -11,7 +11,7 @@ LL | li x16, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:46:11 + --> $DIR/riscv32e-registers.rs:49:11 | LL | asm!("li x17, 0"); | ^ @@ -23,7 +23,7 @@ LL | li x17, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:49:11 + --> $DIR/riscv32e-registers.rs:52:11 | LL | asm!("li x18, 0"); | ^ @@ -35,7 +35,7 @@ LL | li x18, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:52:11 + --> $DIR/riscv32e-registers.rs:55:11 | LL | asm!("li x19, 0"); | ^ @@ -47,7 +47,7 @@ LL | li x19, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:55:11 + --> $DIR/riscv32e-registers.rs:58:11 | LL | asm!("li x20, 0"); | ^ @@ -59,7 +59,7 @@ LL | li x20, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:58:11 + --> $DIR/riscv32e-registers.rs:61:11 | LL | asm!("li x21, 0"); | ^ @@ -71,7 +71,7 @@ LL | li x21, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:61:11 + --> $DIR/riscv32e-registers.rs:64:11 | LL | asm!("li x22, 0"); | ^ @@ -83,7 +83,7 @@ LL | li x22, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:64:11 + --> $DIR/riscv32e-registers.rs:67:11 | LL | asm!("li x23, 0"); | ^ @@ -95,7 +95,7 @@ LL | li x23, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:67:11 + --> $DIR/riscv32e-registers.rs:70:11 | LL | asm!("li x24, 0"); | ^ @@ -107,7 +107,7 @@ LL | li x24, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:70:11 + --> $DIR/riscv32e-registers.rs:73:11 | LL | asm!("li x25, 0"); | ^ @@ -119,7 +119,7 @@ LL | li x25, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:73:11 + --> $DIR/riscv32e-registers.rs:76:11 | LL | asm!("li x26, 0"); | ^ @@ -131,7 +131,7 @@ LL | li x26, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:76:11 + --> $DIR/riscv32e-registers.rs:79:11 | LL | asm!("li x27, 0"); | ^ @@ -143,7 +143,7 @@ LL | li x27, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:79:11 + --> $DIR/riscv32e-registers.rs:82:11 | LL | asm!("li x28, 0"); | ^ @@ -155,7 +155,7 @@ LL | li x28, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:82:11 + --> $DIR/riscv32e-registers.rs:85:11 | LL | asm!("li x29, 0"); | ^ @@ -167,7 +167,7 @@ LL | li x29, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:85:11 + --> $DIR/riscv32e-registers.rs:88:11 | LL | asm!("li x30, 0"); | ^ @@ -179,7 +179,7 @@ LL | li x30, 0 | ^ error: invalid operand for instruction - --> $DIR/riscv32e-registers.rs:88:11 + --> $DIR/riscv32e-registers.rs:91:11 | LL | asm!("li x31, 0"); | ^ diff --git a/tests/ui/abi/riscv32e-registers.rs b/tests/ui/asm/riscv/riscv32e-registers.rs index 714b0ee4633..57b1e169a04 100644 --- a/tests/ui/abi/riscv32e-registers.rs +++ b/tests/ui/asm/riscv/riscv32e-registers.rs @@ -11,6 +11,9 @@ //@ [riscv32emc] needs-llvm-components: riscv //@ [riscv32emc] compile-flags: --target=riscv32emc-unknown-none-elf +// Unlike bad-reg.rs, this tests if the assembler can reject invalid registers +// usage in assembly code. + #![no_core] #![feature(no_core, lang_items, rustc_attrs)] diff --git a/tests/ui/asm/s390x/bad-reg.rs b/tests/ui/asm/s390x/bad-reg.rs new file mode 100644 index 00000000000..6de43fdfe5e --- /dev/null +++ b/tests/ui/asm/s390x/bad-reg.rs @@ -0,0 +1,128 @@ +//@ add-core-stubs +//@ needs-asm-support +//@ revisions: s390x +//@[s390x] compile-flags: --target s390x-unknown-linux-gnu +//@[s390x] needs-llvm-components: systemz + +#![crate_type = "rlib"] +#![feature(no_core, rustc_attrs)] +#![feature(asm_experimental_arch)] +#![no_core] + +extern crate minicore; +use minicore::*; + +fn f() { + let mut x = 0; + unsafe { + // Unsupported registers + asm!("", out("r11") _); + //~^ ERROR invalid register `r11`: The frame pointer cannot be used as an operand for inline asm + asm!("", out("r15") _); + //~^ ERROR invalid register `r15`: The stack pointer cannot be used as an operand for inline asm + asm!("", out("c0") _); + //~^ ERROR invalid register `c0`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c1") _); + //~^ ERROR invalid register `c1`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c2") _); + //~^ ERROR invalid register `c2`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c3") _); + //~^ ERROR invalid register `c3`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c4") _); + //~^ ERROR invalid register `c4`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c5") _); + //~^ ERROR invalid register `c5`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c6") _); + //~^ ERROR invalid register `c6`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c7") _); + //~^ ERROR invalid register `c7`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c8") _); + //~^ ERROR invalid register `c8`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c9") _); + //~^ ERROR invalid register `c9`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c10") _); + //~^ ERROR invalid register `c10`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c11") _); + //~^ ERROR invalid register `c11`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c12") _); + //~^ ERROR invalid register `c12`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c13") _); + //~^ ERROR invalid register `c13`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c14") _); + //~^ ERROR invalid register `c14`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("c15") _); + //~^ ERROR invalid register `c15`: control registers are reserved by the kernel and cannot be used as operands for inline asm + asm!("", out("a0") _); + //~^ ERROR invalid register `a0`: a0 and a1 are reserved for system use and cannot be used as operands for inline asm + asm!("", out("a1") _); + //~^ ERROR invalid register `a1`: a0 and a1 are reserved for system use and cannot be used as operands for inline asm + + // Clobber-only registers + // areg + asm!("", out("a2") _); // ok + asm!("", in("a2") x); + //~^ ERROR can only be used as a clobber + //~| ERROR type `i32` cannot be used with this register class + asm!("", out("a2") x); + //~^ ERROR can only be used as a clobber + //~| ERROR type `i32` cannot be used with this register class + asm!("/* {} */", in(areg) x); + //~^ ERROR can only be used as a clobber + //~| ERROR type `i32` cannot be used with this register class + asm!("/* {} */", out(areg) _); + //~^ ERROR can only be used as a clobber + + // vreg + asm!("", out("v0") _); // ok + // FIXME: will be supported in https://github.com/rust-lang/rust/pull/131664 + asm!("", in("v0") x); + //~^ ERROR can only be used as a clobber + //~| ERROR type `i32` cannot be used with this register class + asm!("", out("v0") x); + //~^ ERROR can only be used as a clobber + //~| ERROR type `i32` cannot be used with this register class + asm!("/* {} */", in(vreg) x); + //~^ ERROR can only be used as a clobber + //~| ERROR type `i32` cannot be used with this register class + asm!("/* {} */", out(vreg) _); + //~^ ERROR can only be used as a clobber + + // Overlapping registers + // vreg/freg + asm!("", out("v0") _, out("f0") _); + //~^ ERROR register `f0` conflicts with register `v0` + asm!("", out("v1") _, out("f1") _); + //~^ ERROR register `f1` conflicts with register `v1` + asm!("", out("v2") _, out("f2") _); + //~^ ERROR register `f2` conflicts with register `v2` + asm!("", out("v3") _, out("f3") _); + //~^ ERROR register `f3` conflicts with register `v3` + asm!("", out("v4") _, out("f4") _); + //~^ ERROR register `f4` conflicts with register `v4` + asm!("", out("v5") _, out("f5") _); + //~^ ERROR register `f5` conflicts with register `v5` + asm!("", out("v6") _, out("f6") _); + //~^ ERROR register `f6` conflicts with register `v6` + asm!("", out("v7") _, out("f7") _); + //~^ ERROR register `f7` conflicts with register `v7` + asm!("", out("v8") _, out("f8") _); + //~^ ERROR register `f8` conflicts with register `v8` + asm!("", out("v9") _, out("f9") _); + //~^ ERROR register `f9` conflicts with register `v9` + asm!("", out("v10") _, out("f10") _); + //~^ ERROR register `f10` conflicts with register `v10` + asm!("", out("v11") _, out("f11") _); + //~^ ERROR register `f11` conflicts with register `v11` + asm!("", out("v12") _, out("f12") _); + //~^ ERROR register `f12` conflicts with register `v12` + asm!("", out("v13") _, out("f13") _); + //~^ ERROR register `f13` conflicts with register `v13` + asm!("", out("v14") _, out("f14") _); + //~^ ERROR register `f14` conflicts with register `v14` + asm!("", out("v15") _, out("f15") _); + //~^ ERROR register `f15` conflicts with register `v15` + // no %f16 + asm!("", out("v16") _, out("f16") _); + //~^ ERROR invalid register `f16`: unknown register + } +} diff --git a/tests/ui/asm/s390x/bad-reg.s390x.stderr b/tests/ui/asm/s390x/bad-reg.s390x.stderr new file mode 100644 index 00000000000..460d7c15de1 --- /dev/null +++ b/tests/ui/asm/s390x/bad-reg.s390x.stderr @@ -0,0 +1,352 @@ +error: invalid register `r11`: The frame pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:19:18 + | +LL | asm!("", out("r11") _); + | ^^^^^^^^^^^^ + +error: invalid register `r15`: The stack pointer cannot be used as an operand for inline asm + --> $DIR/bad-reg.rs:21:18 + | +LL | asm!("", out("r15") _); + | ^^^^^^^^^^^^ + +error: invalid register `c0`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:23:18 + | +LL | asm!("", out("c0") _); + | ^^^^^^^^^^^ + +error: invalid register `c1`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:25:18 + | +LL | asm!("", out("c1") _); + | ^^^^^^^^^^^ + +error: invalid register `c2`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:27:18 + | +LL | asm!("", out("c2") _); + | ^^^^^^^^^^^ + +error: invalid register `c3`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:29:18 + | +LL | asm!("", out("c3") _); + | ^^^^^^^^^^^ + +error: invalid register `c4`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:31:18 + | +LL | asm!("", out("c4") _); + | ^^^^^^^^^^^ + +error: invalid register `c5`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:33:18 + | +LL | asm!("", out("c5") _); + | ^^^^^^^^^^^ + +error: invalid register `c6`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:35:18 + | +LL | asm!("", out("c6") _); + | ^^^^^^^^^^^ + +error: invalid register `c7`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:37:18 + | +LL | asm!("", out("c7") _); + | ^^^^^^^^^^^ + +error: invalid register `c8`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:39:18 + | +LL | asm!("", out("c8") _); + | ^^^^^^^^^^^ + +error: invalid register `c9`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:41:18 + | +LL | asm!("", out("c9") _); + | ^^^^^^^^^^^ + +error: invalid register `c10`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:43:18 + | +LL | asm!("", out("c10") _); + | ^^^^^^^^^^^^ + +error: invalid register `c11`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:45:18 + | +LL | asm!("", out("c11") _); + | ^^^^^^^^^^^^ + +error: invalid register `c12`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:47:18 + | +LL | asm!("", out("c12") _); + | ^^^^^^^^^^^^ + +error: invalid register `c13`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:49:18 + | +LL | asm!("", out("c13") _); + | ^^^^^^^^^^^^ + +error: invalid register `c14`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:51:18 + | +LL | asm!("", out("c14") _); + | ^^^^^^^^^^^^ + +error: invalid register `c15`: control registers are reserved by the kernel and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:53:18 + | +LL | asm!("", out("c15") _); + | ^^^^^^^^^^^^ + +error: invalid register `a0`: a0 and a1 are reserved for system use and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:55:18 + | +LL | asm!("", out("a0") _); + | ^^^^^^^^^^^ + +error: invalid register `a1`: a0 and a1 are reserved for system use and cannot be used as operands for inline asm + --> $DIR/bad-reg.rs:57:18 + | +LL | asm!("", out("a1") _); + | ^^^^^^^^^^^ + +error: register class `areg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:63:18 + | +LL | asm!("", in("a2") x); + | ^^^^^^^^^^ + +error: register class `areg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:66:18 + | +LL | asm!("", out("a2") x); + | ^^^^^^^^^^^ + +error: register class `areg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:69:26 + | +LL | asm!("/* {} */", in(areg) x); + | ^^^^^^^^^^ + +error: register class `areg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:72:26 + | +LL | asm!("/* {} */", out(areg) _); + | ^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:78:18 + | +LL | asm!("", in("v0") x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:81:18 + | +LL | asm!("", out("v0") x); + | ^^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:84:26 + | +LL | asm!("/* {} */", in(vreg) x); + | ^^^^^^^^^^ + +error: register class `vreg` can only be used as a clobber, not as an input or output + --> $DIR/bad-reg.rs:87:26 + | +LL | asm!("/* {} */", out(vreg) _); + | ^^^^^^^^^^^ + +error: register `f0` conflicts with register `v0` + --> $DIR/bad-reg.rs:92:31 + | +LL | asm!("", out("v0") _, out("f0") _); + | ----------- ^^^^^^^^^^^ register `f0` + | | + | register `v0` + +error: register `f1` conflicts with register `v1` + --> $DIR/bad-reg.rs:94:31 + | +LL | asm!("", out("v1") _, out("f1") _); + | ----------- ^^^^^^^^^^^ register `f1` + | | + | register `v1` + +error: register `f2` conflicts with register `v2` + --> $DIR/bad-reg.rs:96:31 + | +LL | asm!("", out("v2") _, out("f2") _); + | ----------- ^^^^^^^^^^^ register `f2` + | | + | register `v2` + +error: register `f3` conflicts with register `v3` + --> $DIR/bad-reg.rs:98:31 + | +LL | asm!("", out("v3") _, out("f3") _); + | ----------- ^^^^^^^^^^^ register `f3` + | | + | register `v3` + +error: register `f4` conflicts with register `v4` + --> $DIR/bad-reg.rs:100:31 + | +LL | asm!("", out("v4") _, out("f4") _); + | ----------- ^^^^^^^^^^^ register `f4` + | | + | register `v4` + +error: register `f5` conflicts with register `v5` + --> $DIR/bad-reg.rs:102:31 + | +LL | asm!("", out("v5") _, out("f5") _); + | ----------- ^^^^^^^^^^^ register `f5` + | | + | register `v5` + +error: register `f6` conflicts with register `v6` + --> $DIR/bad-reg.rs:104:31 + | +LL | asm!("", out("v6") _, out("f6") _); + | ----------- ^^^^^^^^^^^ register `f6` + | | + | register `v6` + +error: register `f7` conflicts with register `v7` + --> $DIR/bad-reg.rs:106:31 + | +LL | asm!("", out("v7") _, out("f7") _); + | ----------- ^^^^^^^^^^^ register `f7` + | | + | register `v7` + +error: register `f8` conflicts with register `v8` + --> $DIR/bad-reg.rs:108:31 + | +LL | asm!("", out("v8") _, out("f8") _); + | ----------- ^^^^^^^^^^^ register `f8` + | | + | register `v8` + +error: register `f9` conflicts with register `v9` + --> $DIR/bad-reg.rs:110:31 + | +LL | asm!("", out("v9") _, out("f9") _); + | ----------- ^^^^^^^^^^^ register `f9` + | | + | register `v9` + +error: register `f10` conflicts with register `v10` + --> $DIR/bad-reg.rs:112:32 + | +LL | asm!("", out("v10") _, out("f10") _); + | ------------ ^^^^^^^^^^^^ register `f10` + | | + | register `v10` + +error: register `f11` conflicts with register `v11` + --> $DIR/bad-reg.rs:114:32 + | +LL | asm!("", out("v11") _, out("f11") _); + | ------------ ^^^^^^^^^^^^ register `f11` + | | + | register `v11` + +error: register `f12` conflicts with register `v12` + --> $DIR/bad-reg.rs:116:32 + | +LL | asm!("", out("v12") _, out("f12") _); + | ------------ ^^^^^^^^^^^^ register `f12` + | | + | register `v12` + +error: register `f13` conflicts with register `v13` + --> $DIR/bad-reg.rs:118:32 + | +LL | asm!("", out("v13") _, out("f13") _); + | ------------ ^^^^^^^^^^^^ register `f13` + | | + | register `v13` + +error: register `f14` conflicts with register `v14` + --> $DIR/bad-reg.rs:120:32 + | +LL | asm!("", out("v14") _, out("f14") _); + | ------------ ^^^^^^^^^^^^ register `f14` + | | + | register `v14` + +error: register `f15` conflicts with register `v15` + --> $DIR/bad-reg.rs:122:32 + | +LL | asm!("", out("v15") _, out("f15") _); + | ------------ ^^^^^^^^^^^^ register `f15` + | | + | register `v15` + +error: invalid register `f16`: unknown register + --> $DIR/bad-reg.rs:125:32 + | +LL | asm!("", out("v16") _, out("f16") _); + | ^^^^^^^^^^^^ + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:63:27 + | +LL | asm!("", in("a2") x); + | ^ + | + = note: register class `areg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:66:28 + | +LL | asm!("", out("a2") x); + | ^ + | + = note: register class `areg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:69:35 + | +LL | asm!("/* {} */", in(areg) x); + | ^ + | + = note: register class `areg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:78:27 + | +LL | asm!("", in("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:81:28 + | +LL | asm!("", out("v0") x); + | ^ + | + = note: register class `vreg` supports these types: + +error: type `i32` cannot be used with this register class + --> $DIR/bad-reg.rs:84:35 + | +LL | asm!("/* {} */", in(vreg) x); + | ^ + | + = note: register class `vreg` supports these types: + +error: aborting due to 51 previous errors + diff --git a/tests/ui/const-generics/const_trait_fn-issue-88433.rs b/tests/ui/const-generics/const_trait_fn-issue-88433.rs index 5e0ea6fc168..bc91fc1700e 100644 --- a/tests/ui/const-generics/const_trait_fn-issue-88433.rs +++ b/tests/ui/const-generics/const_trait_fn-issue-88433.rs @@ -1,8 +1,7 @@ //@ build-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Func<T> { diff --git a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs index 818b5d6ca93..6c0ac639612 100644 --- a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs +++ b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs @@ -1,6 +1,6 @@ //@ known-bug: #110395 //@ compile-flags: -Znext-solver -#![feature(generic_const_exprs, adt_const_params, const_trait_impl, effects)] +#![feature(generic_const_exprs, adt_const_params, const_trait_impl)] #![allow(incomplete_features)] // test `N + N` unifies with explicit function calls for non-builtin-types diff --git a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr index b8d7c94bddc..882fdf0b228 100644 --- a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr +++ b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr @@ -1,7 +1,7 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed --> $DIR/unify-op-with-fn-call.rs:3:12 | -LL | #![feature(generic_const_exprs, adt_const_params, const_trait_impl, effects)] +LL | #![feature(generic_const_exprs, adt_const_params, const_trait_impl)] | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/const-generics/issues/issue-88119.rs b/tests/ui/const-generics/issues/issue-88119.rs index 12cb7ee7f55..a49b2ab8b03 100644 --- a/tests/ui/const-generics/issues/issue-88119.rs +++ b/tests/ui/const-generics/issues/issue-88119.rs @@ -1,7 +1,7 @@ //@ known-bug: #110395 //@ compile-flags: -Znext-solver #![allow(incomplete_features)] -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] #[const_trait] trait ConstName { diff --git a/tests/ui/const-generics/issues/issue-88119.stderr b/tests/ui/const-generics/issues/issue-88119.stderr index a0ca33e38ef..370244fe8c9 100644 --- a/tests/ui/const-generics/issues/issue-88119.stderr +++ b/tests/ui/const-generics/issues/issue-88119.stderr @@ -1,8 +1,8 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed - --> $DIR/issue-88119.rs:4:39 + --> $DIR/issue-88119.rs:4:30 | -LL | #![feature(const_trait_impl, effects, generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ +LL | #![feature(const_trait_impl, generic_const_exprs)] + | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/consts/auxiliary/closure-in-foreign-crate.rs b/tests/ui/consts/auxiliary/closure-in-foreign-crate.rs index a4dd3ee2e7e..8804772e282 100644 --- a/tests/ui/consts/auxiliary/closure-in-foreign-crate.rs +++ b/tests/ui/consts/auxiliary/closure-in-foreign-crate.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver #![crate_type = "lib"] -#![feature(const_closures, const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_closures, const_trait_impl)] pub const fn test() { let cl = const || {}; diff --git a/tests/ui/consts/closure-in-foreign-crate.rs b/tests/ui/consts/closure-in-foreign-crate.rs index 94e40fcf1e4..423cd582e5e 100644 --- a/tests/ui/consts/closure-in-foreign-crate.rs +++ b/tests/ui/consts/closure-in-foreign-crate.rs @@ -1,8 +1,8 @@ -// FIXME(effects) aux-build:closure-in-foreign-crate.rs +// FIXME(const_trait_impl) aux-build:closure-in-foreign-crate.rs //@ build-pass -// FIXME(effects) extern crate closure_in_foreign_crate; +// FIXME(const_trait_impl) extern crate closure_in_foreign_crate; -// FIXME(effects) const _: () = closure_in_foreign_crate::test(); +// FIXME(const_trait_impl) const _: () = closure_in_foreign_crate::test(); fn main() {} diff --git a/tests/ui/consts/const-try.rs b/tests/ui/consts/const-try.rs index 758c4dd1e8c..d30b22accef 100644 --- a/tests/ui/consts/const-try.rs +++ b/tests/ui/consts/const-try.rs @@ -4,9 +4,8 @@ #![crate_type = "lib"] #![feature(try_trait_v2)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #![feature(const_try)] -#![allow(incomplete_features)] use std::ops::{ControlFlow, FromResidual, Try}; diff --git a/tests/ui/consts/const-try.stderr b/tests/ui/consts/const-try.stderr index abb1a921cfa..1f4f814cb93 100644 --- a/tests/ui/consts/const-try.stderr +++ b/tests/ui/consts/const-try.stderr @@ -1,5 +1,5 @@ error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]` - --> $DIR/const-try.rs:16:12 + --> $DIR/const-try.rs:15:12 | LL | impl const FromResidual<Error> for TryMe { | ^^^^^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | impl const FromResidual<Error> for TryMe { = note: adding a non-const method body in the future would be a breaking change error: const `impl` for trait `Try` which is not marked with `#[const_trait]` - --> $DIR/const-try.rs:23:12 + --> $DIR/const-try.rs:22:12 | LL | impl const Try for TryMe { | ^^^ @@ -17,7 +17,7 @@ LL | impl const Try for TryMe { = note: adding a non-const method body in the future would be a breaking change error[E0015]: `?` cannot determine the branch of `TryMe` in constant functions - --> $DIR/const-try.rs:36:5 + --> $DIR/const-try.rs:35:5 | LL | TryMe?; | ^^^^^^ @@ -25,7 +25,7 @@ LL | TryMe?; = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants error[E0015]: `?` cannot convert from residual of `TryMe` in constant functions - --> $DIR/const-try.rs:36:5 + --> $DIR/const-try.rs:35:5 | LL | TryMe?; | ^^^^^^ diff --git a/tests/ui/consts/const_cmp_type_id.rs b/tests/ui/consts/const_cmp_type_id.rs index 3a54764f422..e89b8d37787 100644 --- a/tests/ui/consts/const_cmp_type_id.rs +++ b/tests/ui/consts/const_cmp_type_id.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_type_id, const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_type_id, const_trait_impl)] use std::any::TypeId; @@ -13,6 +12,6 @@ fn main() { let _a = TypeId::of::<u8>() < TypeId::of::<u16>(); //~^ ERROR cannot call non-const operator in constants // can't assert `_a` because it is not deterministic - // FIXME(effects) make it pass + // FIXME(const_trait_impl) make it pass } } diff --git a/tests/ui/consts/const_cmp_type_id.stderr b/tests/ui/consts/const_cmp_type_id.stderr index 12f35361b80..2e9a8024eae 100644 --- a/tests/ui/consts/const_cmp_type_id.stderr +++ b/tests/ui/consts/const_cmp_type_id.stderr @@ -1,5 +1,5 @@ error[E0015]: cannot call non-const operator in constants - --> $DIR/const_cmp_type_id.rs:9:17 + --> $DIR/const_cmp_type_id.rs:8:17 | LL | assert!(TypeId::of::<u8>() == TypeId::of::<u8>()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -9,7 +9,7 @@ note: impl defined here, but it is not `const` = note: calls in constants are limited to constant functions, tuple structs and tuple variants error[E0015]: cannot call non-const operator in constants - --> $DIR/const_cmp_type_id.rs:11:17 + --> $DIR/const_cmp_type_id.rs:10:17 | LL | assert!(TypeId::of::<()>() != TypeId::of::<u8>()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -19,7 +19,7 @@ note: impl defined here, but it is not `const` = note: calls in constants are limited to constant functions, tuple structs and tuple variants error[E0015]: cannot call non-const operator in constants - --> $DIR/const_cmp_type_id.rs:13:18 + --> $DIR/const_cmp_type_id.rs:12:18 | LL | let _a = TypeId::of::<u8>() < TypeId::of::<u16>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/consts/constifconst-call-in-const-position.rs b/tests/ui/consts/constifconst-call-in-const-position.rs index 757e35bbab2..80e47c2230f 100644 --- a/tests/ui/consts/constifconst-call-in-const-position.rs +++ b/tests/ui/consts/constifconst-call-in-const-position.rs @@ -1,6 +1,6 @@ //@ known-bug: #102498 -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] #[const_trait] diff --git a/tests/ui/consts/rustc-impl-const-stability.rs b/tests/ui/consts/rustc-impl-const-stability.rs index af3262ca575..0df8482bec1 100644 --- a/tests/ui/consts/rustc-impl-const-stability.rs +++ b/tests/ui/consts/rustc-impl-const-stability.rs @@ -2,8 +2,7 @@ //@ known-bug: #110395 #![crate_type = "lib"] -#![feature(staged_api, const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(staged_api, const_trait_impl)] #![stable(feature = "foo", since = "1.0.0")] #[stable(feature = "potato", since = "1.27.0")] diff --git a/tests/ui/consts/rustc-impl-const-stability.stderr b/tests/ui/consts/rustc-impl-const-stability.stderr index 4a534b3ca14..4a58b5c8603 100644 --- a/tests/ui/consts/rustc-impl-const-stability.stderr +++ b/tests/ui/consts/rustc-impl-const-stability.stderr @@ -1,5 +1,5 @@ error: const `impl` for trait `Default` which is not marked with `#[const_trait]` - --> $DIR/rustc-impl-const-stability.rs:16:12 + --> $DIR/rustc-impl-const-stability.rs:15:12 | LL | impl const Default for Data { | ^^^^^^^ diff --git a/tests/ui/delegation/unsupported.rs b/tests/ui/delegation/unsupported.rs index 56296db85a3..b35af76da3e 100644 --- a/tests/ui/delegation/unsupported.rs +++ b/tests/ui/delegation/unsupported.rs @@ -1,6 +1,5 @@ #![feature(const_trait_impl)] #![feature(c_variadic)] -#![feature(effects)] #![feature(fn_delegation)] #![allow(incomplete_features)] diff --git a/tests/ui/delegation/unsupported.stderr b/tests/ui/delegation/unsupported.stderr index 2f64d23b8d2..9391763dca2 100644 --- a/tests/ui/delegation/unsupported.stderr +++ b/tests/ui/delegation/unsupported.stderr @@ -1,24 +1,24 @@ -error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:26:5: 26:24>::{synthetic#0}` - --> $DIR/unsupported.rs:27:25 +error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>::{synthetic#0}` + --> $DIR/unsupported.rs:26:25 | LL | reuse to_reuse::opaque_ret; | ^^^^^^^^^^ | note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process... - --> $DIR/unsupported.rs:27:25 + --> $DIR/unsupported.rs:26:25 | LL | reuse to_reuse::opaque_ret; | ^^^^^^^^^^ - = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:26:5: 26:24>::{synthetic#0}`, completing the cycle -note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:26:5: 26:24>` is well-formed - --> $DIR/unsupported.rs:26:5 + = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>::{synthetic#0}`, completing the cycle +note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>` is well-formed + --> $DIR/unsupported.rs:25:5 | LL | impl ToReuse for u8 { | ^^^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information warning: this function depends on never type fallback being `()` - --> $DIR/unsupported.rs:14:9 + --> $DIR/unsupported.rs:13:9 | LL | pub fn opaque_ret() -> impl Trait { unimplemented!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -27,14 +27,14 @@ LL | pub fn opaque_ret() -> impl Trait { unimplemented!() } = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: opaque::Trait` will fail - --> $DIR/unsupported.rs:14:32 + --> $DIR/unsupported.rs:13:32 | LL | pub fn opaque_ret() -> impl Trait { unimplemented!() } | ^^^^^^^^^^ = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default warning: this function depends on never type fallback being `()` - --> $DIR/unsupported.rs:20:9 + --> $DIR/unsupported.rs:19:9 | LL | fn opaque_ret() -> impl Trait { unimplemented!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -43,32 +43,32 @@ LL | fn opaque_ret() -> impl Trait { unimplemented!() } = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: opaque::Trait` will fail - --> $DIR/unsupported.rs:20:28 + --> $DIR/unsupported.rs:19:28 | LL | fn opaque_ret() -> impl Trait { unimplemented!() } | ^^^^^^^^^^ -error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:29:5: 29:25>::{synthetic#0}` - --> $DIR/unsupported.rs:30:24 +error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>::{synthetic#0}` + --> $DIR/unsupported.rs:29:24 | LL | reuse ToReuse::opaque_ret; | ^^^^^^^^^^ | note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process... - --> $DIR/unsupported.rs:30:24 + --> $DIR/unsupported.rs:29:24 | LL | reuse ToReuse::opaque_ret; | ^^^^^^^^^^ - = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:29:5: 29:25>::{synthetic#0}`, completing the cycle -note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:29:5: 29:25>` is well-formed - --> $DIR/unsupported.rs:29:5 + = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>::{synthetic#0}`, completing the cycle +note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>` is well-formed + --> $DIR/unsupported.rs:28:5 | LL | impl ToReuse for u16 { | ^^^^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information error: recursive delegation is not supported yet - --> $DIR/unsupported.rs:43:22 + --> $DIR/unsupported.rs:42:22 | LL | pub reuse to_reuse2::foo; | --- callee defined here @@ -77,7 +77,7 @@ LL | reuse to_reuse1::foo; | ^^^ error[E0283]: type annotations needed - --> $DIR/unsupported.rs:53:18 + --> $DIR/unsupported.rs:52:18 | LL | reuse Trait::foo; | ^^^ cannot infer type diff --git a/tests/ui/dropck/const_drop_is_valid.rs b/tests/ui/dropck/const_drop_is_valid.rs index 0441b6ed067..26ef2d61deb 100644 --- a/tests/ui/dropck/const_drop_is_valid.rs +++ b/tests/ui/dropck/const_drop_is_valid.rs @@ -1,6 +1,3 @@ -#![feature(effects)] -//~^ WARN: the feature `effects` is incomplete - struct A(); impl const Drop for A {} diff --git a/tests/ui/dropck/const_drop_is_valid.stderr b/tests/ui/dropck/const_drop_is_valid.stderr index 2383a6668a8..5837e1623a1 100644 --- a/tests/ui/dropck/const_drop_is_valid.stderr +++ b/tests/ui/dropck/const_drop_is_valid.stderr @@ -1,5 +1,5 @@ error[E0658]: const trait impls are experimental - --> $DIR/const_drop_is_valid.rs:6:6 + --> $DIR/const_drop_is_valid.rs:3:6 | LL | impl const Drop for A {} | ^^^^^ @@ -8,17 +8,8 @@ LL | impl const Drop for A {} = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const_drop_is_valid.rs:1:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `Drop` which is not marked with `#[const_trait]` - --> $DIR/const_drop_is_valid.rs:6:12 + --> $DIR/const_drop_is_valid.rs:3:12 | LL | impl const Drop for A {} | ^^^^ @@ -27,14 +18,14 @@ LL | impl const Drop for A {} = note: adding a non-const method body in the future would be a breaking change error[E0046]: not all trait items implemented, missing: `drop` - --> $DIR/const_drop_is_valid.rs:6:1 + --> $DIR/const_drop_is_valid.rs:3:1 | LL | impl const Drop for A {} | ^^^^^^^^^^^^^^^^^^^^^ missing `drop` in implementation | = help: implement the missing item: `fn drop(&mut self) { todo!() }` -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0046, E0658. For more information about an error, try `rustc --explain E0046`. diff --git a/tests/ui/generic-const-items/const-trait-impl.rs b/tests/ui/generic-const-items/const-trait-impl.rs index 51209121bd9..e11d346b712 100644 --- a/tests/ui/generic-const-items/const-trait-impl.rs +++ b/tests/ui/generic-const-items/const-trait-impl.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Znext-solver // Test that we can call methods from const trait impls inside of generic const items. -#![feature(generic_const_items, const_trait_impl, effects)] +#![feature(generic_const_items, const_trait_impl)] #![allow(incomplete_features)] #![crate_type = "lib"] diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs index af563e996c1..915a23b5905 100644 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs +++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs @@ -1,11 +1,5 @@ -//@ revisions: stock effects #![feature(intrinsics)] #![feature(rustc_attrs)] -// as effects insert a const generic param to const intrinsics, -// check here that it doesn't report a const param mismatch either -// enabling or disabling effects. -#![cfg_attr(effects, feature(effects))] -#![allow(incomplete_features)] extern "rust-intrinsic" { fn size_of<T>() -> usize; //~ ERROR intrinsic safety mismatch @@ -24,7 +18,6 @@ const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} mod foo { #[rustc_intrinsic] unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} - // FIXME(effects) ~^ ERROR wrong number of const parameters } fn main() {} diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.effects.stderr b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr index c59e357b275..aa4f294232d 100644 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.effects.stderr +++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr @@ -1,11 +1,11 @@ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:11:5 + --> $DIR/safe-intrinsic-mismatch.rs:5:5 | LL | fn size_of<T>() -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:11:5 + --> $DIR/safe-intrinsic-mismatch.rs:5:5 | LL | fn size_of<T>() -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -13,13 +13,13 @@ LL | fn size_of<T>() -> usize; = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume` - --> $DIR/safe-intrinsic-mismatch.rs:16:1 + --> $DIR/safe-intrinsic-mismatch.rs:10:1 | LL | const fn assume(_b: bool) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: intrinsic has wrong type - --> $DIR/safe-intrinsic-mismatch.rs:16:16 + --> $DIR/safe-intrinsic-mismatch.rs:10:16 | LL | const fn assume(_b: bool) {} | ^ expected unsafe fn, found safe fn @@ -28,13 +28,13 @@ LL | const fn assume(_b: bool) {} found signature `fn(_)` error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `const_deallocate` - --> $DIR/safe-intrinsic-mismatch.rs:20:1 + --> $DIR/safe-intrinsic-mismatch.rs:14:1 | LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: intrinsic has wrong type - --> $DIR/safe-intrinsic-mismatch.rs:20:26 + --> $DIR/safe-intrinsic-mismatch.rs:14:26 | LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} | ^ expected unsafe fn, found safe fn diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.stock.stderr b/tests/ui/intrinsics/safe-intrinsic-mismatch.stock.stderr deleted file mode 100644 index c59e357b275..00000000000 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.stock.stderr +++ /dev/null @@ -1,47 +0,0 @@ -error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:11:5 - | -LL | fn size_of<T>() -> usize; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:11:5 - | -LL | fn size_of<T>() -> usize; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` - -error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume` - --> $DIR/safe-intrinsic-mismatch.rs:16:1 - | -LL | const fn assume(_b: bool) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0308]: intrinsic has wrong type - --> $DIR/safe-intrinsic-mismatch.rs:16:16 - | -LL | const fn assume(_b: bool) {} - | ^ expected unsafe fn, found safe fn - | - = note: expected signature `unsafe fn(_)` - found signature `fn(_)` - -error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `const_deallocate` - --> $DIR/safe-intrinsic-mismatch.rs:20:1 - | -LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0308]: intrinsic has wrong type - --> $DIR/safe-intrinsic-mismatch.rs:20:26 - | -LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} - | ^ expected unsafe fn, found safe fn - | - = note: expected signature `unsafe fn(_, _, _)` - found signature `fn(_, _, _)` - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/parser/impls-nested-within-fns-semantic-1.rs b/tests/ui/parser/impls-nested-within-fns-semantic-1.rs index 92823b05af8..f06d19d7f5e 100644 --- a/tests/ui/parser/impls-nested-within-fns-semantic-1.rs +++ b/tests/ui/parser/impls-nested-within-fns-semantic-1.rs @@ -2,8 +2,7 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/specialization/const_trait_impl.stderr b/tests/ui/specialization/const_trait_impl.stderr index 40ac350980e..607fc06823e 100644 --- a/tests/ui/specialization/const_trait_impl.stderr +++ b/tests/ui/specialization/const_trait_impl.stderr @@ -40,54 +40,5 @@ LL | impl<T: ~const Default + ~const Sub> const A for T { | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0015]: cannot call non-const fn `<() as A>::a` in constants - --> $DIR/const_trait_impl.rs:52:23 - | -LL | const _: () = assert!(<()>::a() == 42); - | ^^^^^^^^^ - | - = note: calls in constants are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error[E0015]: cannot call non-const fn `<u8 as A>::a` in constants - --> $DIR/const_trait_impl.rs:53:23 - | -LL | const _: () = assert!(<u8>::a() == 3); - | ^^^^^^^^^ - | - = note: calls in constants are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error[E0015]: cannot call non-const fn `<u16 as A>::a` in constants - --> $DIR/const_trait_impl.rs:54:23 - | -LL | const _: () = assert!(<u16>::a() == 2); - | ^^^^^^^^^^ - | - = note: calls in constants are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error[E0015]: cannot call non-const fn `<T as Sup>::foo` in constant functions - --> $DIR/const_trait_impl.rs:48:9 - | -LL | T::foo() - | ^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 10 previous errors +error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/stability-attribute/missing-const-stability.rs b/tests/ui/stability-attribute/missing-const-stability.rs index f1139652550..6d49996c3b5 100644 --- a/tests/ui/stability-attribute/missing-const-stability.rs +++ b/tests/ui/stability-attribute/missing-const-stability.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Znext-solver #![feature(staged_api)] -#![feature(const_trait_impl, effects, rustc_attrs, intrinsics)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl, rustc_attrs, intrinsics)] #![stable(feature = "stable", since = "1.0.0")] #[stable(feature = "stable", since = "1.0.0")] diff --git a/tests/ui/stability-attribute/missing-const-stability.stderr b/tests/ui/stability-attribute/missing-const-stability.stderr index e62a8b88261..ad8a1fa9d36 100644 --- a/tests/ui/stability-attribute/missing-const-stability.stderr +++ b/tests/ui/stability-attribute/missing-const-stability.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/missing-const-stability.rs:3:30 - | -LL | #![feature(const_trait_impl, effects, rustc_attrs, intrinsics)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: function has missing const stability attribute --> $DIR/missing-const-stability.rs:7:1 | @@ -34,5 +25,5 @@ error: associated function has missing const stability attribute LL | pub const fn foo() {} | ^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs index bbf88917905..bac7ee023f4 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs index 04ad94556c3..a0375cda079 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Znext-solver //@ known-bug: unknown -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] #[const_trait] diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr index b8768bd5541..8d1c85c0c8a 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr @@ -1,8 +1,8 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed - --> $DIR/assoc-type-const-bound-usage-1.rs:4:39 + --> $DIR/assoc-type-const-bound-usage-1.rs:4:30 | -LL | #![feature(const_trait_impl, effects, generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ +LL | #![feature(const_trait_impl, generic_const_exprs)] + | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs index 5e873082781..b3a636b0f71 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs @@ -5,8 +5,7 @@ // i.e. check that we validate the const conditions for the associated type // when considering one of implied const bounds. -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.stderr index 1f6532c7a57..86bd07a5f59 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `<T as Trait>::Assoc<U>: ~const Trait` is not satisfied - --> $DIR/assoc-type-const-bound-usage-fail-2.rs:24:5 + --> $DIR/assoc-type-const-bound-usage-fail-2.rs:23:5 | LL | T::Assoc::<U>::func(); | ^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `<T as Trait>::Assoc<U>: ~const Trait` is not satisfied - --> $DIR/assoc-type-const-bound-usage-fail-2.rs:26:5 + --> $DIR/assoc-type-const-bound-usage-fail-2.rs:25:5 | LL | <T as Trait>::Assoc::<U>::func(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs index 73b3d142f7c..ce01086f0dc 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs @@ -4,8 +4,7 @@ // i.e. check that we validate the const conditions for the associated type // when considering one of implied const bounds. -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.stderr index fb08e74eb7f..145fe2c41dd 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `T: ~const Trait` is not satisfied - --> $DIR/assoc-type-const-bound-usage-fail.rs:17:5 + --> $DIR/assoc-type-const-bound-usage-fail.rs:16:5 | LL | T::Assoc::func(); | ^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `T: ~const Trait` is not satisfied - --> $DIR/assoc-type-const-bound-usage-fail.rs:19:5 + --> $DIR/assoc-type-const-bound-usage-fail.rs:18:5 | LL | <T as Trait>::Assoc::func(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/assoc-type.rs b/tests/ui/traits/const-traits/assoc-type.rs index a9394d90ed8..32c91fa51f1 100644 --- a/tests/ui/traits/const-traits/assoc-type.rs +++ b/tests/ui/traits/const-traits/assoc-type.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Add<Rhs = Self> { diff --git a/tests/ui/traits/const-traits/assoc-type.stderr b/tests/ui/traits/const-traits/assoc-type.stderr index 672eaf26f72..b318675b612 100644 --- a/tests/ui/traits/const-traits/assoc-type.stderr +++ b/tests/ui/traits/const-traits/assoc-type.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-type.rs:3:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied --> $DIR/assoc-type.rs:36:16 | @@ -19,6 +10,6 @@ note: required by a bound in `Foo::Bar` LL | type Bar: ~const Add; | ^^^^^^ required by this bound in `Foo::Bar` -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/auxiliary/cross-crate.rs b/tests/ui/traits/const-traits/auxiliary/cross-crate.rs index 8f63cd1d521..01921c140cb 100644 --- a/tests/ui/traits/const-traits/auxiliary/cross-crate.rs +++ b/tests/ui/traits/const-traits/auxiliary/cross-crate.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] pub trait MyTrait { diff --git a/tests/ui/traits/const-traits/auxiliary/staged-api.rs b/tests/ui/traits/const-traits/auxiliary/staged-api.rs index bb591321b84..abe22db702c 100644 --- a/tests/ui/traits/const-traits/auxiliary/staged-api.rs +++ b/tests/ui/traits/const-traits/auxiliary/staged-api.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #![feature(staged_api)] #![stable(feature = "rust1", since = "1.0.0")] diff --git a/tests/ui/traits/const-traits/call-const-closure.rs b/tests/ui/traits/const-traits/call-const-closure.rs index cbf3e6c3ac4..21f4374b8d5 100644 --- a/tests/ui/traits/const-traits/call-const-closure.rs +++ b/tests/ui/traits/const-traits/call-const-closure.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Znext-solver //@ edition:2021 -#![feature(const_trait_impl, effects, const_closures)] +#![feature(const_trait_impl, const_closures)] #![allow(incomplete_features)] #[const_trait] @@ -16,7 +16,7 @@ impl Bar for () { const FOO: () = { (const || ().foo())(); //~^ ERROR the trait bound `(): ~const Bar` is not satisfied - // FIXME(effects): The constness environment for const closures is wrong. + // FIXME(const_trait_impl): The constness environment for const closures is wrong. }; fn main() {} diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.rs b/tests/ui/traits/const-traits/call-const-in-tilde-const.rs index 970ee93fd49..b6d1517499d 100644 --- a/tests/ui/traits/const-traits/call-const-in-tilde-const.rs +++ b/tests/ui/traits/const-traits/call-const-in-tilde-const.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Foo { fn foo(); diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr b/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr index 49c310f1f75..e56968b9097 100644 --- a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr +++ b/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr @@ -1,18 +1,9 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/call-const-in-tilde-const.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0277]: the trait bound `T: const Foo` is not satisfied - --> $DIR/call-const-in-tilde-const.rs:10:13 + --> $DIR/call-const-in-tilde-const.rs:9:13 | LL | const { T::foo() } | ^^^^^^^^ -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/call-const-trait-method-fail.rs b/tests/ui/traits/const-traits/call-const-trait-method-fail.rs index 878f9a713a0..e06d04db804 100644 --- a/tests/ui/traits/const-traits/call-const-trait-method-fail.rs +++ b/tests/ui/traits/const-traits/call-const-trait-method-fail.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] pub trait Plus { diff --git a/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr b/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr index 40a06af85ed..b461fd9e39e 100644 --- a/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr +++ b/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `u32: ~const Plus` is not satisfied - --> $DIR/call-const-trait-method-fail.rs:27:5 + --> $DIR/call-const-trait-method-fail.rs:26:5 | LL | a.plus(b) | ^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr b/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr index 32f53137a00..9ae1ed18e35 100644 --- a/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr +++ b/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr @@ -24,18 +24,6 @@ LL | const ADD_INT: Int = Int(1i32) + Int(2i32); | = note: calls in constants are limited to constant functions, tuple structs and tuple variants -error[E0015]: cannot call non-const fn `<i32 as Plus>::plus` in constant functions - --> $DIR/call-const-trait-method-pass.rs:11:20 - | -LL | Int(self.0.plus(rhs.0)) - | ^^^^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - error[E0015]: cannot call non-const fn `<Int as PartialEq>::eq` in constant functions --> $DIR/call-const-trait-method-pass.rs:20:15 | @@ -44,18 +32,6 @@ LL | !self.eq(other) | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error[E0015]: cannot call non-const fn `<i32 as Plus>::plus` in constant functions - --> $DIR/call-const-trait-method-pass.rs:36:7 - | -LL | a.plus(b) - | ^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 6 previous errors +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/call-generic-in-impl.rs b/tests/ui/traits/const-traits/call-generic-in-impl.rs index 6b3a4ae1b95..6149dc3d126 100644 --- a/tests/ui/traits/const-traits/call-generic-in-impl.rs +++ b/tests/ui/traits/const-traits/call-generic-in-impl.rs @@ -1,5 +1,5 @@ //@ known-bug: #110395 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass #![feature(const_trait_impl)] #[const_trait] diff --git a/tests/ui/traits/const-traits/call-generic-method-chain.rs b/tests/ui/traits/const-traits/call-generic-method-chain.rs index e5baedae818..74beab71208 100644 --- a/tests/ui/traits/const-traits/call-generic-method-chain.rs +++ b/tests/ui/traits/const-traits/call-generic-method-chain.rs @@ -2,9 +2,9 @@ //@ known-bug: #110395 //@ compile-flags: -Znext-solver -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; diff --git a/tests/ui/traits/const-traits/call-generic-method-chain.stderr b/tests/ui/traits/const-traits/call-generic-method-chain.stderr index 6dbf3ad2526..9a53c61d019 100644 --- a/tests/ui/traits/const-traits/call-generic-method-chain.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-chain.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/call-generic-method-chain.rs:7:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` --> $DIR/call-generic-method-chain.rs:11:12 | @@ -64,6 +55,6 @@ LL | !self.eq(other) | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 7 previous errors; 1 warning emitted +error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs index 83a4bb25436..ec615d8484c 100644 --- a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs +++ b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs @@ -1,8 +1,8 @@ //@ compile-flags: -Znext-solver //@ known-bug: #110395 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; diff --git a/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr b/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr index 08877daad79..a168171cfe8 100644 --- a/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/call-generic-method-dup-bound.rs:5:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` --> $DIR/call-generic-method-dup-bound.rs:9:12 | @@ -76,6 +67,6 @@ help: consider further restricting this bound LL | const fn equals_self2<T: A + ~const PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool { | ++++++++++++++++++++++++++++ -error: aborting due to 8 previous errors; 1 warning emitted +error: aborting due to 8 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/call-generic-method-fail.rs b/tests/ui/traits/const-traits/call-generic-method-fail.rs index 6bfbbef6f76..66881334a29 100644 --- a/tests/ui/traits/const-traits/call-generic-method-fail.rs +++ b/tests/ui/traits/const-traits/call-generic-method-fail.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] pub const fn equals_self<T: PartialEq>(t: &T) -> bool { *t == *t diff --git a/tests/ui/traits/const-traits/call-generic-method-fail.stderr b/tests/ui/traits/const-traits/call-generic-method-fail.stderr index 5cd4216dce1..07e50a7f7da 100644 --- a/tests/ui/traits/const-traits/call-generic-method-fail.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-fail.stderr @@ -1,5 +1,5 @@ error[E0015]: cannot call non-const operator in constant functions - --> $DIR/call-generic-method-fail.rs:6:5 + --> $DIR/call-generic-method-fail.rs:5:5 | LL | *t == *t | ^^^^^^^^ diff --git a/tests/ui/traits/const-traits/call-generic-method-nonconst.rs b/tests/ui/traits/const-traits/call-generic-method-nonconst.rs index f9e79d41752..446a74eb7b7 100644 --- a/tests/ui/traits/const-traits/call-generic-method-nonconst.rs +++ b/tests/ui/traits/const-traits/call-generic-method-nonconst.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; diff --git a/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr b/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr index 06b99375cda..d881bd5f4de 100644 --- a/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `S: const Foo` is not satisfied - --> $DIR/call-generic-method-nonconst.rs:25:22 + --> $DIR/call-generic-method-nonconst.rs:24:22 | LL | pub const EQ: bool = equals_self(&S); | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/call-generic-method-pass.rs b/tests/ui/traits/const-traits/call-generic-method-pass.rs index cbeeb2567dd..af793b8da03 100644 --- a/tests/ui/traits/const-traits/call-generic-method-pass.rs +++ b/tests/ui/traits/const-traits/call-generic-method-pass.rs @@ -2,9 +2,9 @@ //@ compile-flags: -Znext-solver //@ known-bug: #110395 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; diff --git a/tests/ui/traits/const-traits/call-generic-method-pass.stderr b/tests/ui/traits/const-traits/call-generic-method-pass.stderr index ac08c057435..af6e6d25dc9 100644 --- a/tests/ui/traits/const-traits/call-generic-method-pass.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-pass.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/call-generic-method-pass.rs:7:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` --> $DIR/call-generic-method-pass.rs:11:12 | @@ -50,6 +41,6 @@ LL | !self.eq(other) | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/call.rs b/tests/ui/traits/const-traits/call.rs index f96fb614ac2..b985e3da345 100644 --- a/tests/ui/traits/const-traits/call.rs +++ b/tests/ui/traits/const-traits/call.rs @@ -1,6 +1,6 @@ -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass //@ compile-flags: -Znext-solver -#![feature(const_closures, const_trait_impl, effects)] +#![feature(const_closures, const_trait_impl)] #![allow(incomplete_features)] pub const _: () = { diff --git a/tests/ui/traits/const-traits/const-bound-in-host.rs b/tests/ui/traits/const-traits/const-bound-in-host.rs index 6fbc21074b6..b4c4f5a6de1 100644 --- a/tests/ui/traits/const-traits/const-bound-in-host.rs +++ b/tests/ui/traits/const-traits/const-bound-in-host.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Foo { fn foo(); diff --git a/tests/ui/traits/const-traits/const-bound-in-host.stderr b/tests/ui/traits/const-traits/const-bound-in-host.stderr deleted file mode 100644 index b815f745ee8..00000000000 --- a/tests/ui/traits/const-traits/const-bound-in-host.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-bound-in-host.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs index 7c3e2af1797..c735f855bce 100644 --- a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs +++ b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait MyTrait { diff --git a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr index ae1260ffab7..50ab52ade49 100644 --- a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr +++ b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr @@ -1,23 +1,23 @@ error: `~const` is not allowed here - --> $DIR/const-bound-on-not-const-associated-fn.rs:12:40 + --> $DIR/const-bound-on-not-const-associated-fn.rs:11:40 | LL | fn do_something_else() where Self: ~const MyTrait; | ^^^^^^ | note: this function is not `const`, so it cannot have `~const` trait bounds - --> $DIR/const-bound-on-not-const-associated-fn.rs:12:8 + --> $DIR/const-bound-on-not-const-associated-fn.rs:11:8 | LL | fn do_something_else() where Self: ~const MyTrait; | ^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here - --> $DIR/const-bound-on-not-const-associated-fn.rs:23:32 + --> $DIR/const-bound-on-not-const-associated-fn.rs:22:32 | LL | pub fn foo(&self) where T: ~const MyTrait { | ^^^^^^ | note: this function is not `const`, so it cannot have `~const` trait bounds - --> $DIR/const-bound-on-not-const-associated-fn.rs:23:12 + --> $DIR/const-bound-on-not-const-associated-fn.rs:22:12 | LL | pub fn foo(&self) where T: ~const MyTrait { | ^^^ diff --git a/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs b/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs index d51d231b8a9..e446eb15481 100644 --- a/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs +++ b/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs @@ -1,5 +1,5 @@ // Regression test for issue #117244. -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] trait NonConst {} diff --git a/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr b/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr index 8e836685eb0..2436c97ccf2 100644 --- a/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr +++ b/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-bounds-non-const-trait.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: `~const` can only be applied to `#[const_trait]` traits --> $DIR/const-bounds-non-const-trait.rs:6:21 | @@ -27,5 +18,5 @@ error: `const` can only be applied to `#[const_trait]` traits LL | fn operate<T: const NonConst>() {} | ^^^^^ -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors diff --git a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs index 7f9b38b8207..0330ed5ca8b 100644 --- a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs +++ b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] struct S; #[const_trait] diff --git a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr index ba12854987e..d111a9d5639 100644 --- a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr +++ b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-check-fns-in-const-impl.rs:3:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0015]: cannot call non-const fn `non_const` in constant functions --> $DIR/const-check-fns-in-const-impl.rs:14:16 | @@ -15,6 +6,6 @@ LL | fn foo() { non_const() } | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/const-default-method-bodies.rs b/tests/ui/traits/const-traits/const-default-method-bodies.rs index a0333153f85..0ef11a7f0c9 100644 --- a/tests/ui/traits/const-traits/const-default-method-bodies.rs +++ b/tests/ui/traits/const-traits/const-default-method-bodies.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait ConstDefaultFn: Sized { diff --git a/tests/ui/traits/const-traits/const-default-method-bodies.stderr b/tests/ui/traits/const-traits/const-default-method-bodies.stderr index 071eaf49541..5879330f158 100644 --- a/tests/ui/traits/const-traits/const-default-method-bodies.stderr +++ b/tests/ui/traits/const-traits/const-default-method-bodies.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied - --> $DIR/const-default-method-bodies.rs:26:5 + --> $DIR/const-default-method-bodies.rs:25:5 | LL | NonConstImpl.a(); | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.rs b/tests/ui/traits/const-traits/const-drop-fail-2.rs index 7b57e0405af..5d7bafa3887 100644 --- a/tests/ui/traits/const-traits/const-drop-fail-2.rs +++ b/tests/ui/traits/const-traits/const-drop-fail-2.rs @@ -20,7 +20,7 @@ impl A for NonTrivialDrop {} const fn check<T: ~const Destruct>(_: T) {} -/* FIXME(effects) +/* FIXME(const_trait_impl) struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>); impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> { diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.stderr index 102dbb1a599..fde106599c2 100644 --- a/tests/ui/traits/const-traits/const-drop-fail-2.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail-2.stderr @@ -21,33 +21,21 @@ LL | const fn check<T: ~const Destruct>(_: T) {} | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0493]: destructor of `T` cannot be evaluated at compile-time - --> $DIR/const-drop-fail-2.rs:20:36 - | -LL | const fn check<T: ~const Destruct>(_: T) {} - | ^ - value is dropped here - | | - | the destructor for this type cannot be evaluated in constant functions - error[E0277]: the trait bound `T: ~const A` is not satisfied --> $DIR/const-drop-fail-2.rs:41:9 | LL | T::a(); | ^^^^^^ -error[E0015]: cannot call non-const fn `<T as A>::a` in constant functions - --> $DIR/const-drop-fail-2.rs:41:9 - | -LL | T::a(); - | ^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] +error[E0493]: destructor of `T` cannot be evaluated at compile-time + --> $DIR/const-drop-fail-2.rs:20:36 | +LL | const fn check<T: ~const Destruct>(_: T) {} + | ^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions -error: aborting due to 6 previous errors +error: aborting due to 5 previous errors -Some errors have detailed explanations: E0015, E0277, E0493. -For more information about an error, try `rustc --explain E0015`. +Some errors have detailed explanations: E0277, E0493. +For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/const-drop.precise.stderr b/tests/ui/traits/const-traits/const-drop.precise.stderr index 7471b200c33..ed90b234761 100644 --- a/tests/ui/traits/const-traits/const-drop.precise.stderr +++ b/tests/ui/traits/const-traits/const-drop.precise.stderr @@ -84,19 +84,7 @@ error[E0277]: the trait bound `T: ~const SomeTrait` is not satisfied LL | T::foo(); | ^^^^^^^^ -error[E0015]: cannot call non-const fn `<T as SomeTrait>::foo` in constant functions - --> $DIR/const-drop.rs:69:13 - | -LL | T::foo(); - | ^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 11 previous errors +error: aborting due to 10 previous errors -Some errors have detailed explanations: E0015, E0277, E0493. -For more information about an error, try `rustc --explain E0015`. +Some errors have detailed explanations: E0277, E0493. +For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/const-drop.stock.stderr b/tests/ui/traits/const-traits/const-drop.stock.stderr index 71378349161..2b46b048e90 100644 --- a/tests/ui/traits/const-traits/const-drop.stock.stderr +++ b/tests/ui/traits/const-traits/const-drop.stock.stderr @@ -86,19 +86,7 @@ error[E0277]: the trait bound `T: ~const SomeTrait` is not satisfied LL | T::foo(); | ^^^^^^^^ -error[E0015]: cannot call non-const fn `<T as SomeTrait>::foo` in constant functions - --> $DIR/const-drop.rs:69:13 - | -LL | T::foo(); - | ^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 11 previous errors +error: aborting due to 10 previous errors -Some errors have detailed explanations: E0015, E0277, E0493. -For more information about an error, try `rustc --explain E0015`. +Some errors have detailed explanations: E0277, E0493. +For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/const-fns-are-early-bound.rs b/tests/ui/traits/const-traits/const-fns-are-early-bound.rs index 6d08d8bdd91..c26eaf67454 100644 --- a/tests/ui/traits/const-traits/const-fns-are-early-bound.rs +++ b/tests/ui/traits/const-traits/const-fns-are-early-bound.rs @@ -1,7 +1,7 @@ //@ known-bug: #110395 //@ failure-status: 101 //@ dont-check-compiler-stderr -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass //@ compile-flags: -Znext-solver #![crate_type = "lib"] diff --git a/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs b/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs index e49e9090eb4..6bea664b65f 100644 --- a/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs +++ b/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] pub trait A {} diff --git a/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr b/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr index 828e2174f00..bcaae381949 100644 --- a/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr +++ b/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr @@ -1,5 +1,5 @@ error: const `impl` for trait `A` which is not marked with `#[const_trait]` - --> $DIR/const-impl-requires-const-trait.rs:7:12 + --> $DIR/const-impl-requires-const-trait.rs:6:12 | LL | pub trait A {} | - help: mark `A` as const: `#[const_trait]` diff --git a/tests/ui/traits/const-traits/const-in-closure.rs b/tests/ui/traits/const-traits/const-in-closure.rs index 51b22c53036..ebc17a50c86 100644 --- a/tests/ui/traits/const-traits/const-in-closure.rs +++ b/tests/ui/traits/const-traits/const-in-closure.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Trait { fn method(); diff --git a/tests/ui/traits/const-traits/const-in-closure.stderr b/tests/ui/traits/const-traits/const-in-closure.stderr deleted file mode 100644 index f4b03b9ed20..00000000000 --- a/tests/ui/traits/const-traits/const-in-closure.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-in-closure.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs index 691bce19dc2..2dac1970835 100644 --- a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs +++ b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs @@ -1,5 +1,5 @@ #![feature(const_trait_impl)] -// FIXME(effects) add effects +// FIXME(const_trait_impl) add effects //@ edition: 2021 #[const_trait] diff --git a/tests/ui/traits/const-traits/const-trait-bounds.rs b/tests/ui/traits/const-traits/const-trait-bounds.rs index 3b4ba6a998f..8722d9909ed 100644 --- a/tests/ui/traits/const-traits/const-trait-bounds.rs +++ b/tests/ui/traits/const-traits/const-trait-bounds.rs @@ -1,7 +1,7 @@ //@ known-bug: #110395 //@ compile-flags: -Znext-solver -// FIXME(effects): check-pass -#![feature(const_trait_impl, effects, generic_const_exprs)] +// FIXME(const_trait_impl): check-pass +#![feature(const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] fn main() { diff --git a/tests/ui/traits/const-traits/const-trait-bounds.stderr b/tests/ui/traits/const-traits/const-trait-bounds.stderr index 698b1b5b578..29a01b9d7dc 100644 --- a/tests/ui/traits/const-traits/const-trait-bounds.stderr +++ b/tests/ui/traits/const-traits/const-trait-bounds.stderr @@ -1,8 +1,8 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed - --> $DIR/const-trait-bounds.rs:4:39 + --> $DIR/const-trait-bounds.rs:4:30 | -LL | #![feature(const_trait_impl, effects, generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ +LL | #![feature(const_trait_impl, generic_const_exprs)] + | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs index 5896091f8c4..7bda7117a47 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs +++ b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs @@ -1,5 +1,5 @@ //@ known-bug: #110395 -#![feature(derive_const, effects)] +#![feature(derive_const)] pub struct A; diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr index 8f4235dabad..9492000a563 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr +++ b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/derive-const-non-const-type.rs:2:26 - | -LL | #![feature(derive_const, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `Default` which is not marked with `#[const_trait]` --> $DIR/derive-const-non-const-type.rs:10:16 | @@ -28,6 +19,6 @@ LL | pub struct S(A); = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-use.rs b/tests/ui/traits/const-traits/const_derives/derive-const-use.rs index cb649b1ec79..1e447147213 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-use.rs +++ b/tests/ui/traits/const-traits/const_derives/derive-const-use.rs @@ -1,6 +1,6 @@ //@ known-bug: #110395 -#![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] +#![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)] pub struct A; diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr index 7fc44229e2a..6f4fc90f636 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr +++ b/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr @@ -1,22 +1,13 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/derive-const-use.rs:3:76 - | -LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0635]: unknown feature `const_cmp` --> $DIR/derive-const-use.rs:3:30 | -LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] +LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)] | ^^^^^^^^^ error[E0635]: unknown feature `const_default_impls` --> $DIR/derive-const-use.rs:3:41 | -LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] +LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)] | ^^^^^^^^^^^^^^^^^^^ error: const `impl` for trait `Default` which is not marked with `#[const_trait]` @@ -117,7 +108,7 @@ LL | pub struct S((), A); = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 12 previous errors; 1 warning emitted +error: aborting due to 12 previous errors Some errors have detailed explanations: E0015, E0635. For more information about an error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs index c032c76d38f..18b224af278 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs +++ b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs @@ -1,8 +1,8 @@ //@ known-bug: #110395 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass #![feature(derive_const)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[derive_const(PartialEq)] pub struct Reverse<T>(T); diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr index 1395947bb15..21cf64f89ea 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr +++ b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/derive-const-with-params.rs:5:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` --> $DIR/derive-const-with-params.rs:7:16 | @@ -38,6 +29,6 @@ LL | a == b | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs b/tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs index 9ee5254dbf8..80b4124a644 100644 --- a/tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs +++ b/tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs @@ -3,8 +3,7 @@ // //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] //@ aux-build: cross-crate.rs extern crate cross_crate; diff --git a/tests/ui/traits/const-traits/cross-crate.rs b/tests/ui/traits/const-traits/cross-crate.rs index 30d2260a744..9558ec6164e 100644 --- a/tests/ui/traits/const-traits/cross-crate.rs +++ b/tests/ui/traits/const-traits/cross-crate.rs @@ -1,7 +1,7 @@ //@ revisions: stock gated stocknc gatednc //@ [gated] check-pass //@ compile-flags: -Znext-solver -#![cfg_attr(any(gated, gatednc), feature(const_trait_impl, effects))] +#![cfg_attr(any(gated, gatednc), feature(const_trait_impl))] #![allow(incomplete_features)] //@ aux-build: cross-crate.rs diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr index 308a60c08d3..0534f3eb8d2 100644 --- a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr +++ b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr @@ -3,12 +3,6 @@ error[E0277]: the trait bound `(): ~const Tr` is not satisfied | LL | foo::<()>(); | ^^^^^^^^^^^ - | -note: required by a bound in `foo` - --> $DIR/default-method-body-is-const-body-checking.rs:7:28 - | -LL | const fn foo<T>() where T: ~const Tr {} - | ^^^^^^ required by this bound in `foo` error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs index 0c2d93775a4..b3beba08237 100644 --- a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs +++ b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] pub trait Tr { diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr index 7b4d512e391..d987cad6f14 100644 --- a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr +++ b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `(): ~const Tr` is not satisfied - --> $DIR/default-method-body-is-const-same-trait-ck.rs:10:9 + --> $DIR/default-method-body-is-const-same-trait-ck.rs:9:9 | LL | ().a() | ^^^^^^ diff --git a/tests/ui/traits/const-traits/do-not-const-check-override.rs b/tests/ui/traits/const-traits/do-not-const-check-override.rs index 71e6375283f..2b8e1d38ac9 100644 --- a/tests/ui/traits/const-traits/do-not-const-check-override.rs +++ b/tests/ui/traits/const-traits/do-not-const-check-override.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags: -Znext-solver #![allow(incomplete_features)] -#![feature(const_trait_impl, rustc_attrs, effects)] +#![feature(const_trait_impl, rustc_attrs)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/do-not-const-check.rs b/tests/ui/traits/const-traits/do-not-const-check.rs index d227a9a9c09..443b6385735 100644 --- a/tests/ui/traits/const-traits/do-not-const-check.rs +++ b/tests/ui/traits/const-traits/do-not-const-check.rs @@ -1,6 +1,5 @@ //@ check-pass -#![feature(const_trait_impl, rustc_attrs, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl, rustc_attrs)] #[const_trait] trait IntoIter { diff --git a/tests/ui/traits/const-traits/do-not-const-check.stderr b/tests/ui/traits/const-traits/do-not-const-check.stderr deleted file mode 100644 index 0d81ef74e8d..00000000000 --- a/tests/ui/traits/const-traits/do-not-const-check.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/do-not-const-check.rs:2:43 - | -LL | #![feature(const_trait_impl, rustc_attrs, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/dont-observe-host-opaque.rs b/tests/ui/traits/const-traits/dont-observe-host-opaque.rs index 4a5ae346e39..751ba1cb8c7 100644 --- a/tests/ui/traits/const-traits/dont-observe-host-opaque.rs +++ b/tests/ui/traits/const-traits/dont-observe-host-opaque.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] const fn opaque() -> impl Sized {} diff --git a/tests/ui/traits/const-traits/dont-observe-host-opaque.stderr b/tests/ui/traits/const-traits/dont-observe-host-opaque.stderr deleted file mode 100644 index 1b457ab7643..00000000000 --- a/tests/ui/traits/const-traits/dont-observe-host-opaque.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/dont-observe-host-opaque.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/dont-observe-host.rs b/tests/ui/traits/const-traits/dont-observe-host.rs index d027d578c42..06050385f91 100644 --- a/tests/ui/traits/const-traits/dont-observe-host.rs +++ b/tests/ui/traits/const-traits/dont-observe-host.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/dont-observe-host.stderr b/tests/ui/traits/const-traits/dont-observe-host.stderr deleted file mode 100644 index 64ef611f011..00000000000 --- a/tests/ui/traits/const-traits/dont-observe-host.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/dont-observe-host.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs b/tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs index 779527e22d4..e02bf6a4d2c 100644 --- a/tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs +++ b/tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] pub const fn foo() {} diff --git a/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs b/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs index 8f8e9f06584..877249135cd 100644 --- a/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs +++ b/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_closures, const_trait_impl, effects)] +#![feature(const_closures, const_trait_impl)] #![allow(incomplete_features)] trait Foo { @@ -13,5 +13,5 @@ impl Foo for () { fn main() { (const || { (()).foo() })(); //~^ ERROR: cannot call non-const fn `<() as Foo>::foo` in constant functions - // FIXME(effects) this should probably say constant closures + // FIXME(const_trait_impl) this should probably say constant closures } diff --git a/tests/ui/traits/const-traits/effects/effect-param-infer.rs b/tests/ui/traits/const-traits/effects/effect-param-infer.rs index 958b9ac6d57..fcacf458a9f 100644 --- a/tests/ui/traits/const-traits/effects/effect-param-infer.rs +++ b/tests/ui/traits/const-traits/effects/effect-param-infer.rs @@ -3,8 +3,7 @@ // //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] pub trait Foo<Rhs: ?Sized = Self> { diff --git a/tests/ui/traits/const-traits/effects/fallback.rs b/tests/ui/traits/const-traits/effects/fallback.rs index 4cfba00526b..253d16f3251 100644 --- a/tests/ui/traits/const-traits/effects/fallback.rs +++ b/tests/ui/traits/const-traits/effects/fallback.rs @@ -1,7 +1,5 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(effects)] pub const fn owo() {} diff --git a/tests/ui/traits/const-traits/effects/helloworld.rs b/tests/ui/traits/const-traits/effects/helloworld.rs deleted file mode 100644 index 54f362b4413..00000000000 --- a/tests/ui/traits/const-traits/effects/helloworld.rs +++ /dev/null @@ -1,33 +0,0 @@ -//@ check-pass -//@ compile-flags: -Znext-solver -// gate-test-effects -// ^ effects doesn't have a gate so we will trick tidy into thinking this is a gate test -#![allow(incomplete_features)] -#![feature( - const_trait_impl, - effects, - core_intrinsics, - const_eval_select -)] - -// ensure we are passing in the correct host effect in always const contexts. - -pub const fn hmm<T>() -> usize { - // FIXME(const_trait_impl): maybe we should have a way to refer to the (hidden) effect param - fn one() -> usize { 1 } - const fn zero() -> usize { 0 } - unsafe { - std::intrinsics::const_eval_select((), zero, one) - } -} - -const _: () = { - let x = hmm::<()>(); - assert!(0 == x); -}; - -pub const fn uwu(x: [u8; hmm::<()>()]) { - let [] = x; -} - -fn main() {} diff --git a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs index ab530b109e1..c467088ab3d 100644 --- a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs +++ b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] const fn test() -> impl ~const Fn() { //~^ ERROR `~const` can only be applied to `#[const_trait]` traits diff --git a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr index 36184856035..6d7edaf19f2 100644 --- a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr +++ b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr @@ -8,15 +8,6 @@ LL | const move || { = help: add `#![feature(const_closures)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/ice-112822-expected-type-for-param.rs:1:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: `~const` can only be applied to `#[const_trait]` traits --> $DIR/ice-112822-expected-type-for-param.rs:3:25 | @@ -49,7 +40,7 @@ LL | assert_eq!(first, &b'f'); = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors Some errors have detailed explanations: E0015, E0658. For more information about an error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs b/tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs index 06e3377c5ee..f3cbaf847a9 100644 --- a/tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs +++ b/tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs @@ -3,7 +3,7 @@ // effects ice https://github.com/rust-lang/rust/issues/113375 index out of bounds #![allow(incomplete_features, unused)] -#![feature(effects, adt_const_params)] +#![feature(adt_const_params)] struct Bar<T>(T); diff --git a/tests/ui/traits/const-traits/effects/infer-fallback.rs b/tests/ui/traits/const-traits/effects/infer-fallback.rs index 581c3949d38..a7342d72a9c 100644 --- a/tests/ui/traits/const-traits/effects/infer-fallback.rs +++ b/tests/ui/traits/const-traits/effects/infer-fallback.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] const fn a() {} diff --git a/tests/ui/traits/const-traits/effects/minicore.rs b/tests/ui/traits/const-traits/effects/minicore.rs index 1f0d22eeb38..50badcd2e87 100644 --- a/tests/ui/traits/const-traits/effects/minicore.rs +++ b/tests/ui/traits/const-traits/effects/minicore.rs @@ -3,17 +3,24 @@ //@ normalize-stderr-test: ".*note: .*\n\n" -> "" //@ normalize-stderr-test: "thread 'rustc' panicked.*:\n.*\n" -> "" //@ rustc-env:RUST_BACKTRACE=0 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass //@ compile-flags: -Znext-solver #![crate_type = "lib"] -#![feature(no_core, lang_items, unboxed_closures, auto_traits, intrinsics, rustc_attrs, staged_api)] -#![feature(fundamental, marker_trait_attr)] -#![feature(const_trait_impl, effects)] +#![feature( + no_core, + lang_items, + unboxed_closures, + auto_traits, + intrinsics, + rustc_attrs, + fundamental, + marker_trait_attr, + const_trait_impl +)] #![allow(internal_features, incomplete_features)] #![no_std] #![no_core] -#![stable(feature = "minicore", since = "1.0.0")] #[lang = "sized"] trait Sized {} diff --git a/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr b/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr index eea6a06c1c8..d1180dbd80e 100644 --- a/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr +++ b/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr @@ -7,7 +7,7 @@ LL | foo::<false>(); | expected 0 generic arguments | note: function defined here, with 0 generic parameters - --> $DIR/auxiliary/cross-crate.rs:5:14 + --> $DIR/auxiliary/cross-crate.rs:4:14 | LL | pub const fn foo() {} | ^^^ @@ -21,7 +21,7 @@ LL | <() as Bar<false>>::bar(); | expected 0 generic arguments | note: trait defined here, with 0 generic parameters - --> $DIR/auxiliary/cross-crate.rs:8:11 + --> $DIR/auxiliary/cross-crate.rs:7:11 | LL | pub trait Bar { | ^^^ @@ -35,7 +35,7 @@ LL | foo::<true>(); | expected 0 generic arguments | note: function defined here, with 0 generic parameters - --> $DIR/auxiliary/cross-crate.rs:5:14 + --> $DIR/auxiliary/cross-crate.rs:4:14 | LL | pub const fn foo() {} | ^^^ @@ -49,7 +49,7 @@ LL | <() as Bar<true>>::bar(); | expected 0 generic arguments | note: trait defined here, with 0 generic parameters - --> $DIR/auxiliary/cross-crate.rs:8:11 + --> $DIR/auxiliary/cross-crate.rs:7:11 | LL | pub trait Bar { | ^^^ diff --git a/tests/ui/traits/const-traits/effects/no-explicit-const-params.rs b/tests/ui/traits/const-traits/effects/no-explicit-const-params.rs index c6b94fa2230..76663292223 100644 --- a/tests/ui/traits/const-traits/effects/no-explicit-const-params.rs +++ b/tests/ui/traits/const-traits/effects/no-explicit-const-params.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] const fn foo() {} diff --git a/tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr b/tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr index bd9acc7a6d2..0b8e4696c46 100644 --- a/tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr +++ b/tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/no-explicit-const-params.rs:1:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/no-explicit-const-params.rs:22:5 | @@ -69,7 +60,7 @@ note: trait defined here, with 0 generic parameters LL | trait Bar { | ^^^ -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors Some errors have detailed explanations: E0107, E0277. For more information about an error, try `rustc --explain E0107`. diff --git a/tests/ui/traits/const-traits/effects/project.rs b/tests/ui/traits/const-traits/effects/project.rs index 9f6ca1f294f..139299753e5 100644 --- a/tests/ui/traits/const-traits/effects/project.rs +++ b/tests/ui/traits/const-traits/effects/project.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] pub trait Owo<X = <Self as Uwu>::T> {} diff --git a/tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs index e6e41c472bd..50a7e12f2a7 100644 --- a/tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs +++ b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs @@ -1,5 +1,4 @@ #![feature(const_trait_impl)] -#![feature(effects)] //~ WARN the feature `effects` is incomplete struct S; trait T {} diff --git a/tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr index 97663232fcf..fe1e5e558b2 100644 --- a/tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr +++ b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr @@ -1,5 +1,5 @@ error: inherent impls cannot be `const` - --> $DIR/span-bug-issue-121418.rs:7:12 + --> $DIR/span-bug-issue-121418.rs:6:12 | LL | impl const dyn T { | ----- ^^^^^ inherent impl for this type @@ -8,17 +8,8 @@ LL | impl const dyn T { | = note: only trait implementations may be annotated with `const` -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/span-bug-issue-121418.rs:2:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0308]: mismatched types - --> $DIR/span-bug-issue-121418.rs:9:27 + --> $DIR/span-bug-issue-121418.rs:8:27 | LL | pub const fn new() -> std::sync::Mutex<dyn T> {} | --- ^^^^^^^^^^^^^^^^^^^^^^^ expected `Mutex<dyn T>`, found `()` @@ -29,7 +20,7 @@ LL | pub const fn new() -> std::sync::Mutex<dyn T> {} found unit type `()` error[E0277]: the size for values of type `(dyn T + 'static)` cannot be known at compilation time - --> $DIR/span-bug-issue-121418.rs:9:27 + --> $DIR/span-bug-issue-121418.rs:8:27 | LL | pub const fn new() -> std::sync::Mutex<dyn T> {} | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -39,7 +30,7 @@ note: required because it appears within the type `Mutex<(dyn T + 'static)>` --> $SRC_DIR/std/src/sync/mutex.rs:LL:COL = note: the return type of a function must have a statically known size -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs index d29cd93d3fb..c85b1746967 100644 --- a/tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs +++ b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs @@ -1,6 +1,5 @@ // Fixes #119830 -#![feature(effects)] //~ WARN the feature `effects` is incomplete #![feature(min_specialization)] #![feature(const_trait_impl)] diff --git a/tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr index 273f9943212..5659102c5e5 100644 --- a/tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr +++ b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr @@ -1,14 +1,5 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/spec-effectvar-ice.rs:3:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `Foo` which is not marked with `#[const_trait]` - --> $DIR/spec-effectvar-ice.rs:11:15 + --> $DIR/spec-effectvar-ice.rs:10:15 | LL | trait Foo {} | - help: mark `Foo` as const: `#[const_trait]` @@ -20,7 +11,7 @@ LL | impl<T> const Foo for T {} = note: adding a non-const method body in the future would be a breaking change error: const `impl` for trait `Foo` which is not marked with `#[const_trait]` - --> $DIR/spec-effectvar-ice.rs:14:15 + --> $DIR/spec-effectvar-ice.rs:13:15 | LL | trait Foo {} | - help: mark `Foo` as const: `#[const_trait]` @@ -32,28 +23,28 @@ LL | impl<T> const Foo for T where T: const Specialize {} = note: adding a non-const method body in the future would be a breaking change error: `const` can only be applied to `#[const_trait]` traits - --> $DIR/spec-effectvar-ice.rs:14:34 + --> $DIR/spec-effectvar-ice.rs:13:34 | LL | impl<T> const Foo for T where T: const Specialize {} | ^^^^^ error: specialization impl does not specialize any associated items - --> $DIR/spec-effectvar-ice.rs:14:1 + --> $DIR/spec-effectvar-ice.rs:13:1 | LL | impl<T> const Foo for T where T: const Specialize {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: impl is a specialization of this impl - --> $DIR/spec-effectvar-ice.rs:11:1 + --> $DIR/spec-effectvar-ice.rs:10:1 | LL | impl<T> const Foo for T {} | ^^^^^^^^^^^^^^^^^^^^^^^ error: cannot specialize on trait `Specialize` - --> $DIR/spec-effectvar-ice.rs:14:34 + --> $DIR/spec-effectvar-ice.rs:13:34 | LL | impl<T> const Foo for T where T: const Specialize {} | ^^^^^^^^^^^^^^^^ -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors diff --git a/tests/ui/traits/const-traits/effects/trait-fn-const.rs b/tests/ui/traits/const-traits/effects/trait-fn-const.rs index d63dbfbf57d..07eac032a82 100644 --- a/tests/ui/traits/const-traits/effects/trait-fn-const.rs +++ b/tests/ui/traits/const-traits/effects/trait-fn-const.rs @@ -1,5 +1,5 @@ // Regression test for issue #113378. -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/effects/trait-fn-const.stderr b/tests/ui/traits/const-traits/effects/trait-fn-const.stderr index 33914cb306d..4d0b03046d2 100644 --- a/tests/ui/traits/const-traits/effects/trait-fn-const.stderr +++ b/tests/ui/traits/const-traits/effects/trait-fn-const.stderr @@ -54,15 +54,6 @@ LL + #[const_trait] LL | trait NonConst { | -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/trait-fn-const.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0379`. diff --git a/tests/ui/traits/const-traits/fn-ptr-lub.rs b/tests/ui/traits/const-traits/fn-ptr-lub.rs index 0fc32678827..8f1a29e612c 100644 --- a/tests/ui/traits/const-traits/fn-ptr-lub.rs +++ b/tests/ui/traits/const-traits/fn-ptr-lub.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] const fn foo() {} const fn bar() {} diff --git a/tests/ui/traits/const-traits/fn-ptr-lub.stderr b/tests/ui/traits/const-traits/fn-ptr-lub.stderr deleted file mode 100644 index b333311b660..00000000000 --- a/tests/ui/traits/const-traits/fn-ptr-lub.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/fn-ptr-lub.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/hir-const-check.rs b/tests/ui/traits/const-traits/hir-const-check.rs index 0ffd60682b0..ea1783b7c2c 100644 --- a/tests/ui/traits/const-traits/hir-const-check.rs +++ b/tests/ui/traits/const-traits/hir-const-check.rs @@ -2,7 +2,7 @@ // Regression test for #69615. -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] pub trait MyTrait { diff --git a/tests/ui/traits/const-traits/hir-const-check.stderr b/tests/ui/traits/const-traits/hir-const-check.stderr index a22ac2c9739..ef5dba0dc0e 100644 --- a/tests/ui/traits/const-traits/hir-const-check.stderr +++ b/tests/ui/traits/const-traits/hir-const-check.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/hir-const-check.rs:5:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0658]: `?` is not allowed in a `const fn` --> $DIR/hir-const-check.rs:14:9 | @@ -37,7 +28,7 @@ note: impl defined here, but it is not `const` --> $SRC_DIR/core/src/option.rs:LL:COL = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0015, E0658. For more information about an error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs index c2f452a9925..dc1e719bded 100644 --- a/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs +++ b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs @@ -1,5 +1,5 @@ #![allow(incomplete_features)] -#![feature(const_trait_impl, effects, try_trait_v2)] +#![feature(const_trait_impl, try_trait_v2)] use std::ops::FromResidual; diff --git a/tests/ui/traits/const-traits/ice-120503-async-const-method.rs b/tests/ui/traits/const-traits/ice-120503-async-const-method.rs index 9cd18d4566d..4c337a42a68 100644 --- a/tests/ui/traits/const-traits/ice-120503-async-const-method.rs +++ b/tests/ui/traits/const-traits/ice-120503-async-const-method.rs @@ -1,5 +1,4 @@ //@ edition: 2021 -#![feature(effects)] //~ WARN the feature `effects` is incomplete trait MyTrait {} diff --git a/tests/ui/traits/const-traits/ice-120503-async-const-method.stderr b/tests/ui/traits/const-traits/ice-120503-async-const-method.stderr index 1a11aec4b26..66862d97bf9 100644 --- a/tests/ui/traits/const-traits/ice-120503-async-const-method.stderr +++ b/tests/ui/traits/const-traits/ice-120503-async-const-method.stderr @@ -1,5 +1,5 @@ error: expected one of `extern`, `fn`, `safe`, or `unsafe`, found keyword `const` - --> $DIR/ice-120503-async-const-method.rs:7:11 + --> $DIR/ice-120503-async-const-method.rs:6:11 | LL | async const fn bar(&self) { | ------^^^^^ @@ -10,7 +10,7 @@ LL | async const fn bar(&self) { = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` error[E0379]: functions in trait impls cannot be declared const - --> $DIR/ice-120503-async-const-method.rs:7:11 + --> $DIR/ice-120503-async-const-method.rs:6:11 | LL | async const fn bar(&self) { | ^^^^^- @@ -19,7 +19,7 @@ LL | async const fn bar(&self) { | help: remove the `const` error: functions cannot be both `const` and `async` - --> $DIR/ice-120503-async-const-method.rs:7:5 + --> $DIR/ice-120503-async-const-method.rs:6:5 | LL | async const fn bar(&self) { | -^^^^ ^^^^^ `const` because of this @@ -35,7 +35,7 @@ LL | | } | |_____- error[E0407]: method `bar` is not a member of trait `MyTrait` - --> $DIR/ice-120503-async-const-method.rs:7:5 + --> $DIR/ice-120503-async-const-method.rs:6:5 | LL | / async const fn bar(&self) { LL | | @@ -46,17 +46,8 @@ LL | | LL | | } | |_____^ not a member of trait `MyTrait` -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/ice-120503-async-const-method.rs:2:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0425]: cannot find function `main8` in this scope - --> $DIR/ice-120503-async-const-method.rs:12:9 + --> $DIR/ice-120503-async-const-method.rs:11:9 | LL | main8().await; | ^^^^^ help: a function with a similar name exists: `main` @@ -64,7 +55,7 @@ LL | main8().await; LL | fn main() {} | --------- similarly named function `main` defined here -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors Some errors have detailed explanations: E0379, E0407, E0425. For more information about an error, try `rustc --explain E0379`. diff --git a/tests/ui/traits/const-traits/ice-121536-const-method.rs b/tests/ui/traits/const-traits/ice-121536-const-method.rs index a01329278d7..b89786bfd93 100644 --- a/tests/ui/traits/const-traits/ice-121536-const-method.rs +++ b/tests/ui/traits/const-traits/ice-121536-const-method.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] pub struct Vec3; diff --git a/tests/ui/traits/const-traits/ice-121536-const-method.stderr b/tests/ui/traits/const-traits/ice-121536-const-method.stderr index 4fe88f263c8..408958abf63 100644 --- a/tests/ui/traits/const-traits/ice-121536-const-method.stderr +++ b/tests/ui/traits/const-traits/ice-121536-const-method.stderr @@ -14,15 +14,6 @@ help: ... and declare the impl to be const instead LL | impl const Add for Vec3 { | +++++ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/ice-121536-const-method.rs:1:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0379`. diff --git a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs index 29f40604747..fadcaa39816 100644 --- a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs +++ b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs @@ -1,5 +1,5 @@ #![allow(incomplete_features)] -#![feature(generic_const_exprs, const_trait_impl, effects)] +#![feature(generic_const_exprs, const_trait_impl)] const fn with_positive<F: ~const Fn()>() {} //~^ ERROR `~const` can only be applied to `#[const_trait]` traits diff --git a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs index d4fcbfb1b83..d6df1714314 100644 --- a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs +++ b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver=coherence -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo {} diff --git a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr index 0b1f8b40898..183c2c2cdf4 100644 --- a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr +++ b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i32` - --> $DIR/ice-124857-combine-effect-const-infer-vars.rs:11:1 + --> $DIR/ice-124857-combine-effect-const-infer-vars.rs:10:1 | LL | impl const Foo for i32 {} | ---------------------- first implementation here diff --git a/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs index da97a0e70ed..9ce81031b27 100644 --- a/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs +++ b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs @@ -1,5 +1,5 @@ #![allow(incomplete_features)] -#![feature(const_trait_impl, effects, try_trait_v2, const_try)] +#![feature(const_trait_impl, try_trait_v2, const_try)] use std::ops::{FromResidual, Try}; struct TryMe; diff --git a/tests/ui/traits/const-traits/impl-with-default-fn-fail.rs b/tests/ui/traits/const-traits/impl-with-default-fn-fail.rs index 49741ca24c7..6df9696f2cb 100644 --- a/tests/ui/traits/const-traits/impl-with-default-fn-fail.rs +++ b/tests/ui/traits/const-traits/impl-with-default-fn-fail.rs @@ -1,5 +1,4 @@ -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Tr { diff --git a/tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr b/tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr index 0135296526f..36c8163f1c5 100644 --- a/tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr +++ b/tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `req` - --> $DIR/impl-with-default-fn-fail.rs:13:1 + --> $DIR/impl-with-default-fn-fail.rs:12:1 | LL | fn req(&self); | -------------- `req` from trait diff --git a/tests/ui/traits/const-traits/impl-with-default-fn-pass.rs b/tests/ui/traits/const-traits/impl-with-default-fn-pass.rs index 2c375036941..c776a29716f 100644 --- a/tests/ui/traits/const-traits/impl-with-default-fn-pass.rs +++ b/tests/ui/traits/const-traits/impl-with-default-fn-pass.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Tr { diff --git a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs index 8638c4bbd7f..86cb38e0bcf 100644 --- a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs +++ b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs @@ -8,8 +8,7 @@ //@ compile-flags: -Znext-solver -Zinline-mir=yes -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] trait Trait { fn foo(self); diff --git a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr index 096b00dd302..c4547f4c43d 100644 --- a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr +++ b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr @@ -1,14 +1,5 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:11:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters - --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:20:12 + --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:19:12 | LL | fn foo(self); | - expected 0 type parameters @@ -17,14 +8,14 @@ LL | fn foo<T>(self) { | ^ found 1 type parameter error[E0015]: cannot call non-const fn `<() as Trait>::foo` in constant functions - --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:27:8 + --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:26:8 | LL | ().foo(); | ^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors Some errors have detailed explanations: E0015, E0049. For more information about an error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/issue-100222.rs b/tests/ui/traits/const-traits/issue-100222.rs index 13c469d656c..55722d35075 100644 --- a/tests/ui/traits/const-traits/issue-100222.rs +++ b/tests/ui/traits/const-traits/issue-100222.rs @@ -3,7 +3,7 @@ //@ check-pass #![allow(incomplete_features)] -#![feature(const_trait_impl, effects, associated_type_defaults)] +#![feature(const_trait_impl, associated_type_defaults)] #[cfg_attr(any(yn, yy), const_trait)] pub trait Index { diff --git a/tests/ui/traits/const-traits/issue-79450.rs b/tests/ui/traits/const-traits/issue-79450.rs index cdefebc87d6..521576d27ef 100644 --- a/tests/ui/traits/const-traits/issue-79450.rs +++ b/tests/ui/traits/const-traits/issue-79450.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Tr { diff --git a/tests/ui/traits/const-traits/issue-79450.stderr b/tests/ui/traits/const-traits/issue-79450.stderr index 49f380c1a2b..85996c21211 100644 --- a/tests/ui/traits/const-traits/issue-79450.stderr +++ b/tests/ui/traits/const-traits/issue-79450.stderr @@ -1,5 +1,5 @@ error[E0015]: cannot call non-const fn `_print` in constant functions - --> $DIR/issue-79450.rs:10:9 + --> $DIR/issue-79450.rs:9:9 | LL | println!("lul"); | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs b/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs index e666355db6f..a3edc5ff8b1 100644 --- a/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs +++ b/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs @@ -3,8 +3,7 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] pub trait Super {} diff --git a/tests/ui/traits/const-traits/item-bound-entailment-fails.rs b/tests/ui/traits/const-traits/item-bound-entailment-fails.rs index 42799e3700c..f4bfcbda0ac 100644 --- a/tests/ui/traits/const-traits/item-bound-entailment-fails.rs +++ b/tests/ui/traits/const-traits/item-bound-entailment-fails.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Foo { type Assoc<T>: ~const Bar diff --git a/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr b/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr index 054a8ac7577..3fc6f584709 100644 --- a/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr +++ b/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr @@ -1,36 +1,27 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/item-bound-entailment-fails.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0277]: the trait bound `N<T>: ~const Bar` is not satisfied - --> $DIR/item-bound-entailment-fails.rs:18:21 + --> $DIR/item-bound-entailment-fails.rs:17:21 | LL | type Assoc<T> = N<T> | ^^^^ | note: required by a bound in `Foo::Assoc` - --> $DIR/item-bound-entailment-fails.rs:6:20 + --> $DIR/item-bound-entailment-fails.rs:5:20 | LL | type Assoc<T>: ~const Bar | ^^^^^^ required by this bound in `Foo::Assoc` error[E0277]: the trait bound `T: ~const Bar` is not satisfied - --> $DIR/item-bound-entailment-fails.rs:25:21 + --> $DIR/item-bound-entailment-fails.rs:24:21 | LL | type Assoc<T> = C<T> | ^^^^ | note: required by a bound in `Foo::Assoc` - --> $DIR/item-bound-entailment-fails.rs:6:20 + --> $DIR/item-bound-entailment-fails.rs:5:20 | LL | type Assoc<T>: ~const Bar | ^^^^^^ required by this bound in `Foo::Assoc` -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/item-bound-entailment.rs b/tests/ui/traits/const-traits/item-bound-entailment.rs index 3670eabd66c..11db57be815 100644 --- a/tests/ui/traits/const-traits/item-bound-entailment.rs +++ b/tests/ui/traits/const-traits/item-bound-entailment.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Foo { type Assoc<T>: ~const Bar diff --git a/tests/ui/traits/const-traits/item-bound-entailment.stderr b/tests/ui/traits/const-traits/item-bound-entailment.stderr deleted file mode 100644 index b4a4ebdbee2..00000000000 --- a/tests/ui/traits/const-traits/item-bound-entailment.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/item-bound-entailment.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/predicate-entailment-fails.rs b/tests/ui/traits/const-traits/predicate-entailment-fails.rs index 5d6109bfad3..266a49f9e38 100644 --- a/tests/ui/traits/const-traits/predicate-entailment-fails.rs +++ b/tests/ui/traits/const-traits/predicate-entailment-fails.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Bar {} impl const Bar for () {} diff --git a/tests/ui/traits/const-traits/predicate-entailment-fails.stderr b/tests/ui/traits/const-traits/predicate-entailment-fails.stderr index c50009e9b8c..369e95688a9 100644 --- a/tests/ui/traits/const-traits/predicate-entailment-fails.stderr +++ b/tests/ui/traits/const-traits/predicate-entailment-fails.stderr @@ -1,14 +1,5 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/predicate-entailment-fails.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:15:31 + --> $DIR/predicate-entailment-fails.rs:14:31 | LL | type Bar<T> where T: ~const Bar; | ----------- definition of `Bar` from trait @@ -17,7 +8,7 @@ LL | type Bar<T> = () where T: const Bar; | ^^^^^ impl has extra requirement `T: const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:18:26 + --> $DIR/predicate-entailment-fails.rs:17:26 | LL | fn foo<T>() where T: ~const Bar; | -------------------------------- definition of `foo` from trait @@ -26,7 +17,7 @@ LL | fn foo<T>() where T: const Bar {} | ^^^^^ impl has extra requirement `T: const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:29:31 + --> $DIR/predicate-entailment-fails.rs:28:31 | LL | type Bar<T> where T: Bar; | ----------- definition of `Bar` from trait @@ -35,7 +26,7 @@ LL | type Bar<T> = () where T: const Bar; | ^^^^^ impl has extra requirement `T: const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:32:26 + --> $DIR/predicate-entailment-fails.rs:31:26 | LL | fn foo<T>() where T: Bar; | ------------------------- definition of `foo` from trait @@ -44,7 +35,7 @@ LL | fn foo<T>() where T: const Bar {} | ^^^^^ impl has extra requirement `T: const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:36:31 + --> $DIR/predicate-entailment-fails.rs:35:31 | LL | type Bar<T> where T: Bar; | ----------- definition of `Bar` from trait @@ -53,7 +44,7 @@ LL | type Bar<T> = () where T: ~const Bar; | ^^^^^^ impl has extra requirement `T: ~const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:39:26 + --> $DIR/predicate-entailment-fails.rs:38:26 | LL | fn foo<T>() where T: Bar; | ------------------------- definition of `foo` from trait @@ -61,6 +52,6 @@ LL | fn foo<T>() where T: Bar; LL | fn foo<T>() where T: ~const Bar {} | ^^^^^^ impl has extra requirement `T: ~const Bar` -error: aborting due to 6 previous errors; 1 warning emitted +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0276`. diff --git a/tests/ui/traits/const-traits/predicate-entailment-passes.rs b/tests/ui/traits/const-traits/predicate-entailment-passes.rs index b660329151b..9c8d5a5e3f6 100644 --- a/tests/ui/traits/const-traits/predicate-entailment-passes.rs +++ b/tests/ui/traits/const-traits/predicate-entailment-passes.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Bar {} impl const Bar for () {} diff --git a/tests/ui/traits/const-traits/predicate-entailment-passes.stderr b/tests/ui/traits/const-traits/predicate-entailment-passes.stderr deleted file mode 100644 index dcaeea73b58..00000000000 --- a/tests/ui/traits/const-traits/predicate-entailment-passes.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/predicate-entailment-passes.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs index 69dcb403aa9..5af9ee8614f 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs +++ b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs @@ -1,7 +1,7 @@ // Tests that trait bounds on specializing trait impls must be `~const` if the // same bound is present on the default impl and is `~const` there. //@ known-bug: #110395 -// FIXME(effects) ^ should error +// FIXME(const_trait_impl) ^ should error #![feature(const_trait_impl)] #![feature(rustc_attrs)] diff --git a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs index a48a50b9e5c..89ad61c3c31 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs +++ b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs @@ -1,8 +1,7 @@ // Tests that a const default trait impl can be specialized by another const // trait impl and that the specializing impl will be used during const-eval. -//@ known-bug: #110395 -// FIXME(effects) run-pass +//@ run-pass #![feature(const_trait_impl)] #![feature(min_specialization)] diff --git a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr deleted file mode 100644 index f127268d2a1..00000000000 --- a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0015]: cannot call non-const fn `<T as Value>::value` in constant functions - --> $DIR/const-default-const-specialized.rs:16:5 - | -LL | T::value() - | ^^^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs index 40fc3b17ae4..a3bb9b3f93e 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs +++ b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs @@ -1,6 +1,6 @@ // Tests that specializing trait impls must be at least as const as the default impl. -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #![feature(min_specialization)] #[const_trait] diff --git a/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr index 363fbee1f8b..e356621ba47 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr +++ b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr @@ -1,17 +1,8 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-default-impl-non-const-specialized-impl.rs:3:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: cannot specialize on const impl with non-const impl --> $DIR/const-default-impl-non-const-specialized-impl.rs:19:1 | LL | impl Value for FortyTwo { | ^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs index 912b35095f9..e9b494bc2c0 100644 --- a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs +++ b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs @@ -1,7 +1,7 @@ // Tests that a non-const default impl can be specialized by a const trait impl, // but that the default impl cannot be used in a const context. -//@ known-bug: #110395 -// FIXME(effects) run-pass + +//@ run-pass #![feature(const_trait_impl)] #![feature(min_specialization)] diff --git a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr deleted file mode 100644 index a4095d7e8ce..00000000000 --- a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0015]: cannot call non-const fn `<T as Value>::value` in constant functions - --> $DIR/non-const-default-const-specialized.rs:15:5 - | -LL | T::value() - | ^^^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/specializing-constness-2.stderr b/tests/ui/traits/const-traits/specializing-constness-2.stderr index 98a9de2324a..4ad5e3157d4 100644 --- a/tests/ui/traits/const-traits/specializing-constness-2.stderr +++ b/tests/ui/traits/const-traits/specializing-constness-2.stderr @@ -4,19 +4,6 @@ error[E0277]: the trait bound `T: ~const A` is not satisfied LL | <T as A>::a(); | ^^^^^^^^^^^^^ -error[E0015]: cannot call non-const fn `<T as A>::a` in constant functions - --> $DIR/specializing-constness-2.rs:27:5 - | -LL | <T as A>::a(); - | ^^^^^^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 2 previous errors +error: aborting due to 1 previous error -Some errors have detailed explanations: E0015, E0277. -For more information about an error, try `rustc --explain E0015`. +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/specializing-constness.rs b/tests/ui/traits/const-traits/specializing-constness.rs index 3aabaf137d5..632121924a6 100644 --- a/tests/ui/traits/const-traits/specializing-constness.rs +++ b/tests/ui/traits/const-traits/specializing-constness.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects, min_specialization, rustc_attrs)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl, min_specialization, rustc_attrs)] #[rustc_specialization_trait] #[const_trait] @@ -22,7 +22,7 @@ impl<T: ~const Spec> const A for T { impl<T: Spec + Sup> A for T { //~^ ERROR: cannot specialize -//FIXME(effects) ~| ERROR: missing `~const` qualifier +//FIXME(const_trait_impl) ~| ERROR: missing `~const` qualifier fn a() -> u32 { 3 } diff --git a/tests/ui/traits/const-traits/specializing-constness.stderr b/tests/ui/traits/const-traits/specializing-constness.stderr index 226295bf949..21e21c2cb71 100644 --- a/tests/ui/traits/const-traits/specializing-constness.stderr +++ b/tests/ui/traits/const-traits/specializing-constness.stderr @@ -1,17 +1,8 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/specializing-constness.rs:1:30 - | -LL | #![feature(const_trait_impl, effects, min_specialization, rustc_attrs)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - error: cannot specialize on const impl with non-const impl --> $DIR/specializing-constness.rs:23:1 | LL | impl<T: Spec + Sup> A for T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/staged-api.rs b/tests/ui/traits/const-traits/staged-api.rs index 59fe6d52d5d..401a81d8142 100644 --- a/tests/ui/traits/const-traits/staged-api.rs +++ b/tests/ui/traits/const-traits/staged-api.rs @@ -3,8 +3,7 @@ #![cfg_attr(unstable, feature(unstable))] // The feature from the ./auxiliary/staged-api.rs file. #![cfg_attr(unstable, feature(local_feature))] -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #![feature(staged_api)] #![stable(feature = "rust1", since = "1.0.0")] diff --git a/tests/ui/traits/const-traits/staged-api.stable.stderr b/tests/ui/traits/const-traits/staged-api.stable.stderr index 40045081f93..8f491b2f182 100644 --- a/tests/ui/traits/const-traits/staged-api.stable.stderr +++ b/tests/ui/traits/const-traits/staged-api.stable.stderr @@ -1,5 +1,5 @@ error: trait implementations cannot be const stable yet - --> $DIR/staged-api.rs:22:1 + --> $DIR/staged-api.rs:21:1 | LL | / impl const MyTrait for Foo { LL | | @@ -10,7 +10,7 @@ LL | | } = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information error: function has missing const stability attribute - --> $DIR/staged-api.rs:49:1 + --> $DIR/staged-api.rs:48:1 | LL | / pub const fn const_context_not_const_stable() { LL | | @@ -22,7 +22,7 @@ LL | | } | |_^ error: `<staged_api::Unstable as staged_api::MyTrait>::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:35:5 + --> $DIR/staged-api.rs:34:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -30,7 +30,7 @@ LL | Unstable::func(); = help: add `#![feature(unstable)]` to the crate attributes to enable error: `<Foo as staged_api::MyTrait>::func` cannot be (indirectly) exposed to stable - --> $DIR/staged-api.rs:38:5 + --> $DIR/staged-api.rs:37:5 | LL | Foo::func(); | ^^^^^^^^^^^ @@ -38,7 +38,7 @@ LL | Foo::func(); = help: either mark the callee as `#[rustc_const_stable_indirect]`, or the caller as `#[rustc_const_unstable]` error: `<staged_api::Unstable2 as staged_api::MyTrait>::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:42:5 + --> $DIR/staged-api.rs:41:5 | LL | Unstable2::func(); | ^^^^^^^^^^^^^^^^^ @@ -46,7 +46,7 @@ LL | Unstable2::func(); = help: add `#![feature(unstable2)]` to the crate attributes to enable error: `<staged_api::Unstable as staged_api::MyTrait>::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:51:5 + --> $DIR/staged-api.rs:50:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -54,7 +54,7 @@ LL | Unstable::func(); = help: add `#![feature(unstable)]` to the crate attributes to enable error: `<Foo as staged_api::MyTrait>::func` cannot be (indirectly) exposed to stable - --> $DIR/staged-api.rs:53:5 + --> $DIR/staged-api.rs:52:5 | LL | Foo::func(); | ^^^^^^^^^^^ @@ -62,7 +62,7 @@ LL | Foo::func(); = help: either mark the callee as `#[rustc_const_stable_indirect]`, or the caller as `#[rustc_const_unstable]` error: `<staged_api::Unstable2 as staged_api::MyTrait>::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:56:5 + --> $DIR/staged-api.rs:55:5 | LL | Unstable2::func(); | ^^^^^^^^^^^^^^^^^ @@ -70,7 +70,7 @@ LL | Unstable2::func(); = help: add `#![feature(unstable2)]` to the crate attributes to enable error: `<staged_api::Unstable as staged_api::MyTrait>::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:64:5 + --> $DIR/staged-api.rs:63:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -78,7 +78,7 @@ LL | Unstable::func(); = help: add `#![feature(unstable)]` to the crate attributes to enable error: `<Foo as staged_api::MyTrait>::func` cannot be (indirectly) exposed to stable - --> $DIR/staged-api.rs:67:5 + --> $DIR/staged-api.rs:66:5 | LL | Foo::func(); | ^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/staged-api.unstable.stderr b/tests/ui/traits/const-traits/staged-api.unstable.stderr index 64b3a8ab19f..76275452e90 100644 --- a/tests/ui/traits/const-traits/staged-api.unstable.stderr +++ b/tests/ui/traits/const-traits/staged-api.unstable.stderr @@ -1,5 +1,5 @@ error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]` - --> $DIR/staged-api.rs:35:5 + --> $DIR/staged-api.rs:34:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | const fn const_context() { | error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local_feature)]` - --> $DIR/staged-api.rs:38:5 + --> $DIR/staged-api.rs:37:5 | LL | Foo::func(); | ^^^^^^^^^^^ @@ -35,7 +35,7 @@ LL | const fn const_context() { | error: `<staged_api::Unstable2 as staged_api::MyTrait>::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:42:5 + --> $DIR/staged-api.rs:41:5 | LL | Unstable2::func(); | ^^^^^^^^^^^^^^^^^ @@ -43,7 +43,7 @@ LL | Unstable2::func(); = help: add `#![feature(unstable2)]` to the crate attributes to enable error: `<staged_api::Unstable2 as staged_api::MyTrait>::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:56:5 + --> $DIR/staged-api.rs:55:5 | LL | Unstable2::func(); | ^^^^^^^^^^^^^^^^^ @@ -51,7 +51,7 @@ LL | Unstable2::func(); = help: add `#![feature(unstable2)]` to the crate attributes to enable error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]` - --> $DIR/staged-api.rs:64:5 + --> $DIR/staged-api.rs:63:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -69,7 +69,7 @@ LL | const fn stable_const_context() { | error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local_feature)]` - --> $DIR/staged-api.rs:67:5 + --> $DIR/staged-api.rs:66:5 | LL | Foo::func(); | ^^^^^^^^^^^ @@ -87,7 +87,7 @@ LL | const fn stable_const_context() { | error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local_feature)]` - --> $DIR/staged-api.rs:71:5 + --> $DIR/staged-api.rs:70:5 | LL | const_context_not_const_stable() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr index 8de1bb07e90..e7f54b4c5bd 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr @@ -1,23 +1,23 @@ error: `~const` is not allowed here - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds - --> $DIR/super-traits-fail-2.rs:12:1 + --> $DIR/super-traits-fail-2.rs:11:1 | LL | trait Bar: ~const Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -25,7 +25,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -33,7 +33,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions - --> $DIR/super-traits-fail-2.rs:21:7 + --> $DIR/super-traits-fail-2.rs:20:7 | LL | x.a(); | ^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr index 82b306aeff6..a09fe81f716 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr @@ -1,11 +1,11 @@ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -13,7 +13,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -21,7 +21,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -29,7 +29,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -37,7 +37,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions - --> $DIR/super-traits-fail-2.rs:21:7 + --> $DIR/super-traits-fail-2.rs:20:7 | LL | x.a(); | ^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.rs b/tests/ui/traits/const-traits/super-traits-fail-2.rs index 1e41d709d6b..53a84bcdd1b 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.rs +++ b/tests/ui/traits/const-traits/super-traits-fail-2.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] //@ revisions: yy yn ny nn #[cfg_attr(any(yy, yn), const_trait)] diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr index ec6ca107289..01ae209016a 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr @@ -1,17 +1,17 @@ error: `~const` is not allowed here - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds - --> $DIR/super-traits-fail-2.rs:12:1 + --> $DIR/super-traits-fail-2.rs:11:1 | LL | trait Bar: ~const Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `T: ~const Foo` is not satisfied - --> $DIR/super-traits-fail-2.rs:21:5 + --> $DIR/super-traits-fail-2.rs:20:5 | LL | x.a(); | ^^^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr index 3fa6256abc3..ae4c65e4aee 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: ~const Foo` is not satisfied - --> $DIR/super-traits-fail-2.rs:21:5 + --> $DIR/super-traits-fail-2.rs:20:5 | LL | x.a(); | ^^^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr index 1dd4a2ed5a5..599b8c826f7 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr @@ -1,23 +1,23 @@ error: `~const` is not allowed here - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds - --> $DIR/super-traits-fail-3.rs:14:1 + --> $DIR/super-traits-fail-3.rs:13:1 | LL | trait Bar: ~const Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -25,7 +25,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -33,13 +33,13 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:22:17 + --> $DIR/super-traits-fail-3.rs:21:17 | LL | const fn foo<T: ~const Bar>(x: &T) { | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:22:17 + --> $DIR/super-traits-fail-3.rs:21:17 | LL | const fn foo<T: ~const Bar>(x: &T) { | ^^^^^^ @@ -47,7 +47,7 @@ LL | const fn foo<T: ~const Bar>(x: &T) { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions - --> $DIR/super-traits-fail-3.rs:25:7 + --> $DIR/super-traits-fail-3.rs:24:7 | LL | x.a(); | ^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr index e619b8bd6ba..a880c2a2206 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr @@ -1,11 +1,11 @@ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -13,7 +13,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -21,7 +21,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -29,7 +29,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -37,7 +37,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions - --> $DIR/super-traits-fail-3.rs:25:7 + --> $DIR/super-traits-fail-3.rs:24:7 | LL | x.a(); | ^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.rs b/tests/ui/traits/const-traits/super-traits-fail-3.rs index 414337956e2..bd95ae8d96a 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.rs +++ b/tests/ui/traits/const-traits/super-traits-fail-3.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] //@ revisions: yy yn ny nn //@[yy] check-pass diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr index 0a36d40d931..8fcada1bfd1 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr @@ -1,23 +1,23 @@ error: `~const` is not allowed here - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds - --> $DIR/super-traits-fail-3.rs:14:1 + --> $DIR/super-traits-fail-3.rs:13:1 | LL | trait Bar: ~const Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:22:17 + --> $DIR/super-traits-fail-3.rs:21:17 | LL | const fn foo<T: ~const Bar>(x: &T) { | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:22:17 + --> $DIR/super-traits-fail-3.rs:21:17 | LL | const fn foo<T: ~const Bar>(x: &T) { | ^^^^^^ @@ -25,7 +25,7 @@ LL | const fn foo<T: ~const Bar>(x: &T) { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: the trait bound `T: ~const Foo` is not satisfied - --> $DIR/super-traits-fail-3.rs:25:5 + --> $DIR/super-traits-fail-3.rs:24:5 | LL | x.a(); | ^^^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail.rs b/tests/ui/traits/const-traits/super-traits-fail.rs index c07619fbf62..9fd6263118b 100644 --- a/tests/ui/traits/const-traits/super-traits-fail.rs +++ b/tests/ui/traits/const-traits/super-traits-fail.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/super-traits-fail.stderr b/tests/ui/traits/const-traits/super-traits-fail.stderr index 7a734a6c9f1..1f453edf035 100644 --- a/tests/ui/traits/const-traits/super-traits-fail.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `S: ~const Foo` is not satisfied - --> $DIR/super-traits-fail.rs:18:20 + --> $DIR/super-traits-fail.rs:17:20 | LL | impl const Bar for S {} | ^ diff --git a/tests/ui/traits/const-traits/super-traits.rs b/tests/ui/traits/const-traits/super-traits.rs index ff7349bba3c..73ddc037cd7 100644 --- a/tests/ui/traits/const-traits/super-traits.rs +++ b/tests/ui/traits/const-traits/super-traits.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/tilde-const-and-const-params.rs b/tests/ui/traits/const-traits/tilde-const-and-const-params.rs index b316ac75a8a..706c77b6200 100644 --- a/tests/ui/traits/const-traits/tilde-const-and-const-params.rs +++ b/tests/ui/traits/const-traits/tilde-const-and-const-params.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #![feature(generic_arg_infer)] #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs b/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs index 8e7202ecaa1..73b2bdc4e3f 100644 --- a/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs +++ b/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs @@ -1,8 +1,7 @@ // Regression test for issue #119700. //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Main { diff --git a/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs b/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs index 4722be955e9..e7ec3d31eb9 100644 --- a/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs +++ b/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs @@ -2,7 +2,7 @@ //@ known-bug: #132067 //@ check-pass -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; #[const_trait] diff --git a/tests/ui/traits/const-traits/tilde-const-in-struct-args.stderr b/tests/ui/traits/const-traits/tilde-const-in-struct-args.stderr deleted file mode 100644 index a9759f10d06..00000000000 --- a/tests/ui/traits/const-traits/tilde-const-in-struct-args.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/tilde-const-in-struct-args.rs:5:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs b/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs index 71c5d8366b2..0e010695587 100644 --- a/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs +++ b/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs b/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs index 254cf2200d8..53ddb5c0cdf 100644 --- a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs +++ b/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs @@ -1,12 +1,9 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { - // FIXME(effects): `~const` bounds in trait associated types (excluding associated type bounds) - // don't look super useful. Should we forbid them again? type Assoc<T: ~const Bound>; } diff --git a/tests/ui/traits/const-traits/trait-default-body-stability.rs b/tests/ui/traits/const-traits/trait-default-body-stability.rs index b36e9535ca1..5f7486eb176 100644 --- a/tests/ui/traits/const-traits/trait-default-body-stability.rs +++ b/tests/ui/traits/const-traits/trait-default-body-stability.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Znext-solver #![allow(incomplete_features)] #![feature(staged_api)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #![feature(const_t_try)] #![feature(const_try)] #![feature(try_trait_v2)] diff --git a/tests/ui/traits/const-traits/trait-where-clause-const.rs b/tests/ui/traits/const-traits/trait-where-clause-const.rs index 61e2bc38426..6f281ca5718 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-const.rs +++ b/tests/ui/traits/const-traits/trait-where-clause-const.rs @@ -4,8 +4,7 @@ // (`rustc_const_eval` instead of `rustc_hir_analysis`) Therefore one file as a // test is not enough. -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] trait Bar {} diff --git a/tests/ui/traits/const-traits/trait-where-clause-const.stderr b/tests/ui/traits/const-traits/trait-where-clause-const.stderr index 30a7ef1fd0d..d7735ef282f 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-const.stderr +++ b/tests/ui/traits/const-traits/trait-where-clause-const.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `T: ~const Bar` is not satisfied - --> $DIR/trait-where-clause-const.rs:22:5 + --> $DIR/trait-where-clause-const.rs:21:5 | LL | T::b(); | ^^^^^^ error[E0277]: the trait bound `T: ~const Bar` is not satisfied - --> $DIR/trait-where-clause-const.rs:24:5 + --> $DIR/trait-where-clause-const.rs:23:5 | LL | T::c::<T>(); | ^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/trait-where-clause-run.rs b/tests/ui/traits/const-traits/trait-where-clause-run.rs index 2837c835429..2582a69acab 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-run.rs +++ b/tests/ui/traits/const-traits/trait-where-clause-run.rs @@ -1,8 +1,7 @@ //@ run-pass //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] trait Bar { diff --git a/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs b/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs index cb5cc924bfd..b6ac574a4fc 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs +++ b/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs index d336719f52e..6d19ef771af 100644 --- a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs +++ b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs @@ -2,7 +2,7 @@ // Ensure that we print unsatisfied always-const trait bounds as `const Trait` in diagnostics. //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] fn require<T: const Trait>() {} @@ -24,10 +24,10 @@ fn main() { struct Container<const N: u32>; -// FIXME(effects): Somehow emit `the trait bound `T: const Trait` is not satisfied` here instead -// and suggest changing `Trait` to `const Trait`. +// FIXME(const_trait_impl): Somehow emit `the trait bound `T: const Trait` +// is not satisfied` here instead and suggest changing `Trait` to `const Trait`. fn accept0<T: Trait>(_: Container<{ T::make() }>) {} -// FIXME(effects): Instead of suggesting `+ const Trait`, suggest +// FIXME(const_trait_impl): Instead of suggesting `+ const Trait`, suggest // changing `~const Trait` to `const Trait`. const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {} diff --git a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr index 35f3019b6ee..d04143fc464 100644 --- a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr +++ b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr @@ -1,8 +1,8 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed - --> $DIR/unsatisfied-const-trait-bound.rs:5:39 + --> $DIR/unsatisfied-const-trait-bound.rs:5:30 | -LL | #![feature(const_trait_impl, effects, generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ +LL | #![feature(const_trait_impl, generic_const_exprs)] + | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/traits/next-solver/canonical/effect-var.rs b/tests/ui/traits/next-solver/canonical/effect-var.rs index d1e3e18cdc8..82dbde0413c 100644 --- a/tests/ui/traits/next-solver/canonical/effect-var.rs +++ b/tests/ui/traits/next-solver/canonical/effect-var.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(effects)] //~ WARN the feature `effects` is incomplete #![feature(const_trait_impl)] #[const_trait] diff --git a/tests/ui/traits/next-solver/canonical/effect-var.stderr b/tests/ui/traits/next-solver/canonical/effect-var.stderr deleted file mode 100644 index 994228c51e5..00000000000 --- a/tests/ui/traits/next-solver/canonical/effect-var.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/effect-var.rs:4:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - |
