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

Commit 04455c2

Browse files
authored
Merge pull request #1332 from matthiaskrgr/3
add 3 ices
2 parents 673003b + 7ba2d8b commit 04455c2

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

ices/98813.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![feature(adt_const_params)]
2+
3+
const ZERO: f64 = 0.0;
4+
5+
pub struct Foo<const X: f64> {}
6+
7+
fn main() {
8+
let _ = Foo::<0.0> {}; // fails
9+
let _ = Foo::<ZERO> {}; // passes
10+
}

ices/98821.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
rustc -Zmir-opt-level=3 - <<'EOF'
4+
5+
#![feature(unboxed_closures)]
6+
7+
extern "rust-call" fn foo<T>(_: T) {}
8+
9+
fn main() {
10+
foo(());
11+
foo((1, 2));
12+
}
13+
14+
15+
EOF
16+

ices/98842.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
rustc --crate-type lib --edition=2021 - <<'EOF'
4+
5+
struct Foo(<&'static Foo as ::core::ops::Deref>::Target);
6+
const _: *const Foo = 0 as _;
7+
8+
EOF
9+

0 commit comments

Comments
 (0)