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

Commit b4fbd67

Browse files
authored
Merge pull request #1468 from JohnTitor/add-ices-20221220
2 parents da31d7d + 8914a4d commit b4fbd67

20 files changed

+171
-48
lines changed

fixed/99647.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ async fn bar() {}
1313
fn main() {}
1414
1515
EOF
16-

ices/100612.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ fn main() {
2222
}
2323
2424
EOF
25-

ices/101198.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#![no_std]
2+
#![feature(lang_items, start)]
3+
#![crate_type="lib"]
4+
5+
#[lang = "owned_box"]
6+
struct Box<T>(*mut T);
7+
8+
#[lang = "exchange_malloc"]
9+
unsafe fn alloc() -> *mut u8 {
10+
core::ptr::null_mut()
11+
}
12+
13+
#[lang = "box_free"]
14+
unsafe fn free<T: ?Sized>(ptr: *mut T) { }
15+
16+
impl<T> Box<T> {
17+
pub fn new(val: T) -> Box<T> {
18+
Box::new(val)
19+
}
20+
}
21+
22+
#[start]
23+
fn main(i: isize, args: *const *const u8) -> isize {
24+
let x = Box::new(3);
25+
0
26+
}
27+
28+
#[panic_handler]
29+
fn panic_handler(_: &core::panic::PanicInfo) -> ! {
30+
loop {}
31+
}

ices/101518-1.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22

3-
rustc -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib - <<'EOF'
4-
3+
rustc -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib - <<'EOF'
54
65
#[derive(PartialEq, Eq)]
76
struct Id<'a> {

ices/101518-2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
rustc -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib - <<'EOF'
3+
rustc -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib - <<'EOF'
44
55
#[derive(Eq, PartialEq)]
66
struct Id(&'static str);

ices/101852.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ pub fn ice(
66
Vec::new()
77
}
88

9-
fn main() {
10-
}
9+
fn main() {}

ices/101962.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ pub fn wrapping<T: Copy>(a: T, b: T) {
44
let _z = core::intrinsics::wrapping_mul(a, b);
55
}
66

7-
pub fn main() {
7+
fn main() {
88
wrapping(1,2);
99
}

ices/101964.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
#![crate_type = "lib"]
32
#![feature(lang_items)]
43
#![no_std]

ices/103899.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
trait BaseWithAssoc {
2+
type Assoc;
3+
}
4+
5+
trait WrapperWithAssoc {
6+
type BaseAssoc: BaseWithAssoc;
7+
}
8+
9+
struct Wrapper<B> {
10+
inner: B,
11+
}
12+
13+
struct ProjectToBase<T: BaseWithAssoc> {
14+
data_type_h: T::Assoc,
15+
}
16+
17+
struct DoubleProject<L: WrapperWithAssoc> {
18+
buffer: Wrapper<ProjectToBase<L::BaseAssoc>>,
19+
}
20+
21+
fn trigger<L: WrapperWithAssoc<BaseAssoc = ()>>() -> DoubleProject<L> {
22+
loop {}
23+
}
24+
25+
fn main() {}

ices/104196.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
use core::future::Future;
2+
3+
pub struct Struct<C, Fu, F>
4+
where
5+
F: Fn(&C) -> Fu,
6+
Fu: Future,
7+
{
8+
handler: F,
9+
context: C,
10+
}
11+
12+
impl<C, Fu, R, F> Struct<C, Fu, F>
13+
where
14+
F: Fn(&C) -> Fu,
15+
Fu: Future<Output = R>,
16+
{
17+
pub const fn new(handler: F, context: C) -> Self {
18+
Self { handler, context }
19+
}
20+
}
21+
22+
type TestC = &'static usize;
23+
type TestFu = impl Future;
24+
type TestF = impl Fn(&TestC) -> TestFu;
25+
type TestStruct = Struct<TestC, TestFu, TestF>;
26+
27+
async fn test_handler(context: &TestC) -> () {
28+
()
29+
}
30+
31+
fn get_test_struct() -> &'static TestStruct {
32+
static test_actor: TestStruct = TestStruct::new(test_handler, &0);
33+
&test_actor
34+
}
35+
36+
fn main() {}

ices/104779.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
struct Inv<'a>(&'a mut &'a ());
2+
enum Foo<T> {
3+
Bar,
4+
Var(T),
5+
}
6+
type Subtype = Foo<for<'a, 'b> fn(Inv<'a>, Inv<'b>)>;
7+
type Supertype = Foo<for<'a> fn(Inv<'a>, Inv<'a>)>;
8+
9+
fn foo() -> impl Sized {
10+
loop {
11+
match foo() {
12+
Subtype::Bar => (),
13+
Supertype::Var(x) => {}
14+
}
15+
}
16+
}
17+
18+
fn main() {}

ices/105228.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![feature(cfg_eval)]
2+
#![feature(stmt_expr_attributes)]
3+
4+
#[cfg_eval]
5+
fn main() {
6+
#[cfg_eval]
7+
let _ = #[cfg(FALSE)] 0;
8+
//~^ ERROR removing an expression is not supported in this position
9+
}

ices/105231.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
struct A<T>(B<T>);
2+
struct B<T>(A<A<T>>);
3+
trait Foo {}
4+
impl<T> Foo for T where T: Send {}
5+
impl Foo for B<u8> {}
6+
fn main() {}

ices/105273.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
rustc "-Zunpretty=ast-tree" - <<'EOF'
4+
5+
#![c = ({(while ""))();
6+
7+
EOF

ices/105305.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#![feature(inherent_associated_types)]
2+
#![allow(incomplete_features)]
3+
4+
struct S<T>(T);
5+
6+
impl<T, 'a> S<T> { // Also repros with any other lifetimes such as '_ ,switching order to 'a, T also repros.
7+
type P = T;
8+
}
9+
10+
fn main() {
11+
type A = S<()>::P;
12+
}

ices/105321.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
fn hof<F>(_: F)
2+
where
3+
F: FnMut() -> (),
4+
{
5+
}
6+
7+
fn f() -> _ {
8+
hof(f);
9+
}
10+
11+
fn main() {}

ices/105334.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
cat > out.rs <<'EOF'
4+
5+
impl Vec< br##"*.."## > {}
6+
7+
fn main() {}
8+
9+
EOF
10+
11+
rustdoc out.rs

ices/98171.sh

Lines changed: 0 additions & 36 deletions
This file was deleted.

ices/98250.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ fn foo() -> Foo {
2121
2222
fn main() {}
2323
24-
2524
EOF
2625

27-
rustdoc out.rs
26+
rustdoc out.rs

ices/99363.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ fn main() {
1616
}
1717
1818
EOF
19-

0 commit comments

Comments
 (0)