Disable effects in libcore again
This commit is contained in:
parent
93e62a260f
commit
bcdd3d7739
3 changed files with 30 additions and 1 deletions
|
@ -219,7 +219,6 @@
|
|||
#![feature(doc_cfg)]
|
||||
#![feature(doc_cfg_hide)]
|
||||
#![feature(doc_notable_trait)]
|
||||
#![feature(effects)]
|
||||
#![feature(exhaustive_patterns)]
|
||||
#![feature(extern_types)]
|
||||
#![feature(fundamental)]
|
||||
|
|
11
tests/ui/consts/effect_param.rs
Normal file
11
tests/ui/consts/effect_param.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
//! 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
|
||||
}
|
||||
|
||||
const FOO: () = {
|
||||
i8::checked_sub::<false>(42, 43);
|
||||
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
|
||||
};
|
19
tests/ui/consts/effect_param.stderr
Normal file
19
tests/ui/consts/effect_param.stderr
Normal file
|
@ -0,0 +1,19 @@
|
|||
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/effect_param.rs:9:9
|
||||
|
|
||||
LL | i8::checked_sub::<false>(42, 43);
|
||||
| ^^^^^^^^^^^--------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
|
||||
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/effect_param.rs:4:9
|
||||
|
|
||||
LL | i8::checked_sub::<true>(42, 43);
|
||||
| ^^^^^^^^^^^-------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0107`.
|
Loading…
Add table
Reference in a new issue