mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-03 22:28:05 +00:00
Contract variables can be declared in the `requires` clause and can be referenced both in `requires` and `ensures`, subject to usual borrow checking rules. This allows any setup common to both the `requires` and `ensures` clauses to only be done once.
12 lines
438 B
Plaintext
12 lines
438 B
Plaintext
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 <https://github.com/rust-lang/rust/issues/128044> for more information
|
|
= note: `#[warn(incomplete_features)]` on by default
|
|
|
|
warning: 1 warning emitted
|
|
|