]> git.lizzy.rs Git - rust.git/blob - tests/ui/lang-items/lang-item-missing-generator.rs
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / ui / lang-items / lang-item-missing-generator.rs
1 // error-pattern: requires `generator` lang_item
2 #![feature(no_core, lang_items, unboxed_closures, tuple_trait)]
3 #![no_core]
4
5 #[lang = "sized"] pub trait Sized { }
6
7 #[lang = "tuple_trait"] pub trait Tuple { }
8
9 #[lang = "fn_once"]
10 #[rustc_paren_sugar]
11 pub trait FnOnce<Args: Tuple> {
12     type Output;
13
14     extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
15 }
16
17 pub fn abc() -> impl FnOnce(f32) {
18     |_| {}
19 }
20
21 fn main() {}