Skip to content

Commit

Permalink
Unrolled build for rust-lang#116856
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#116856 - oli-obk:no_effects, r=compiler-errors

Disable effects in libcore again

r? `@fee1-dead`

This was accidentally allowed by rust-lang#114776 without feature gates
  • Loading branch information
rust-timer authored Oct 18, 2023
2 parents e8b8c78 + bcdd3d7 commit 309a65e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
1 change: 0 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
11 changes: 11 additions & 0 deletions tests/ui/consts/effect_param.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 19 additions & 0 deletions tests/ui/consts/effect_param.stderr
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit 309a65e

Please sign in to comment.