From da28b308968cebefe7275a14bc485f9ef62a966e Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Sun, 12 Nov 2023 04:33:19 +0000 Subject: [PATCH] Reenable effects in libcore --- library/core/src/lib.rs | 1 + tests/ui/consts/effect_param.rs | 4 ++++ tests/ui/consts/effect_param.stderr | 20 ++++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 5a6d242a729..5bb7101a403 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -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)] diff --git a/tests/ui/consts/effect_param.rs b/tests/ui/consts/effect_param.rs index f11ec739fce..bfe0a519037 100644 --- a/tests/ui/consts/effect_param.rs +++ b/tests/ui/consts/effect_param.rs @@ -3,9 +3,13 @@ fn main() { i8::checked_sub::(42, 43); //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied + i8::checked_sub::(42, 43); + //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied } const FOO: () = { i8::checked_sub::(42, 43); //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied + i8::checked_sub::(42, 43); + //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied }; diff --git a/tests/ui/consts/effect_param.stderr b/tests/ui/consts/effect_param.stderr index f8c4bfc02e5..dba5d49b792 100644 --- a/tests/ui/consts/effect_param.stderr +++ b/tests/ui/consts/effect_param.stderr @@ -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::(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::(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 | @@ -14,6 +22,14 @@ LL | i8::checked_sub::(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::(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`.