blob: d0b3ed661ed695da9ef5feda63f6ebaa67ca08f1 [file] [log] [blame] [edit]
//@ dont-require-annotations: NOTE
//@ compile-flags: -Zcontract-checks=yes
#![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;)]
//~^ ERROR mismatched types [E0308]
//~| NOTE expected `bool`, found `()`
fn foo(x: u32) -> u32 {
x * 2
}
fn main() {
foo(1);
}