Migrate tests to use -Znext-solver

This commit is contained in:
Deadbeef 2024-06-30 17:08:45 +00:00
parent 34ae56de35
commit daff015314
115 changed files with 503 additions and 428 deletions

View File

@ -1,4 +1,5 @@
//@ known-bug: #119924
//@ compile-flags: -Znext-solver
#![feature(const_trait_impl, effects)]
struct S;

View File

@ -1,4 +1,6 @@
//@ compile-flags: -Znext-solver
#![feature(effects, const_trait_impl)]
#![allow(incomplete_features)]
#[const_trait]
pub trait Resource {}

View File

@ -1,5 +1,5 @@
//@ known-bug: #110395
//@ compile-flags: -Znext-solver
#![feature(generic_const_exprs, adt_const_params, const_trait_impl, effects)]
#![allow(incomplete_features)]

View File

@ -19,6 +19,12 @@ LL + #[derive(ConstParamTy)]
LL | struct Foo(u8);
|
error[E0284]: type annotations needed: cannot normalize `foo<N>::{constant#0}`
--> $DIR/unify-op-with-fn-call.rs:20:25
|
LL | fn foo<const N: Foo>(a: Evaluatable<{ N + N }>) {
| ^^^^^^^^^^^^^^^^^^^^^^ cannot normalize `foo<N>::{constant#0}`
error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
--> $DIR/unify-op-with-fn-call.rs:20:17
|
@ -43,17 +49,25 @@ LL + #[derive(ConstParamTy)]
LL | struct Foo(u8);
|
error: unconstrained generic constant
error[E0284]: type annotations needed: cannot normalize `foo2<N>::{constant#0}`
--> $DIR/unify-op-with-fn-call.rs:29:28
|
LL | fn foo2<const N: usize>(a: Evaluatable2<{ N + N }>) {
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot normalize `foo2<N>::{constant#0}`
error[E0284]: type annotations needed: cannot normalize `foo<N>::{constant#0}`
--> $DIR/unify-op-with-fn-call.rs:21:11
|
LL | bar::<{ std::ops::Add::add(N, N) }>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot normalize `foo<N>::{constant#0}`
error[E0284]: type annotations needed: cannot normalize `foo2<N>::{constant#0}`
--> $DIR/unify-op-with-fn-call.rs:30:12
|
LL | bar2::<{ std::ops::Add::add(N, N) }>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: try adding a `where` bound
|
LL | fn foo2<const N: usize>(a: Evaluatable2<{ N + N }>) where [(); { std::ops::Add::add(N, N) }]: {
| +++++++++++++++++++++++++++++++++++++++++
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot normalize `foo2<N>::{constant#0}`
error: aborting due to 5 previous errors
error: aborting due to 8 previous errors
For more information about this error, try `rustc --explain E0741`.
Some errors have detailed explanations: E0284, E0741.
For more information about an error, try `rustc --explain E0284`.

View File

@ -1,5 +1,5 @@
//@ check-pass
//@ known-bug: #110395
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects, generic_const_exprs)]

View File

@ -0,0 +1,27 @@
error[E0284]: type annotations needed: cannot satisfy `the constant `name_len::<T>()` can be evaluated`
--> $DIR/issue-88119.rs:21:5
|
LL | [(); name_len::<T>()]:,
| ^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `the constant `name_len::<T>()` can be evaluated`
|
note: required by a bound in `<&T as ConstName>`
--> $DIR/issue-88119.rs:21:10
|
LL | [(); name_len::<T>()]:,
| ^^^^^^^^^^^^^^^ required by this bound in `<&T as ConstName>`
error[E0284]: type annotations needed: cannot satisfy `the constant `name_len::<T>()` can be evaluated`
--> $DIR/issue-88119.rs:28:5
|
LL | [(); name_len::<T>()]:,
| ^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `the constant `name_len::<T>()` can be evaluated`
|
note: required by a bound in `<&mut T as ConstName>`
--> $DIR/issue-88119.rs:28:10
|
LL | [(); name_len::<T>()]:,
| ^^^^^^^^^^^^^^^ required by this bound in `<&mut T as ConstName>`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0284`.

View File

@ -1,5 +1,7 @@
//@ compile-flags: -Znext-solver
#![crate_type = "lib"]
#![feature(const_closures, const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
#![feature(const_closures, const_trait_impl, effects)]
#![allow(incomplete_features)]
pub const fn test() {
let cl = const || {};

View File

@ -1,4 +1,4 @@
//@ compile-flags: -Zmir-opt-level=0
//@ compile-flags: -Zmir-opt-level=0 -Znext-solver
//@ known-bug: #110395
// FIXME(effects) run-pass

View File

@ -1,3 +1,8 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
--> $DIR/const-try.rs:16:12
|
@ -16,5 +21,5 @@ LL | impl const Try for TryMe {
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change
error: aborting due to 2 previous errors
error: aborting due to 3 previous errors

View File

@ -1,12 +1,17 @@
//@ known-bug: #110395
#![feature(const_type_id)]
#![feature(const_trait_impl, effects)]
//@ check-pass
//@ compile-flags: -Znext-solver
#![feature(const_type_id, const_trait_impl, effects)]
#![allow(incomplete_features)]
use std::any::TypeId;
const fn main() {
assert!(TypeId::of::<u8>() == TypeId::of::<u8>());
assert!(TypeId::of::<()>() != TypeId::of::<u8>());
const _A: bool = TypeId::of::<u8>() < TypeId::of::<u16>();
// can't assert `_A` because it is not deterministic
fn main() {
const {
// FIXME(effects) this isn't supposed to pass (right now) but it did.
// revisit binops typeck please.
assert!(TypeId::of::<u8>() == TypeId::of::<u8>());
assert!(TypeId::of::<()>() != TypeId::of::<u8>());
let _a = TypeId::of::<u8>() < TypeId::of::<u16>();
// can't assert `_a` because it is not deterministic
}
}

View File

@ -1,25 +0,0 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const_cmp_type_id.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[E0131]: `main` function is not allowed to have generic parameters
--> $DIR/const_cmp_type_id.rs:7:14
|
LL | const fn main() {
| ^ `main` cannot have generic parameters
error[E0080]: evaluation of constant value failed
--> $DIR/const_cmp_type_id.rs:10:22
|
LL | const _A: bool = TypeId::of::<u8>() < TypeId::of::<u16>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `<TypeId as PartialOrd>::lt`
error: aborting due to 2 previous errors; 1 warning emitted
Some errors have detailed explanations: E0080, E0131.
For more information about an error, try `rustc --explain E0080`.

View File

@ -1,3 +1,8 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0308]: mismatched types
--> $DIR/constifconst-call-in-const-position.rs:17:38
|
@ -16,6 +21,6 @@ LL | [0; T::a()]
= note: expected constant `false`
found constant `host`
error: aborting due to 2 previous errors
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0308`.

View File

@ -1,8 +1,9 @@
//@ compile-flags: -Znext-solver
//@ known-bug: #110395
#![crate_type = "lib"]
#![feature(staged_api)]
#![feature(const_trait_impl, effects)]
#![feature(staged_api, const_trait_impl, effects)]
#![allow(incomplete_features)]
#![stable(feature = "foo", since = "1.0.0")]
#[stable(feature = "potato", since = "1.27.0")]

View File

@ -1,14 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/rustc-impl-const-stability.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 `Default` which is not marked with `#[const_trait]`
--> $DIR/rustc-impl-const-stability.rs:15:12
--> $DIR/rustc-impl-const-stability.rs:16:12
|
LL | impl const Default for Data {
| ^^^^^^^
@ -16,5 +7,5 @@ LL | impl const Default for Data {
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error

View File

@ -1,5 +1,5 @@
//@ check-pass
//@ 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)]

View File

@ -1,7 +1,9 @@
// Regression test for part of issue #119924.
//@ check-pass
//@ compile-flags: -Znext-solver
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]
#[const_trait]
trait Trait {

View File

@ -1,11 +0,0 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/impls-nested-within-fns-semantic-1.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

View File

@ -1,3 +1,8 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0277]: the trait bound `Trait::{synthetic#0}: Compat` is not satisfied
--> $DIR/assoc-type-const-bound-usage-0.rs:13:5
|
@ -28,6 +33,6 @@ LL | #[const_trait]
LL | fn func() -> i32;
| ---- required by a bound in this associated function
error: aborting due to 2 previous errors
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0277`.

View File

@ -1,3 +1,8 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0277]: the trait bound `Trait::{synthetic#0}: Compat` is not satisfied
--> $DIR/assoc-type-const-bound-usage-1.rs:15:44
|
@ -28,6 +33,6 @@ LL | #[const_trait]
LL | fn func() -> i32;
| ---- required by a bound in this associated function
error: aborting due to 2 previous errors
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0277`.

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0277]: the trait bound `Add::{synthetic#0}: Compat` is not satisfied
--> $DIR/assoc-type.rs:41:15
|
@ -18,6 +23,6 @@ help: consider further restricting the associated type
LL | trait Baz where Add::{synthetic#0}: Compat {
| ++++++++++++++++++++++++++++++++
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.

View File

@ -1,3 +1,4 @@
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]

View File

@ -1,4 +1,6 @@
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]
#![feature(staged_api)]
#![stable(feature = "rust1", since = "1.0.0")]

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0277]: the trait bound `Runtime: ~const Compat` is not satisfied
--> $DIR/call-const-trait-method-fail.rs:25:5
|
@ -23,6 +28,6 @@ LL | pub trait Plus {
LL | fn plus(self, rhs: Self) -> Self;
| ---- required by a bound in this associated function
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
--> $DIR/call-generic-method-chain.rs:10:12
|
@ -28,5 +33,5 @@ error: `~const` can only be applied to `#[const_trait]` traits
LL | const fn equals_self_wrapper<T: ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^
error: aborting due to 3 previous errors; 1 warning emitted
error: aborting due to 4 previous errors; 1 warning emitted

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
--> $DIR/call-generic-method-dup-bound.rs:8:12
|
@ -28,5 +33,5 @@ error: `~const` can only be applied to `#[const_trait]` traits
LL | const fn equals_self2<T: A + ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^
error: aborting due to 3 previous errors; 1 warning emitted
error: aborting due to 4 previous errors; 1 warning emitted

View File

@ -1,6 +1,7 @@
//@ check-pass
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
*t == *t

View File

@ -1,11 +0,0 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/call-generic-method-fail.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
warning: 1 warning emitted

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0277]: the trait bound `Runtime: const Compat` is not satisfied
--> $DIR/call-generic-method-nonconst.rs:23:34
|
@ -22,6 +27,6 @@ note: required by a bound in `equals_self`
LL | const fn equals_self<T: ~const Foo>(t: &T) -> bool {
| ^^^^^^^^^^ required by this bound in `equals_self`
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
--> $DIR/call-generic-method-pass.rs:10:12
|
@ -22,5 +27,5 @@ error: `~const` can only be applied to `#[const_trait]` traits
LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
| ^^^^^^^^^
error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 3 previous errors; 1 warning emitted

View File

@ -1,5 +1,5 @@
//@ check-pass
//@ compile-flags: -Znext-solver
#![feature(const_closures, const_trait_impl, effects)]
#![allow(incomplete_features)]

View File

@ -22,5 +22,10 @@ note: this function is not `const`, so it cannot have `~const` trait bounds
LL | pub fn foo(&self) where T: ~const MyTrait {
| ^^^
error: aborting due to 2 previous errors
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: aborting due to 3 previous errors

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/const-bounds-non-const-trait.rs:6:28
|
@ -19,5 +24,5 @@ error: `const` can only be applied to `#[const_trait]` traits
LL | fn operate<T: const NonConst>() {}
| ^^^^^^^^
error: aborting due to 2 previous errors; 1 warning emitted
error: aborting due to 3 previous errors; 1 warning emitted

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0015]: cannot call non-const fn `non_const` in constant functions
--> $DIR/const-check-fns-in-const-impl.rs:12:16
|
@ -15,6 +20,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 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0015`.

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0277]: the trait bound `Runtime: ~const Compat` is not satisfied
--> $DIR/const-default-method-bodies.rs:24:18
|
@ -23,6 +28,6 @@ LL | #[const_trait]
LL | fn a(self) {
| - required by a bound in this associated function
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `A` which is not marked with `#[const_trait]`
--> $DIR/const-impl-requires-const-trait.rs:8:12
|
@ -19,5 +24,5 @@ LL | impl const A for () {}
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 2 previous errors; 1 warning emitted

View File

@ -4,6 +4,11 @@ error[E0635]: unknown feature `const_cmp`
LL | const_cmp,
| ^^^^^^^^^
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/const-impl-trait.rs:13:30
|
@ -238,7 +243,7 @@ LL | const fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T> + ~const Des
| |
| the destructor for this type cannot be evaluated in constant functions
error: aborting due to 32 previous errors
error: aborting due to 33 previous errors
Some errors have detailed explanations: E0493, E0635.
For more information about an error, try `rustc --explain E0493`.

View File

@ -1,5 +1,6 @@
//@ check-pass
//@ known-bug: #110395
//@ compile-flags: -Znext-solver
// FIXME(effects): check-pass
#![feature(const_trait_impl, effects, generic_const_exprs)]
#![allow(incomplete_features)]

View File

@ -0,0 +1,30 @@
error[E0284]: type annotations needed: cannot normalize `process<T>::{constant#0}`
--> $DIR/const-trait-bounds.rs:12:35
|
LL | fn process<T: const Trait>(input: [(); T::make(2)]) -> [(); T::make(2)] {
| ^^^^^^^^^^^^^^^^ cannot normalize `process<T>::{constant#0}`
error[E0284]: type annotations needed: cannot satisfy `the constant `T::make(P)` can be evaluated`
--> $DIR/const-trait-bounds.rs:18:5
|
LL | [u32; T::make(P)]:,
| ^^^^^^^^^^^^^^^^^ cannot satisfy `the constant `T::make(P)` can be evaluated`
|
note: required by a bound in `Struct`
--> $DIR/const-trait-bounds.rs:18:11
|
LL | struct Struct<T: const Trait, const P: usize>
| ------ required by a bound in this struct
LL | where
LL | [u32; T::make(P)]:,
| ^^^^^^^^^^ required by this bound in `Struct`
error[E0284]: type annotations needed: cannot normalize `process<T>::{constant#1}`
--> $DIR/const-trait-bounds.rs:13:5
|
LL | input
| ^^^^^ cannot normalize `process<T>::{constant#1}`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0284`.

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `Default` which is not marked with `#[const_trait]`
--> $DIR/derive-const-non-const-type.rs:10:16
|
@ -17,5 +22,5 @@ LL | #[derive_const(Default)]
= note: adding a non-const method body in the future would be a breaking change
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 2 previous errors; 1 warning emitted

View File

@ -19,6 +19,11 @@ error[E0635]: unknown feature `const_default_impls`
LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)]
| ^^^^^^^^^^^^^^^^^^^
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `Default` which is not marked with `#[const_trait]`
--> $DIR/derive-const-use.rs:7:12
|
@ -79,7 +84,7 @@ LL | const _: () = assert!(S((), A) == S::default());
| ^^^^^^^^^^^^
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 7 previous errors; 1 warning emitted
error: aborting due to 8 previous errors; 1 warning emitted
Some errors have detailed explanations: E0080, E0635.
For more information about an error, try `rustc --explain E0080`.

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
--> $DIR/derive-const-with-params.rs:7:16
|
@ -25,5 +30,5 @@ LL | #[derive_const(PartialEq)]
|
= note: this error originates in the derive macro `PartialEq` (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 3 previous errors; 1 warning emitted

View File

@ -2,8 +2,9 @@
// be called from a const context when used across crates.
//
//@ check-pass
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]
//@ aux-build: cross-crate.rs
extern crate cross_crate;

View File

@ -1,11 +0,0 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/cross-crate-default-method-body-is-const.rs:6: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

View File

@ -1,11 +0,0 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/cross-crate.rs:3:60
|
LL | #![cfg_attr(any(gated, gatednc), 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

View File

@ -1,21 +1,11 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/cross-crate.rs:3:60
|
LL | #![cfg_attr(any(gated, gatednc), 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 `Runtime: ~const Compat` is not satisfied
--> $DIR/cross-crate.rs:18:14
error[E0277]: the trait bound `cross_crate::MyTrait::{synthetic#0}: ~const Compat` is not satisfied
--> $DIR/cross-crate.rs:19:14
|
LL | NonConst.func();
| ^^^^ the trait `~const Compat` is not implemented for `Runtime`
| ^^^^ the trait `~const Compat` is not implemented for `cross_crate::MyTrait::{synthetic#0}`
|
= help: the trait `Compat` is implemented for `Runtime`
note: required by a bound in `func`
--> $DIR/auxiliary/cross-crate.rs:4:1
--> $DIR/auxiliary/cross-crate.rs:5:1
|
LL | #[const_trait]
| ^^^^^^^^^^^^^^ required by this bound in `MyTrait::func`
@ -23,6 +13,6 @@ LL | #[const_trait]
LL | fn func(self);
| ---- required by a bound in this associated function
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`.

View File

@ -1,7 +1,8 @@
//@ revisions: stock gated stocknc gatednc
//@ [gated] check-pass
//@ compile-flags: -Znext-solver
#![cfg_attr(any(gated, gatednc), feature(const_trait_impl, effects))]
//[gated,gatednc]~^ WARN the feature `effects` is incomplete
#![allow(incomplete_features)]
//@ aux-build: cross-crate.rs
extern crate cross_crate;

View File

@ -1,5 +1,5 @@
error[E0015]: cannot call non-const fn `<cross_crate::Const as cross_crate::MyTrait>::func` in constant functions
--> $DIR/cross-crate.rs:21:11
--> $DIR/cross-crate.rs:22:11
|
LL | Const.func();
| ^^^^^^

View File

@ -1,5 +1,5 @@
error[E0015]: cannot call non-const fn `<cross_crate::NonConst as cross_crate::MyTrait>::func` in constant functions
--> $DIR/cross-crate.rs:18:14
--> $DIR/cross-crate.rs:19:14
|
LL | NonConst.func();
| ^^^^^^
@ -11,7 +11,7 @@ LL + #![feature(const_trait_impl)]
|
error[E0015]: cannot call non-const fn `<cross_crate::Const as cross_crate::MyTrait>::func` in constant functions
--> $DIR/cross-crate.rs:21:11
--> $DIR/cross-crate.rs:22:11
|
LL | Const.func();
| ^^^^^^

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0277]: the trait bound `Runtime: ~const Compat` is not satisfied
--> $DIR/default-method-body-is-const-same-trait-ck.rs:8:12
|
@ -23,6 +28,6 @@ LL | pub trait Tr {
LL | fn a(&self) {}
| - required by a bound in this associated function
error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.

View File

@ -1,5 +1,7 @@
//@ check-pass
#![feature(const_trait_impl, rustc_attrs, effects)] //~ WARN the feature `effects` is incomplete
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, rustc_attrs, effects)]
#[const_trait]
trait Foo {

View File

@ -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-override.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

View File

@ -1,4 +1,6 @@
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]
pub const fn foo() {}

View File

@ -1,5 +1,6 @@
//@ check-pass
// FIXME(effects) this shouldn't pass
//@ compile-flags: -Znext-solver
#![feature(const_closures, const_trait_impl, effects)]
#![allow(incomplete_features)]

View File

@ -2,8 +2,9 @@
// at the end of generic args when the generics have defaulted params.
//
//@ check-pass
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]
#[const_trait]
pub trait Foo<Rhs: ?Sized = Self> {

View File

@ -1,11 +0,0 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/effect-param-infer.rs:6: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

View File

@ -1,6 +1,7 @@
//@ check-pass
#![feature(effects)] //~ WARN the feature `effects` is incomplete
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(effects)]
pub const fn owo() {}

View File

@ -1,11 +0,0 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/fallback.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
warning: 1 warning emitted

View File

@ -1,11 +1,11 @@
//@ 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, //~ WARN the feature `effects` is incomplete
effects,
core_intrinsics,
const_eval_select
)]

View File

@ -1,11 +0,0 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/helloworld.rs:8:5
|
LL | 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

View File

@ -17,6 +17,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/ice-112822-expected-type-for-param.rs:3:32
|
@ -40,7 +45,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 4 previous errors; 1 warning emitted
error: aborting due to 5 previous errors; 1 warning emitted
Some errors have detailed explanations: E0015, E0658.
For more information about an error, try `rustc --explain E0015`.

View File

@ -1,5 +1,5 @@
//@ check-pass
//@ compile-flags: -Znext-solver
// effects ice https://github.com/rust-lang/rust/issues/113375 index out of bounds
#![allow(incomplete_features, unused)]

View File

@ -1,5 +1,7 @@
//@ check-pass
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]
const fn a() {}

View File

@ -1,11 +0,0 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/infer-fallback.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
warning: 1 warning emitted

View File

@ -7,7 +7,7 @@ LL | foo::<false>();
| expected 0 generic arguments
|
note: function defined here, with 0 generic parameters
--> $DIR/auxiliary/cross-crate.rs:3:14
--> $DIR/auxiliary/cross-crate.rs:5:14
|
LL | pub const fn foo() {}
| ^^^
@ -19,7 +19,7 @@ LL | <() as Bar<false>>::bar();
| ^^^ expected 0 generic arguments
|
note: trait defined here, with 0 generic parameters
--> $DIR/auxiliary/cross-crate.rs:6:11
--> $DIR/auxiliary/cross-crate.rs:8:11
|
LL | pub trait Bar {
| ^^^
@ -37,7 +37,7 @@ LL | foo::<true>();
| expected 0 generic arguments
|
note: function defined here, with 0 generic parameters
--> $DIR/auxiliary/cross-crate.rs:3:14
--> $DIR/auxiliary/cross-crate.rs:5: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:6:11
--> $DIR/auxiliary/cross-crate.rs:8:11
|
LL | pub trait Bar {
| ^^^

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/no-explicit-const-params.rs:22:5
|
@ -76,7 +81,7 @@ help: replace the generic bound with the associated type
LL | <() as Bar< = true>>::bar();
| +
error: aborting due to 5 previous errors; 1 warning emitted
error: aborting due to 6 previous errors; 1 warning emitted
Some errors have detailed explanations: E0107, E0308.
For more information about an error, try `rustc --explain E0107`.

View File

@ -1,5 +1,5 @@
//@ check-pass
//@ compile-flags: -Znext-solver
#![feature(const_trait_impl, effects)]
#![allow(incomplete_features)]

View File

@ -17,6 +17,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0308]: mismatched types
--> $DIR/span-bug-issue-121418.rs:9:27
|
@ -39,7 +44,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 4 previous errors; 1 warning emitted
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
--> $DIR/spec-effectvar-ice.rs:12:15
|
@ -55,5 +60,5 @@ error: cannot specialize on trait `Specialize`
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 6 previous errors; 1 warning emitted

View File

@ -63,6 +63,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: aborting due to 5 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0379`.

View File

@ -17,6 +17,11 @@ LL | Some(())?;
= help: add `#![feature(const_try)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error: aborting due to 1 previous error; 1 warning emitted
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0658`.

View File

@ -1,3 +1,8 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
--> $DIR/ice-119717-constant-lifetime.rs:6:15
|
@ -27,7 +32,7 @@ help: try replacing `_` with the type in the corresponding trait method signatur
LL | fn from_residual(t: T) -> T {
| ~
error: aborting due to 3 previous errors
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0121, E0210.
For more information about an error, try `rustc --explain E0121`.

View File

@ -55,6 +55,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0425]: cannot find function `main8` in this scope
--> $DIR/ice-120503-async-const-method.rs:13:9
|
@ -95,7 +100,7 @@ LL | async const fn bar(&self) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= 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: aborting due to 6 previous errors; 1 warning emitted
error: aborting due to 7 previous errors; 1 warning emitted
Some errors have detailed explanations: E0379, E0391, E0407, E0425.
For more information about an error, try `rustc --explain E0379`.

View File

@ -23,6 +23,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0379`.

View File

@ -1,8 +1,13 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/ice-123664-unexpected-bound-var.rs:4:34
|
LL | const fn with_positive<F: ~const Fn()>() {}
| ^^^^
error: aborting due to 1 previous error
error: aborting due to 2 previous errors

View File

@ -1,3 +1,8 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0119]: conflicting implementations of trait `Foo` for type `i32`
--> $DIR/ice-124857-combine-effect-const-infer-vars.rs:11:1
|
@ -7,6 +12,6 @@ LL |
LL | impl<T> const Foo for T where T: ~const Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
error: aborting due to 1 previous error
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0119`.

View File

@ -1,3 +1,8 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
--> $DIR/ice-126148-failed-to-normalize.rs:8:12
|
@ -33,6 +38,6 @@ LL | impl const Try for TryMe {
= help: implement the missing item: `fn from_output(_: <Self as Try>::Output) -> Self { todo!() }`
= help: implement the missing item: `fn branch(self) -> ControlFlow<<Self as Try>::Residual, <Self as Try>::Output> { todo!() }`
error: aborting due to 4 previous errors
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0046`.

View File

@ -1,3 +1,8 @@
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error[E0046]: not all trait items implemented, missing: `req`
--> $DIR/impl-with-default-fn-fail.rs:13:1
|
@ -7,6 +12,6 @@ LL | fn req(&self);
LL | impl const Tr for u16 {
| ^^^^^^^^^^^^^^^^^^^^^ missing `req` in implementation
error: aborting due to 1 previous error
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0046`.

View File

@ -1,4 +1,5 @@
//@ check-pass
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]

View File

@ -0,0 +1,9 @@
error[E0271]: type mismatch resolving `<() as Index>::Output == &mut <() as Index>::Output`
--> $DIR/issue-100222.rs:34:12
|
LL | fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output
| ^^^^^^^^^ types differ
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.

View File

@ -0,0 +1,9 @@
error[E0271]: type mismatch resolving `<() as Index>::Output == &mut <() as Index>::Output`
--> $DIR/issue-100222.rs:25:12
|
LL | fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output
| ^^^^^^^^^ types differ
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.

View File

@ -1,5 +1,6 @@
//@ revisions: nn ny yn yy
//@ check-pass
//@ known-bug: #110395
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects, associated_type_defaults, const_mut_refs)]

