I tried this code:
fn main() {
#[doc = {
let a = 1;
let b = 1;
let sum = a + b;
assert_eq!(sum, 2);
}]
println!();
}
I expected to see this happen: compiler error
Instead, this happened: program compiles, no diagnostic issued
This works on rust 1.94 and newer.
I tried this code:
I expected to see this happen: compiler error
Instead, this happened: program compiles, no diagnostic issued
This works on rust 1.94 and newer.