-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This has now been approved as a language feature and no longer needs a `rustc_` prefix. Also change the `contracts` feature to be marked as incomplete and `contracts_internals` as internal.
- Loading branch information
Showing
66 changed files
with
523 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
error: contract annotations is only supported in functions with bodies | ||
--> $DIR/contract-annotation-limitations.rs:17:5 | ||
--> $DIR/contract-annotation-limitations.rs:18:5 | ||
| | ||
LL | #[core::contracts::ensures(|ret| ret.is_none_or(Stars::is_valid))] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: contract annotations is only supported in functions with bodies | ||
--> $DIR/contract-annotation-limitations.rs:21:5 | ||
--> $DIR/contract-annotation-limitations.rs:22:5 | ||
| | ||
LL | #[core::contracts::ensures(|ret| ret.is_none_or(Stars::is_valid))] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
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 | ||
|
11 changes: 11 additions & 0 deletions
11
tests/ui/contracts/contract-attributes-generics.chk_const_fail.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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 <https://github.com/rust-lang/rust/issues/128044> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
11 changes: 11 additions & 0 deletions
11
tests/ui/contracts/contract-attributes-generics.chk_fail_post.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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 <https://github.com/rust-lang/rust/issues/128044> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
11 changes: 11 additions & 0 deletions
11
tests/ui/contracts/contract-attributes-generics.chk_fail_pre.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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 <https://github.com/rust-lang/rust/issues/128044> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
11 changes: 11 additions & 0 deletions
11
tests/ui/contracts/contract-attributes-generics.chk_pass.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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 <https://github.com/rust-lang/rust/issues/128044> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/ui/contracts/contract-attributes-generics.unchk_pass.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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 <https://github.com/rust-lang/rust/issues/128044> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
Oops, something went wrong.