diff --git a/tests/ui/contracts/associated-item.rs b/tests/ui/contracts/associated-item.rs index 4a2d05abbc53c..86ff05f6c0f4f 100644 --- a/tests/ui/contracts/associated-item.rs +++ b/tests/ui/contracts/associated-item.rs @@ -3,8 +3,8 @@ //@ compile-flags: --crate-type=lib //@ check-pass +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use extern crate core; diff --git a/tests/ui/contracts/async-fn-contract-ice-145333.rs b/tests/ui/contracts/async-fn-contract-ice-145333.rs index a6de8a786af96..e9e2877cd2de2 100644 --- a/tests/ui/contracts/async-fn-contract-ice-145333.rs +++ b/tests/ui/contracts/async-fn-contract-ice-145333.rs @@ -1,7 +1,7 @@ //@ compile-flags: --crate-type=lib //@ edition: 2021 +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete #[core::contracts::ensures(|ret| *ret)] //~^ ERROR contract annotations are not yet supported on async or gen functions diff --git a/tests/ui/contracts/async-fn-contract-ice-145333.stderr b/tests/ui/contracts/async-fn-contract-ice-145333.stderr index 77f5379e6fb54..031cff5cad1b0 100644 --- a/tests/ui/contracts/async-fn-contract-ice-145333.stderr +++ b/tests/ui/contracts/async-fn-contract-ice-145333.stderr @@ -4,14 +4,5 @@ error: contract annotations are not yet supported on async or gen functions LL | #[core::contracts::ensures(|ret| *ret)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/async-fn-contract-ice-145333.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error diff --git a/tests/ui/contracts/contract-annotation-limitations.rs b/tests/ui/contracts/contract-annotation-limitations.rs index 10b3bacab5cfa..0ecc1d15aa7b4 100644 --- a/tests/ui/contracts/contract-annotation-limitations.rs +++ b/tests/ui/contracts/contract-annotation-limitations.rs @@ -1,8 +1,8 @@ //! Test for some of the existing limitations and the current error messages. //! Some of these limitations may be removed in the future. +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] #![allow(dead_code)] /// Represent a 5-star system. diff --git a/tests/ui/contracts/contract-annotation-limitations.stderr b/tests/ui/contracts/contract-annotation-limitations.stderr index 14338cf4b8687..c0dc37fee4c4e 100644 --- a/tests/ui/contracts/contract-annotation-limitations.stderr +++ b/tests/ui/contracts/contract-annotation-limitations.stderr @@ -10,14 +10,5 @@ error: contract annotations is only supported in functions with bodies LL | #[core::contracts::ensures(|ret| ret.is_none_or(Stars::is_valid))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-annotation-limitations.rs:4:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors diff --git a/tests/ui/contracts/contract-attributes-generics.chk_const_fail.stderr b/tests/ui/contracts/contract-attributes-generics.chk_const_fail.stderr deleted file mode 100644 index 0630811d4f7ea..0000000000000 --- a/tests/ui/contracts/contract-attributes-generics.chk_const_fail.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-generics.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-generics.chk_fail_post.stderr b/tests/ui/contracts/contract-attributes-generics.chk_fail_post.stderr deleted file mode 100644 index 0630811d4f7ea..0000000000000 --- a/tests/ui/contracts/contract-attributes-generics.chk_fail_post.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-generics.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-generics.chk_fail_pre.stderr b/tests/ui/contracts/contract-attributes-generics.chk_fail_pre.stderr deleted file mode 100644 index 0630811d4f7ea..0000000000000 --- a/tests/ui/contracts/contract-attributes-generics.chk_fail_pre.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-generics.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-generics.chk_pass.stderr b/tests/ui/contracts/contract-attributes-generics.chk_pass.stderr deleted file mode 100644 index 0630811d4f7ea..0000000000000 --- a/tests/ui/contracts/contract-attributes-generics.chk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-generics.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-generics.rs b/tests/ui/contracts/contract-attributes-generics.rs index 3763ce116f844..6fd4c0a9790b2 100644 --- a/tests/ui/contracts/contract-attributes-generics.rs +++ b/tests/ui/contracts/contract-attributes-generics.rs @@ -16,8 +16,8 @@ //@ [chk_fail_post] compile-flags: -Zcontract-checks=yes //@ [chk_const_fail] compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] use std::ops::Sub; diff --git a/tests/ui/contracts/contract-attributes-generics.unchk_pass.stderr b/tests/ui/contracts/contract-attributes-generics.unchk_pass.stderr deleted file mode 100644 index 0630811d4f7ea..0000000000000 --- a/tests/ui/contracts/contract-attributes-generics.unchk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-generics.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-nest.chk_fail_post.stderr b/tests/ui/contracts/contract-attributes-nest.chk_fail_post.stderr deleted file mode 100644 index 9ca95b8bb01a4..0000000000000 --- a/tests/ui/contracts/contract-attributes-nest.chk_fail_post.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-nest.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-nest.chk_fail_pre.stderr b/tests/ui/contracts/contract-attributes-nest.chk_fail_pre.stderr deleted file mode 100644 index 9ca95b8bb01a4..0000000000000 --- a/tests/ui/contracts/contract-attributes-nest.chk_fail_pre.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-nest.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-nest.chk_pass.stderr b/tests/ui/contracts/contract-attributes-nest.chk_pass.stderr deleted file mode 100644 index 9ca95b8bb01a4..0000000000000 --- a/tests/ui/contracts/contract-attributes-nest.chk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-nest.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-nest.rs b/tests/ui/contracts/contract-attributes-nest.rs index d367687b84e31..89bd0a2b1136a 100644 --- a/tests/ui/contracts/contract-attributes-nest.rs +++ b/tests/ui/contracts/contract-attributes-nest.rs @@ -16,8 +16,8 @@ //@ [chk_fail_pre] compile-flags: -Zcontract-checks=yes //@ [chk_fail_post] compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] #[core::contracts::requires(x.baz > 0)] #[core::contracts::ensures(|ret| *ret > 100)] diff --git a/tests/ui/contracts/contract-attributes-nest.unchk_fail_post.stderr b/tests/ui/contracts/contract-attributes-nest.unchk_fail_post.stderr deleted file mode 100644 index 9ca95b8bb01a4..0000000000000 --- a/tests/ui/contracts/contract-attributes-nest.unchk_fail_post.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-nest.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-nest.unchk_fail_pre.stderr b/tests/ui/contracts/contract-attributes-nest.unchk_fail_pre.stderr deleted file mode 100644 index 9ca95b8bb01a4..0000000000000 --- a/tests/ui/contracts/contract-attributes-nest.unchk_fail_pre.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-nest.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-nest.unchk_pass.stderr b/tests/ui/contracts/contract-attributes-nest.unchk_pass.stderr deleted file mode 100644 index 9ca95b8bb01a4..0000000000000 --- a/tests/ui/contracts/contract-attributes-nest.unchk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-nest.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-tail.chk_fail_post.stderr b/tests/ui/contracts/contract-attributes-tail.chk_fail_post.stderr deleted file mode 100644 index f87e7e19fa3db..0000000000000 --- a/tests/ui/contracts/contract-attributes-tail.chk_fail_post.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-tail.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-tail.chk_fail_pre.stderr b/tests/ui/contracts/contract-attributes-tail.chk_fail_pre.stderr deleted file mode 100644 index f87e7e19fa3db..0000000000000 --- a/tests/ui/contracts/contract-attributes-tail.chk_fail_pre.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-tail.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-tail.chk_pass.stderr b/tests/ui/contracts/contract-attributes-tail.chk_pass.stderr deleted file mode 100644 index f87e7e19fa3db..0000000000000 --- a/tests/ui/contracts/contract-attributes-tail.chk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-tail.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-tail.rs b/tests/ui/contracts/contract-attributes-tail.rs index 43edfe5e803fe..361725474099e 100644 --- a/tests/ui/contracts/contract-attributes-tail.rs +++ b/tests/ui/contracts/contract-attributes-tail.rs @@ -16,8 +16,8 @@ //@ [chk_fail_pre] compile-flags: -Zcontract-checks=yes //@ [chk_fail_post] compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] #[core::contracts::requires(x.baz > 0)] #[core::contracts::ensures(|ret| *ret > 100)] diff --git a/tests/ui/contracts/contract-attributes-tail.unchk_fail_post.stderr b/tests/ui/contracts/contract-attributes-tail.unchk_fail_post.stderr deleted file mode 100644 index f87e7e19fa3db..0000000000000 --- a/tests/ui/contracts/contract-attributes-tail.unchk_fail_post.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-tail.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-tail.unchk_fail_pre.stderr b/tests/ui/contracts/contract-attributes-tail.unchk_fail_pre.stderr deleted file mode 100644 index f87e7e19fa3db..0000000000000 --- a/tests/ui/contracts/contract-attributes-tail.unchk_fail_pre.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-tail.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-attributes-tail.unchk_pass.stderr b/tests/ui/contracts/contract-attributes-tail.unchk_pass.stderr deleted file mode 100644 index f87e7e19fa3db..0000000000000 --- a/tests/ui/contracts/contract-attributes-tail.unchk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-attributes-tail.rs:19:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-captures-via-closure-copy.rs b/tests/ui/contracts/contract-captures-via-closure-copy.rs index bc7e5b9b6f101..a5453503b4bd1 100644 --- a/tests/ui/contracts/contract-captures-via-closure-copy.rs +++ b/tests/ui/contracts/contract-captures-via-closure-copy.rs @@ -1,8 +1,8 @@ //@ run-crash //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] struct Baz { baz: i32 diff --git a/tests/ui/contracts/contract-captures-via-closure-copy.stderr b/tests/ui/contracts/contract-captures-via-closure-copy.stderr deleted file mode 100644 index d92db601608f5..0000000000000 --- a/tests/ui/contracts/contract-captures-via-closure-copy.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-captures-via-closure-copy.rs:4:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-captures-via-closure-noncopy.rs b/tests/ui/contracts/contract-captures-via-closure-noncopy.rs index 1ec2feb045a33..c7aa72d2b0f67 100644 --- a/tests/ui/contracts/contract-captures-via-closure-noncopy.rs +++ b/tests/ui/contracts/contract-captures-via-closure-noncopy.rs @@ -1,8 +1,8 @@ //@ edition:2015..2021 //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] struct Baz { baz: i32 diff --git a/tests/ui/contracts/contract-captures-via-closure-noncopy.stderr b/tests/ui/contracts/contract-captures-via-closure-noncopy.stderr index 29adeaec3e167..5f55faed80c89 100644 --- a/tests/ui/contracts/contract-captures-via-closure-noncopy.stderr +++ b/tests/ui/contracts/contract-captures-via-closure-noncopy.stderr @@ -1,12 +1,3 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-captures-via-closure-noncopy.rs:4:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0277]: the trait bound `Baz: std::marker::Copy` is not satisfied in `{closure@$DIR/contract-captures-via-closure-noncopy.rs:13:42: 13:57}` --> $DIR/contract-captures-via-closure-noncopy.rs:13:1 | @@ -32,6 +23,6 @@ LL + #[derive(Copy)] LL | struct Baz { | -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/contracts/contract-const-fn.all_pass.stderr b/tests/ui/contracts/contract-const-fn.all_pass.stderr deleted file mode 100644 index e5b1df6558235..0000000000000 --- a/tests/ui/contracts/contract-const-fn.all_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-const-fn.rs:17:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-const-fn.rs b/tests/ui/contracts/contract-const-fn.rs index fe8dd37b1f52d..c79ab33e8ec85 100644 --- a/tests/ui/contracts/contract-const-fn.rs +++ b/tests/ui/contracts/contract-const-fn.rs @@ -14,8 +14,8 @@ //@ [all_pass] compile-flags: -Zcontract-checks=yes //@ [runtime_fail_pre] compile-flags: -Zcontract-checks=yes //@ [runtime_fail_post] compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::*; diff --git a/tests/ui/contracts/contract-const-fn.runtime_fail_post.stderr b/tests/ui/contracts/contract-const-fn.runtime_fail_post.stderr deleted file mode 100644 index e5b1df6558235..0000000000000 --- a/tests/ui/contracts/contract-const-fn.runtime_fail_post.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-const-fn.rs:17:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contract-const-fn.runtime_fail_pre.stderr b/tests/ui/contracts/contract-const-fn.runtime_fail_pre.stderr deleted file mode 100644 index e5b1df6558235..0000000000000 --- a/tests/ui/contracts/contract-const-fn.runtime_fail_pre.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-const-fn.rs:17:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contracts-disabled-side-effect-declarations.rs b/tests/ui/contracts/contracts-disabled-side-effect-declarations.rs index fc07729e9132b..4b2d4a80237fe 100644 --- a/tests/ui/contracts/contracts-disabled-side-effect-declarations.rs +++ b/tests/ui/contracts/contracts-disabled-side-effect-declarations.rs @@ -1,6 +1,6 @@ //@ run-pass +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::requires; diff --git a/tests/ui/contracts/contracts-disabled-side-effect-declarations.stderr b/tests/ui/contracts/contracts-disabled-side-effect-declarations.stderr deleted file mode 100644 index 4c8a125384334..0000000000000 --- a/tests/ui/contracts/contracts-disabled-side-effect-declarations.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contracts-disabled-side-effect-declarations.rs:2:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contracts-disabled-side-effect-ensures.rs b/tests/ui/contracts/contracts-disabled-side-effect-ensures.rs index a3a77b0de9a2b..1488b8f8d3fd5 100644 --- a/tests/ui/contracts/contracts-disabled-side-effect-ensures.rs +++ b/tests/ui/contracts/contracts-disabled-side-effect-ensures.rs @@ -1,6 +1,6 @@ //@ run-pass +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::ensures; diff --git a/tests/ui/contracts/contracts-disabled-side-effect-ensures.stderr b/tests/ui/contracts/contracts-disabled-side-effect-ensures.stderr deleted file mode 100644 index dd9ebe9bd3556..0000000000000 --- a/tests/ui/contracts/contracts-disabled-side-effect-ensures.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contracts-disabled-side-effect-ensures.rs:2:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_fail_ret.stderr b/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_fail_ret.stderr deleted file mode 100644 index d693fad446a4d..0000000000000 --- a/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_fail_ret.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contracts-ensures-early-fn-exit.rs:16:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_fail_try.stderr b/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_fail_try.stderr deleted file mode 100644 index d693fad446a4d..0000000000000 --- a/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_fail_try.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contracts-ensures-early-fn-exit.rs:16:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_fail_yeet.stderr b/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_fail_yeet.stderr deleted file mode 100644 index d693fad446a4d..0000000000000 --- a/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_fail_yeet.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contracts-ensures-early-fn-exit.rs:16:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_pass.stderr b/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_pass.stderr deleted file mode 100644 index d693fad446a4d..0000000000000 --- a/tests/ui/contracts/contracts-ensures-early-fn-exit.chk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contracts-ensures-early-fn-exit.rs:16:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contracts-ensures-early-fn-exit.rs b/tests/ui/contracts/contracts-ensures-early-fn-exit.rs index 44ae07d8c95c0..71c69fa83ccb2 100644 --- a/tests/ui/contracts/contracts-ensures-early-fn-exit.rs +++ b/tests/ui/contracts/contracts-ensures-early-fn-exit.rs @@ -13,8 +13,8 @@ //@ [chk_fail_yeet] compile-flags: -Zcontract-checks=yes //! This test ensures that ensures clauses are checked for different return points of a function. +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] #![feature(yeet_expr)] /// This ensures will fail in different return points depending on the input. diff --git a/tests/ui/contracts/contracts-ensures-early-fn-exit.unchk_pass.stderr b/tests/ui/contracts/contracts-ensures-early-fn-exit.unchk_pass.stderr deleted file mode 100644 index d693fad446a4d..0000000000000 --- a/tests/ui/contracts/contracts-ensures-early-fn-exit.unchk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contracts-ensures-early-fn-exit.rs:16:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contracts-ensures-is-not-inherited-when-nesting.rs b/tests/ui/contracts/contracts-ensures-is-not-inherited-when-nesting.rs index f01a852fbff34..0fc9e5590f02a 100644 --- a/tests/ui/contracts/contracts-ensures-is-not-inherited-when-nesting.rs +++ b/tests/ui/contracts/contracts-ensures-is-not-inherited-when-nesting.rs @@ -1,7 +1,7 @@ //@ run-pass //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] #[core::contracts::ensures(|ret| *ret > 0)] fn outer() -> i32 { diff --git a/tests/ui/contracts/contracts-ensures-is-not-inherited-when-nesting.stderr b/tests/ui/contracts/contracts-ensures-is-not-inherited-when-nesting.stderr deleted file mode 100644 index 49a372b53c7d8..0000000000000 --- a/tests/ui/contracts/contracts-ensures-is-not-inherited-when-nesting.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contracts-ensures-is-not-inherited-when-nesting.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/contracts-requires-is-not-inherited-when-nesting.rs b/tests/ui/contracts/contracts-requires-is-not-inherited-when-nesting.rs index 2c2a4a6978550..3ac539adb247c 100644 --- a/tests/ui/contracts/contracts-requires-is-not-inherited-when-nesting.rs +++ b/tests/ui/contracts/contracts-requires-is-not-inherited-when-nesting.rs @@ -1,7 +1,7 @@ //@ run-pass //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] struct Outer { outer: std::cell::Cell } diff --git a/tests/ui/contracts/contracts-requires-is-not-inherited-when-nesting.stderr b/tests/ui/contracts/contracts-requires-is-not-inherited-when-nesting.stderr deleted file mode 100644 index 48898c4434ad5..0000000000000 --- a/tests/ui/contracts/contracts-requires-is-not-inherited-when-nesting.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contracts-requires-is-not-inherited-when-nesting.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/declared-vars-referring-to-params.rs b/tests/ui/contracts/declared-vars-referring-to-params.rs index 52885da048e20..d915dc09cfe20 100644 --- a/tests/ui/contracts/declared-vars-referring-to-params.rs +++ b/tests/ui/contracts/declared-vars-referring-to-params.rs @@ -1,7 +1,7 @@ //@ run-pass //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::{ensures, requires}; diff --git a/tests/ui/contracts/declared-vars-referring-to-params.stderr b/tests/ui/contracts/declared-vars-referring-to-params.stderr deleted file mode 100644 index 0ad9064e8606b..0000000000000 --- a/tests/ui/contracts/declared-vars-referring-to-params.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/declared-vars-referring-to-params.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/declared-vars-used-in-ensures.rs b/tests/ui/contracts/declared-vars-used-in-ensures.rs index 9703709e2b8e0..ddab57483668b 100644 --- a/tests/ui/contracts/declared-vars-used-in-ensures.rs +++ b/tests/ui/contracts/declared-vars-used-in-ensures.rs @@ -1,7 +1,7 @@ //@ run-pass //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::{ensures, requires}; diff --git a/tests/ui/contracts/declared-vars-used-in-ensures.stderr b/tests/ui/contracts/declared-vars-used-in-ensures.stderr deleted file mode 100644 index 000a1b239932c..0000000000000 --- a/tests/ui/contracts/declared-vars-used-in-ensures.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/declared-vars-used-in-ensures.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/declared-vars-used-in-requires-and-ensures.rs b/tests/ui/contracts/declared-vars-used-in-requires-and-ensures.rs index e066a95314a98..6b7896101ca04 100644 --- a/tests/ui/contracts/declared-vars-used-in-requires-and-ensures.rs +++ b/tests/ui/contracts/declared-vars-used-in-requires-and-ensures.rs @@ -1,7 +1,7 @@ //@ run-pass //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::{ensures, requires}; diff --git a/tests/ui/contracts/declared-vars-used-in-requires-and-ensures.stderr b/tests/ui/contracts/declared-vars-used-in-requires-and-ensures.stderr deleted file mode 100644 index 52b163553fba9..0000000000000 --- a/tests/ui/contracts/declared-vars-used-in-requires-and-ensures.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/declared-vars-used-in-requires-and-ensures.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/disallow-contract-annotation-on-non-fn.rs b/tests/ui/contracts/disallow-contract-annotation-on-non-fn.rs index 69be906782a67..fecac593f0e5a 100644 --- a/tests/ui/contracts/disallow-contract-annotation-on-non-fn.rs +++ b/tests/ui/contracts/disallow-contract-annotation-on-non-fn.rs @@ -1,7 +1,7 @@ //! Checks for compilation errors related to adding contracts to non-function items. +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] #![allow(dead_code)] #[core::contracts::requires(true)] diff --git a/tests/ui/contracts/disallow-contract-annotation-on-non-fn.stderr b/tests/ui/contracts/disallow-contract-annotation-on-non-fn.stderr index 0a7fff8183e09..864e94997a2e3 100644 --- a/tests/ui/contracts/disallow-contract-annotation-on-non-fn.stderr +++ b/tests/ui/contracts/disallow-contract-annotation-on-non-fn.stderr @@ -40,14 +40,5 @@ error: contract annotations can only be used on functions LL | #[core::contracts::requires(true)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/disallow-contract-annotation-on-non-fn.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -error: aborting due to 7 previous errors; 1 warning emitted +error: aborting due to 7 previous errors diff --git a/tests/ui/contracts/empty-ensures.rs b/tests/ui/contracts/empty-ensures.rs index d897f27bf6c94..0a52391117861 100644 --- a/tests/ui/contracts/empty-ensures.rs +++ b/tests/ui/contracts/empty-ensures.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::ensures; diff --git a/tests/ui/contracts/empty-ensures.stderr b/tests/ui/contracts/empty-ensures.stderr index 407a253bd8565..6a19d234b52c2 100644 --- a/tests/ui/contracts/empty-ensures.stderr +++ b/tests/ui/contracts/empty-ensures.stderr @@ -1,12 +1,3 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/empty-ensures.rs:2:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0277]: expected a `Fn(&_)` closure, found `()` --> $DIR/empty-ensures.rs:8:1 | @@ -20,6 +11,6 @@ LL | #[ensures()] note: required by a bound in `build_check_ensures` --> $SRC_DIR/core/src/contracts.rs:LL:COL -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/contracts/empty-requires.rs b/tests/ui/contracts/empty-requires.rs index e3c72dcd66a17..dedcc10d52cb0 100644 --- a/tests/ui/contracts/empty-requires.rs +++ b/tests/ui/contracts/empty-requires.rs @@ -1,7 +1,7 @@ //@ dont-require-annotations: NOTE //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::requires; diff --git a/tests/ui/contracts/empty-requires.stderr b/tests/ui/contracts/empty-requires.stderr index b48e547b8cda7..702b8a23c55e3 100644 --- a/tests/ui/contracts/empty-requires.stderr +++ b/tests/ui/contracts/empty-requires.stderr @@ -1,18 +1,9 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/empty-requires.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0308]: mismatched types --> $DIR/empty-requires.rs:9:1 | LL | #[requires()] | ^^^^^^^^^^^^^ expected `bool`, found `()` -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 E0308`. diff --git a/tests/ui/contracts/incomplete-feature.rs b/tests/ui/contracts/incomplete-feature.rs new file mode 100644 index 0000000000000..f1351e2f87e34 --- /dev/null +++ b/tests/ui/contracts/incomplete-feature.rs @@ -0,0 +1,17 @@ +//@ run-pass +//@ compile-flags: -Zcontract-checks=yes + +// This test specifically checks that the [incomplete_features] warning is +// emitted when the `contracts` feature gate is enabled, so that it can be +// marked as `expect`ed in other tests in order to reduce duplication. +#![feature(contracts)] +//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] +extern crate core; +use core::contracts::requires; + +#[requires(true)] +fn foo() {} + +fn main() { + foo() +} diff --git a/tests/ui/contracts/associated-item.stderr b/tests/ui/contracts/incomplete-feature.stderr similarity index 90% rename from tests/ui/contracts/associated-item.stderr rename to tests/ui/contracts/incomplete-feature.stderr index 20651026b87a2..7683926df073a 100644 --- a/tests/ui/contracts/associated-item.stderr +++ b/tests/ui/contracts/incomplete-feature.stderr @@ -1,5 +1,5 @@ warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/associated-item.rs:6:12 + --> $DIR/incomplete-feature.rs:7:12 | LL | #![feature(contracts)] | ^^^^^^^^^ diff --git a/tests/ui/contracts/internal_machinery/contract-lang-items.chk_fail_post.stderr b/tests/ui/contracts/internal_machinery/contract-lang-items.chk_fail_post.stderr deleted file mode 100644 index acce6b1fbc729..0000000000000 --- a/tests/ui/contracts/internal_machinery/contract-lang-items.chk_fail_post.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-lang-items.rs:8:12 - | -LL | #![feature(contracts)] // to access core::contracts - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/internal_machinery/contract-lang-items.chk_pass.stderr b/tests/ui/contracts/internal_machinery/contract-lang-items.chk_pass.stderr deleted file mode 100644 index acce6b1fbc729..0000000000000 --- a/tests/ui/contracts/internal_machinery/contract-lang-items.chk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-lang-items.rs:8:12 - | -LL | #![feature(contracts)] // to access core::contracts - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/internal_machinery/contract-lang-items.rs b/tests/ui/contracts/internal_machinery/contract-lang-items.rs index ad88ebfe22e3b..d675601036447 100644 --- a/tests/ui/contracts/internal_machinery/contract-lang-items.rs +++ b/tests/ui/contracts/internal_machinery/contract-lang-items.rs @@ -5,8 +5,8 @@ // //@ [chk_fail_post] run-crash +#![expect(incomplete_features)] #![feature(contracts)] // to access core::contracts -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] #![feature(contracts_internals)] // to access check_requires lang item #![feature(core_intrinsics)] fn foo(x: Baz) -> i32 { diff --git a/tests/ui/contracts/internal_machinery/contract-lang-items.unchk_pass.stderr b/tests/ui/contracts/internal_machinery/contract-lang-items.unchk_pass.stderr deleted file mode 100644 index acce6b1fbc729..0000000000000 --- a/tests/ui/contracts/internal_machinery/contract-lang-items.unchk_pass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/contract-lang-items.rs:8:12 - | -LL | #![feature(contracts)] // to access core::contracts - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/internal_machinery/lowering/basics.rs b/tests/ui/contracts/internal_machinery/lowering/basics.rs index 9160517a79322..7b3a769af8258 100644 --- a/tests/ui/contracts/internal_machinery/lowering/basics.rs +++ b/tests/ui/contracts/internal_machinery/lowering/basics.rs @@ -1,6 +1,6 @@ //@ run-pass +#![expect(incomplete_features)] #![feature(contracts, cfg_contract_checks, contracts_internals, core_intrinsics)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; diff --git a/tests/ui/contracts/internal_machinery/lowering/basics.stderr b/tests/ui/contracts/internal_machinery/lowering/basics.stderr deleted file mode 100644 index 118229694a906..0000000000000 --- a/tests/ui/contracts/internal_machinery/lowering/basics.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/basics.rs:2:12 - | -LL | #![feature(contracts, cfg_contract_checks, contracts_internals, core_intrinsics)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/contracts/requires-bool-expr-with-semicolon.rs b/tests/ui/contracts/requires-bool-expr-with-semicolon.rs index d0b3ed661ed69..3a1a6549a343a 100644 --- a/tests/ui/contracts/requires-bool-expr-with-semicolon.rs +++ b/tests/ui/contracts/requires-bool-expr-with-semicolon.rs @@ -1,7 +1,7 @@ //@ dont-require-annotations: NOTE //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::requires; diff --git a/tests/ui/contracts/requires-bool-expr-with-semicolon.stderr b/tests/ui/contracts/requires-bool-expr-with-semicolon.stderr index fd38fa4edcf51..559c710b14566 100644 --- a/tests/ui/contracts/requires-bool-expr-with-semicolon.stderr +++ b/tests/ui/contracts/requires-bool-expr-with-semicolon.stderr @@ -1,18 +1,9 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/requires-bool-expr-with-semicolon.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0308]: mismatched types --> $DIR/requires-bool-expr-with-semicolon.rs:9:1 | LL | #[requires(true;)] | ^^^^^^^^^^^^^^^^^^ expected `bool`, found `()` -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 E0308`. diff --git a/tests/ui/contracts/requires-no-final-expression.rs b/tests/ui/contracts/requires-no-final-expression.rs index 474b29d63ba61..0188a9f607a35 100644 --- a/tests/ui/contracts/requires-no-final-expression.rs +++ b/tests/ui/contracts/requires-no-final-expression.rs @@ -1,7 +1,7 @@ //@ dont-require-annotations: NOTE //@ compile-flags: -Zcontract-checks=yes +#![expect(incomplete_features)] #![feature(contracts)] -//~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; use core::contracts::requires; diff --git a/tests/ui/contracts/requires-no-final-expression.stderr b/tests/ui/contracts/requires-no-final-expression.stderr index 0db1648573945..ae71ee3c996c2 100644 --- a/tests/ui/contracts/requires-no-final-expression.stderr +++ b/tests/ui/contracts/requires-no-final-expression.stderr @@ -1,18 +1,9 @@ -warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/requires-no-final-expression.rs:3:12 - | -LL | #![feature(contracts)] - | ^^^^^^^^^ - | - = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0308]: mismatched types --> $DIR/requires-no-final-expression.rs:9:1 | LL | #[requires(let y = 1;)] | ^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()` -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 E0308`.