2023-10-17 12:52:11 -05:00
|
|
|
//! Ensure we don't allow accessing const effect parameters from stable Rust.
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
i8::checked_sub::<true>(42, 43);
|
|
|
|
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
|
2023-11-11 22:33:19 -06:00
|
|
|
i8::checked_sub::<false>(42, 43);
|
|
|
|
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
|
2023-10-17 12:52:11 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
const FOO: () = {
|
|
|
|
i8::checked_sub::<false>(42, 43);
|
|
|
|
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
|
2023-11-11 22:33:19 -06:00
|
|
|
i8::checked_sub::<true>(42, 43);
|
|
|
|
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
|
2023-10-17 12:52:11 -05:00
|
|
|
};
|