This repository was archived by the owner on May 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ feature( no_core) ]
2
+ #![ feature( lang_items) ]
3
+
4
+ #![ no_core]
5
+ #[ cfg( target_os = "linux" ) ]
6
+ #[ link( name = "c" ) ]
7
+ extern { }
8
+
9
+ #[ lang = "start" ]
10
+ fn start < T > ( _main : fn ( ) -> T , _argc : isize , _argv : * const * const u8 ) -> isize {
11
+ 40 +2
12
+ }
13
+ pub fn main ( ) { }
14
+
15
+ #[ lang = "sized" ]
16
+ pub trait Sized { }
17
+ #[ lang = "copy" ]
18
+ pub trait Copy { }
19
+
20
+ #[ lang = "drop_in_place" ]
21
+ #[ allow( unconditional_recursion) ]
22
+ pub unsafe fn drop_in_place < T : ?Sized > ( to_drop : * mut T ) {
23
+ drop_in_place ( to_drop)
24
+ }
25
+
26
+ #[ lang = "add" ]
27
+ trait Add < RHS > {
28
+ type Output ;
29
+ fn add ( self , other : RHS ) -> Self :: Output ;
30
+ }
31
+
32
+ impl Add < isize > for isize {
33
+ type Output = isize ;
34
+ fn add ( self , other : isize ) -> isize {
35
+ self + other
36
+ }
37
+ }
38
+
Original file line number Diff line number Diff line change
1
+ fn i( ) { println!( "🦀%%%" ; r
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ rustc --edition 2021 - << EOF
4
+
5
+ use std::iter;
6
+
7
+ fn f<T>(data: &[T]) -> impl Iterator<Item = Vec> {
8
+ iter::empty()
9
+ }
10
+
11
+ fn g<T>(data: &[T], target: T) -> impl Iterator<Item = Vec<T>> {
12
+ f(data).filter(|x| x == target)
13
+ }
14
+
15
+ fn main() {}
16
+
17
+ EOF
You can’t perform that action at this time.
0 commit comments