Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit b237a4f

Browse files
authored
Merge pull request #1066 from matthiaskrgr/dec_27
add 3 ices
2 parents b7192e1 + a81f3a2 commit b237a4f

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

ices/92157.rs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+

ices/92267.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fn i(){println!("🦀%%%";r

ices/92305.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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

0 commit comments

Comments
 (0)