View File

@ -0,0 +1,9 @@
error[E0271]: type mismatch resolving `<() as Index>::Output == &mut <() as Index>::Output`
--> $DIR/issue-100222.rs:34:12
|
LL | fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output
| ^^^^^^^^^ types differ
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.

View File

@ -0,0 +1,9 @@
error[E0271]: type mismatch resolving `<() as Index>::Output == &mut <() as Index>::Output`
--> $DIR/issue-100222.rs:25:12
|
LL | fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output
| ^^^^^^^^^ types differ
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.

View File

@ -1,5 +1,7 @@
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_fmt_arguments_new)]
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
#![feature(const_trait_impl, effects)]
#[const_trait]
trait Tr {

View File

@ -1,14 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-79450.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[E0015]: cannot call non-const fn `_print` in constant functions
--> $DIR/issue-79450.rs:9:9
--> $DIR/issue-79450.rs:11:9
|
LL | println!("lul");
| ^^^^^^^^^^^^^^^
@ -16,6 +7,6 @@ LL | println!("lul");
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
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`.

View File

@ -7,11 +7,16 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
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 2 previous errors; 1 warning emitted

View File

@ -7,6 +7,11 @@ 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: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: cannot specialize on const impl with non-const impl
--> $DIR/specializing-constness.rs:23:1
|
@ -25,5 +30,5 @@ error: cannot specialize on trait `Compat`
LL | impl<T: Spec + Sup> A for T {
| ^^^^
error: aborting due to 3 previous errors; 1 warning emitted
error: aborting due to 4 previous errors; 1 warning emitted

View File

@ -1,7 +1,9 @@
//@ revisions: stable unstable
//@ compile-flags: -Znext-solver
#![cfg_attr(unstable, feature(unstable))] // The feature from the ./auxiliary/staged-api.rs file.
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
#![feature(const_trait_impl, effects)]
#![allow(incomplete_features)]
#![feature(staged_api)]
#![stable(feature = "rust1", since = "1.0.0")]

View File

@ -1,14 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/staged-api.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
error: trait implementations cannot be const stable yet
--> $DIR/staged-api.rs:19:1
--> $DIR/staged-api.rs:21:1
|
LL | / impl const MyTrait for Foo {
LL | |
@ -19,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:41:1
--> $DIR/staged-api.rs:43:1
|
LL | / pub const fn const_context_not_const_stable() {
LL | |
@ -31,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:32:5
--> $DIR/staged-api.rs:34:5
|
LL | Unstable::func();
| ^^^^^^^^^^^^^^^^
@ -39,7 +30,7 @@ LL | Unstable::func();
= help: add `#![feature(unstable)]` 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:43:5
--> $DIR/staged-api.rs:45:5
|
LL | Unstable::func();
| ^^^^^^^^^^^^^^^^
@ -47,12 +38,12 @@ LL | Unstable::func();
= help: add `#![feature(unstable)]` 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:53:5
--> $DIR/staged-api.rs:55:5
|
LL | Unstable::func();
| ^^^^^^^^^^^^^^^^
|
= help: const-stable functions can only call other const-stable functions
error: aborting due to 5 previous errors; 1 warning emitted
error: aborting due to 5 previous errors

View File

@ -1,14 +1,5 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/staged-api.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
error: `<Foo as staged_api::MyTrait>::func` is not yet stable as a const fn
--> $DIR/staged-api.rs:34:5
--> $DIR/staged-api.rs:36:5
|
LL | Foo::func();
| ^^^^^^^^^^^
@ -16,7 +7,7 @@ LL | Foo::func();
= help: add `#![feature(foo)]` to the crate attributes to enable
error: `<Foo as staged_api::MyTrait>::func` is not yet stable as a const fn
--> $DIR/staged-api.rs:45:5
--> $DIR/staged-api.rs:47:5
|
LL | Foo::func();
| ^^^^^^^^^^^
@ -24,7 +15,7 @@ LL | Foo::func();
= help: add `#![feature(foo)]` 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:53:5
--> $DIR/staged-api.rs:55:5
|
LL | Unstable::func();
| ^^^^^^^^^^^^^^^^
@ -32,7 +23,7 @@ LL | Unstable::func();
= help: const-stable functions can only call other const-stable functions
error: `<Foo as staged_api::MyTrait>::func` is not yet stable as a const fn
--> $DIR/staged-api.rs:55:5
--> $DIR/staged-api.rs:57:5
|
LL | Foo::func();
| ^^^^^^^^^^^
@ -40,12 +31,12 @@ LL | Foo::func();
= help: const-stable functions can only call other const-stable functions
error: `const_context_not_const_stable` is not yet stable as a const fn
--> $DIR/staged-api.rs:57:5
--> $DIR/staged-api.rs:59:5
|
LL | const_context_not_const_stable()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: const-stable functions can only call other const-stable functions
error: aborting due to 5 previous errors; 1 warning emitted
error: aborting due to 5 previous errors

View File

@ -1,32 +1,23 @@
error: `~const` is not allowed here
--> $DIR/super-traits-fail-2.rs:10:12
--> $DIR/super-traits-fail-2.rs:12: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:10:1
--> $DIR/super-traits-fail-2.rs:12:1
|
LL | trait Bar: ~const Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/super-traits-fail-2.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/super-traits-fail-2.rs:10:19
--> $DIR/super-traits-fail-2.rs:12:19
|
LL | trait Bar: ~const Foo {}
| ^^^
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-2.rs:10:19
--> $DIR/super-traits-fail-2.rs:12:19
|
LL | trait Bar: ~const Foo {}
| ^^^
@ -34,12 +25,12 @@ 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:10:19
--> $DIR/super-traits-fail-2.rs:12:19
|
LL | trait Bar: ~const Foo {}
| ^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 4 previous errors; 1 warning emitted
error: aborting due to 4 previous errors

View File

@ -1,20 +1,11 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/super-traits-fail-2.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/super-traits-fail-2.rs:10:19
--> $DIR/super-traits-fail-2.rs:12:19
|
LL | trait Bar: ~const Foo {}
| ^^^
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-2.rs:10:19
--> $DIR/super-traits-fail-2.rs:12:19
|
LL | trait Bar: ~const Foo {}
| ^^^
@ -22,12 +13,12 @@ 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:10:19
--> $DIR/super-traits-fail-2.rs:12:19
|
LL | trait Bar: ~const Foo {}
| ^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 3 previous errors; 1 warning emitted
error: aborting due to 3 previous errors

View File

@ -1,4 +1,6 @@
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]
//@ revisions: yy yn ny nn
#[cfg_attr(any(yy, yn), const_trait)]

