Yeet effects feature
This commit is contained in:
parent
ace9e4c078
commit
0b5ddf30eb
@ -100,6 +100,9 @@ macro_rules! declare_features {
|
||||
Some("renamed to `doc_notable_trait`")),
|
||||
/// Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238).
|
||||
(removed, dropck_parametricity, "1.38.0", Some(28498), None),
|
||||
/// Uses generic effect parameters for ~const bounds
|
||||
(removed, effects, "CURRENT_RUSTC_VERSION", Some(102090),
|
||||
Some("removed, redundant with `#![feature(const_trait_impl)]`")),
|
||||
/// Allows defining `existential type`s.
|
||||
(removed, existential_type, "1.38.0", Some(63063),
|
||||
Some("removed in favor of `#![feature(type_alias_impl_trait)]`")),
|
||||
|
@ -462,8 +462,6 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
(unstable, doc_masked, "1.21.0", Some(44027)),
|
||||
/// Allows `dyn* Trait` objects.
|
||||
(incomplete, dyn_star, "1.65.0", Some(102425)),
|
||||
/// Uses generic effect parameters for ~const bounds
|
||||
(incomplete, effects, "1.72.0", Some(102090)),
|
||||
/// Allows exhaustive pattern matching on types that contain uninhabited types.
|
||||
(unstable, exhaustive_patterns, "1.13.0", Some(51085)),
|
||||
/// Allows explicit tail calls via `become` expression.
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ known-bug: #112623
|
||||
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
#[const_trait]
|
||||
trait Value {
|
||||
|
@ -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::<()>([()]);
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ known-bug: #121411
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
#[const_trait]
|
||||
trait Foo {
|
||||
|
@ -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 {
|
||||
|
@ -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() -> '
|
||||
|
@ -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 {}
|
||||
|
@ -8,8 +8,7 @@
|
||||
//
|
||||
// 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)]
|
||||
#![feature(const_trait_impl)]
|
||||
#![crate_name = "foo"]
|
||||
|
||||
use std::marker::Destruct;
|
||||
|
@ -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> {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 || {};
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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?;
|
||||
| ^^^^^^
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -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]
|
||||
|
@ -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")]
|
||||
|
@ -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 {
|
||||
| ^^^^^^^
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(c_variadic)]
|
||||
#![feature(effects)]
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,3 @@
|
||||
#![feature(effects)]
|
||||
//~^ WARN: the feature `effects` is incomplete
|
||||
|
||||
struct A();
|
||||
|
||||
impl const Drop for A {}
|
||||
|
@ -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`.
|
||||
|
@ -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"]
|
||||
|
||||
|
@ -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() {}
|
||||
|
@ -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
|
@ -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`.
|
@ -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 {
|
||||
|
@ -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")]
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -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> {
|
||||
|
@ -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`.
|
||||
|
@ -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 {
|
||||
|
@ -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")]
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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();
|
||||
|
@ -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`.
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
| ^^^^^^^^^
|
||||
|
@ -4,7 +4,7 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
// FIXME(effects) check-pass
|
||||
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
struct S;
|
||||
|
||||
|
@ -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`.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//@ known-bug: #110395
|
||||
// FIXME(effects) check-pass
|
||||
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
struct S;
|
||||
|
||||
|
@ -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`.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
| ^^^^^^^^
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
struct S;
|
||||
|
||||
|
@ -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);
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
@ -4,7 +4,7 @@
|
||||
//@ known-bug: #110395
|
||||
// FIXME(effects) check-pass
|
||||
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
struct S;
|
||||
|
||||
|
@ -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`.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// FIXME(effects) check-pass
|
||||
//@ compile-flags: -Znext-solver
|
||||
#![feature(const_closures, const_trait_impl, effects)]
|
||||
#![feature(const_closures, const_trait_impl)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
pub const _: () = {
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
#[const_trait]
|
||||
trait MyTrait {
|
||||
|
@ -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 {
|
||||
| ^^^
|
||||
|
@ -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 {}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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`.
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
pub trait A {}
|
||||
|
||||
|
@ -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]`
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ known-bug: #110395
|
||||
//@ compile-flags: -Znext-solver
|
||||
// FIXME(effects): check-pass
|
||||
#![feature(const_trait_impl, effects, generic_const_exprs)]
|
||||
#![feature(const_trait_impl, generic_const_exprs)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
fn main() {
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ known-bug: #110395
|
||||
#![feature(derive_const, effects)]
|
||||
#![feature(derive_const)]
|
||||
|
||||
pub struct A;
|
||||
|
||||
|
@ -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`.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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`.
|
||||
|
@ -2,7 +2,7 @@
|
||||
// FIXME(effects) check-pass
|
||||
|
||||
#![feature(derive_const)]
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
#[derive_const(PartialEq)]
|
||||
pub struct Reverse<T>(T);
|
||||
|
@ -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`.
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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()
|
||||
| ^^^^^^
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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 {}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(const_trait_impl, effects)]
|
||||
#![feature(const_trait_impl)]
|
||||
|
||||
pub const fn foo() {}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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> {
|
||||
|
@ -1,7 +1,5 @@
|
||||
//@ check-pass
|
||||
//@ compile-flags: -Znext-solver
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(effects)]
|
||||
|
||||
pub const fn owo() {}
|
||||
|
||||
|
@ -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() {}
|
@ -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
|
||||
|
@ -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`.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user