mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-01 04:07:45 +00:00
Refactor contract HIR lowering to ensure no contract code is executed when contract-checks are disabled. The call to contract_checks is moved to inside the lowered fn body, and contract closures are built conditionally, ensuring no side-effects present in contracts occur when those are disabled.
19 lines
623 B
Plaintext
19 lines
623 B
Plaintext
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 <https://github.com/rust-lang/rust/issues/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
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|