Skip to content

Commit dfe9af5

Browse files
oli-obkcuviper
authored andcommitted
Disable effects in libcore again
(cherry picked from commit bcdd3d7)
1 parent d598bb6 commit dfe9af5

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

library/core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@
196196
//
197197
// Language features:
198198
// tidy-alphabetical-start
199-
#![cfg_attr(not(bootstrap), feature(effects))]
200199
#![feature(abi_unadjusted)]
201200
#![feature(adt_const_params)]
202201
#![feature(allow_internal_unsafe)]

tests/ui/consts/effect_param.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//! Ensure we don't allow accessing const effect parameters from stable Rust.
2+
3+
fn main() {
4+
i8::checked_sub::<true>(42, 43);
5+
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
6+
}
7+
8+
const FOO: () = {
9+
i8::checked_sub::<false>(42, 43);
10+
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
11+
};

tests/ui/consts/effect_param.stderr

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
2+
--> $DIR/effect_param.rs:9:9
3+
|
4+
LL | i8::checked_sub::<false>(42, 43);
5+
| ^^^^^^^^^^^--------- help: remove these generics
6+
| |
7+
| expected 0 generic arguments
8+
9+
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
10+
--> $DIR/effect_param.rs:4:9
11+
|
12+
LL | i8::checked_sub::<true>(42, 43);
13+
| ^^^^^^^^^^^-------- help: remove these generics
14+
| |
15+
| expected 0 generic arguments
16+
17+
error: aborting due to 2 previous errors
18+
19+
For more information about this error, try `rustc --explain E0107`.

0 commit comments

Comments
 (0)