Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/ui/contracts/associated-item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/contracts/async-fn-contract-ice-145333.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 1 addition & 10 deletions tests/ui/contracts/async-fn-contract-ice-145333.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/rust-lang/rust/issues/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

2 changes: 1 addition & 1 deletion tests/ui/contracts/contract-annotation-limitations.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
11 changes: 1 addition & 10 deletions tests/ui/contracts/contract-annotation-limitations.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/rust-lang/rust/issues/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

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-generics.chk_pass.stderr

This file was deleted.

2 changes: 1 addition & 1 deletion tests/ui/contracts/contract-attributes-generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-generics.unchk_pass.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-nest.chk_fail_post.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-nest.chk_fail_pre.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-nest.chk_pass.stderr

This file was deleted.

2 changes: 1 addition & 1 deletion tests/ui/contracts/contract-attributes-nest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-nest.unchk_fail_post.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-nest.unchk_fail_pre.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-nest.unchk_pass.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-tail.chk_fail_post.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-tail.chk_fail_pre.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-tail.chk_pass.stderr

This file was deleted.

2 changes: 1 addition & 1 deletion tests/ui/contracts/contract-attributes-tail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-tail.unchk_fail_post.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-tail.unchk_fail_pre.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-attributes-tail.unchk_pass.stderr

This file was deleted.

2 changes: 1 addition & 1 deletion tests/ui/contracts/contract-captures-via-closure-copy.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-captures-via-closure-copy.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 1 addition & 10 deletions tests/ui/contracts/contract-captures-via-closure-noncopy.stderr
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/rust-lang/rust/issues/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
|
Expand All @@ -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`.
11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-const-fn.all_pass.stderr

This file was deleted.

2 changes: 1 addition & 1 deletion tests/ui/contracts/contract-const-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-const-fn.runtime_fail_post.stderr

This file was deleted.

11 changes: 0 additions & 11 deletions tests/ui/contracts/contract-const-fn.runtime_fail_pre.stderr

This file was deleted.

Loading
Loading