Skip to content

Commit

Permalink
Auto merge of #117825 - fee1-dead-contrib:corefx, r=petrochenkov
Browse files Browse the repository at this point in the history
Reenable effects in libcore

With #116670, #117531, and #117171, I think we would be comfortable with re-enabling the effects feature for more testing in libcore.

r? `@oli-obk`
cc `@fmease`
cc #110395
  • Loading branch information
bors committed Nov 18, 2023
2 parents 547ace8 + da28b30 commit e6dade9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
#![feature(doc_cfg)]
#![feature(doc_cfg_hide)]
#![feature(doc_notable_trait)]
#![feature(effects)]
#![feature(exhaustive_patterns)]
#![feature(extern_types)]
#![feature(fundamental)]
Expand Down
4 changes: 4 additions & 0 deletions tests/ui/consts/effect_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
fn main() {
i8::checked_sub::<true>(42, 43);
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
i8::checked_sub::<false>(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
i8::checked_sub::<true>(42, 43);
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
};
20 changes: 18 additions & 2 deletions tests/ui/consts/effect_param.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/effect_param.rs:9:9
--> $DIR/effect_param.rs:11: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:13:9
|
LL | i8::checked_sub::<true>(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
|
Expand All @@ -14,6 +22,14 @@ LL | i8::checked_sub::<true>(42, 43);
| |
| expected 0 generic arguments

error: aborting due to 2 previous errors
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/effect_param.rs:6:9
|
LL | i8::checked_sub::<false>(42, 43);
| ^^^^^^^^^^^--------- help: remove these generics
| |
| expected 0 generic arguments

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0107`.

0 comments on commit e6dade9

Please sign in to comment.