View File

@ -1,32 +1,23 @@
error: `~const` is not allowed here
--> $DIR/super-traits-fail-2.rs:10:12
--> $DIR/super-traits-fail-2.rs:12: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:10:1
--> $DIR/super-traits-fail-2.rs:12:1
|
LL | trait Bar: ~const Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/super-traits-fail-2.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[E0277]: the trait bound `Foo::{synthetic#0}: ~const Compat` is not satisfied
--> $DIR/super-traits-fail-2.rs:17:7
--> $DIR/super-traits-fail-2.rs:19:7
|
LL | x.a();
| ^ the trait `~const Compat` is not implemented for `Foo::{synthetic#0}`
|
note: required by a bound in `Foo::a`
--> $DIR/super-traits-fail-2.rs:4:25
--> $DIR/super-traits-fail-2.rs:6:25
|
LL | #[cfg_attr(any(yy, yn), const_trait)]
| ^^^^^^^^^^^ required by this bound in `Foo::a`
@ -38,6 +29,6 @@ help: consider further restricting the associated type
LL | const fn foo<T: Bar>(x: &T) where Foo::{synthetic#0}: ~const Compat {
| +++++++++++++++++++++++++++++++++++++++
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`.

View File

@ -1,20 +1,11 @@
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/super-traits-fail-2.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[E0277]: the trait bound `Foo::{synthetic#0}: ~const Compat` is not satisfied
--> $DIR/super-traits-fail-2.rs:17:7
--> $DIR/super-traits-fail-2.rs:19:7
|
LL | x.a();
| ^ the trait `~const Compat` is not implemented for `Foo::{synthetic#0}`
|
note: required by a bound in `Foo::a`
--> $DIR/super-traits-fail-2.rs:4:25
--> $DIR/super-traits-fail-2.rs:6:25
|
LL | #[cfg_attr(any(yy, yn), const_trait)]
| ^^^^^^^^^^^ required by this bound in `Foo::a`
@ -26,6 +17,6 @@ help: consider further restricting the associated type
LL | const fn foo<T: Bar>(x: &T) where Foo::{synthetic#0}: ~const Compat {
| +++++++++++++++++++++++++++++++++++++++
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`.

View File

@ -1,23 +1,23 @@
error: `~const` is not allowed here
--> $DIR/super-traits-fail-3.rs:13:12
--> $DIR/super-traits-fail-3.rs:14: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:13:1
--> $DIR/super-traits-fail-3.rs:14:1
|
LL | trait Bar: ~const Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-3.rs:13:19
--> $DIR/super-traits-fail-3.rs:14:19
|
LL | trait Bar: ~const Foo {}
| ^^^
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-3.rs:13:19
--> $DIR/super-traits-fail-3.rs:14:19
|
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:13:19
--> $DIR/super-traits-fail-3.rs:14:19
|
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: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-3.rs:19:24
--> $DIR/super-traits-fail-3.rs:20:24
|
LL | const fn foo<T: ~const Bar>(x: &T) {
| ^^^

View File

@ -1,11 +1,11 @@
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-3.rs:13:19
--> $DIR/super-traits-fail-3.rs:14:19
|
LL | trait Bar: ~const Foo {}
| ^^^
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-3.rs:13:19
--> $DIR/super-traits-fail-3.rs:14:19
|
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:13:19
--> $DIR/super-traits-fail-3.rs:14:19
|
LL | trait Bar: ~const Foo {}
| ^^^

View File

@ -1,3 +1,4 @@
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]

View File

@ -1,29 +1,29 @@
error: `~const` is not allowed here
--> $DIR/super-traits-fail-3.rs:13:12
--> $DIR/super-traits-fail-3.rs:14: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:13:1
--> $DIR/super-traits-fail-3.rs:14:1
|
LL | trait Bar: ~const Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-3.rs:19:24
--> $DIR/super-traits-fail-3.rs:20:24
|
LL | const fn foo<T: ~const Bar>(x: &T) {
| ^^^
error[E0277]: the trait bound `Foo::{synthetic#0}: ~const Compat` is not satisfied
--> $DIR/super-traits-fail-3.rs:21:7
--> $DIR/super-traits-fail-3.rs:22:7
|
LL | x.a();
| ^ the trait `~const Compat` is not implemented for `Foo::{synthetic#0}`
|
note: required by a bound in `Foo::a`
--> $DIR/super-traits-fail-3.rs:7:25
--> $DIR/super-traits-fail-3.rs:8:25
|
LL | #[cfg_attr(any(yy, yn), const_trait)]
| ^^^^^^^^^^^ required by this bound in `Foo::a`

View File

@ -1,11 +1,11 @@
error[E0277]: the trait bound `Foo::{synthetic#0}: ~const Compat` is not satisfied
--> $DIR/super-traits-fail-3.rs:21:7
--> $DIR/super-traits-fail-3.rs:22:7
|
LL | x.a();
| ^ the trait `~const Compat` is not implemented for `Foo::{synthetic#0}`
|
note: required by a bound in `Foo::a`
--> $DIR/super-traits-fail-3.rs:7:25
--> $DIR/super-traits-fail-3.rs:8:25
|
LL | #[cfg_attr(any(yy, yn), const_trait)]
| ^^^^^^^^^^^ required by this bound in `Foo::a`

Some files were not shown because too many files have changed in this diff Show More