about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-01-31 02:59:36 +0000
committerMichael Goulet <michael@errs.io>2023-01-31 02:59:36 +0000
commit7892cc3c5f6532a18338ce989ea1639af5e417b4 (patch)
treea60c4781482c0b52e86a29e8edf2fbda64abdb50 /tests
parent001a77fac33f6560ff361ff38f661ff5f1c6bf85 (diff)
downloadrust-7892cc3c5f6532a18338ce989ea1639af5e417b4.tar.gz
rust-7892cc3c5f6532a18338ce989ea1639af5e417b4.zip
Do not depend on Generator trait when deducing closure signature
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/lang-items/lang-item-missing-generator.rs21
-rw-r--r--tests/ui/lang-items/lang-item-missing-generator.stderr15
2 files changed, 0 insertions, 36 deletions
diff --git a/tests/ui/lang-items/lang-item-missing-generator.rs b/tests/ui/lang-items/lang-item-missing-generator.rs
deleted file mode 100644
index 9b9aff38e52..00000000000
--- a/tests/ui/lang-items/lang-item-missing-generator.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// error-pattern: requires `generator` lang_item
-#![feature(no_core, lang_items, unboxed_closures, tuple_trait)]
-#![no_core]
-
-#[lang = "sized"] pub trait Sized { }
-
-#[lang = "tuple_trait"] pub trait Tuple { }
-
-#[lang = "fn_once"]
-#[rustc_paren_sugar]
-pub trait FnOnce<Args: Tuple> {
-    type Output;
-
-    extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
-}
-
-pub fn abc() -> impl FnOnce(f32) {
-    |_| {}
-}
-
-fn main() {}
diff --git a/tests/ui/lang-items/lang-item-missing-generator.stderr b/tests/ui/lang-items/lang-item-missing-generator.stderr
deleted file mode 100644
index a24fdb5fb65..00000000000
--- a/tests/ui/lang-items/lang-item-missing-generator.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0635]: unknown feature `tuple_trait`
-  --> $DIR/lang-item-missing-generator.rs:2:51
-   |
-LL | #![feature(no_core, lang_items, unboxed_closures, tuple_trait)]
-   |                                                   ^^^^^^^^^^^
-
-error: requires `generator` lang_item
-  --> $DIR/lang-item-missing-generator.rs:17:17
-   |
-LL | pub fn abc() -> impl FnOnce(f32) {
-   |                 ^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0635`.