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

Commit

Permalink
Merge pull request #1332 from matthiaskrgr/3
Browse files Browse the repository at this point in the history
add 3 ices
  • Loading branch information
Alexendoo authored Jul 3, 2022
2 parents 673003b + 7ba2d8b commit 04455c2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ices/98813.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![feature(adt_const_params)]

const ZERO: f64 = 0.0;

pub struct Foo<const X: f64> {}

fn main() {
let _ = Foo::<0.0> {}; // fails
let _ = Foo::<ZERO> {}; // passes
}
16 changes: 16 additions & 0 deletions ices/98821.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

rustc -Zmir-opt-level=3 - <<'EOF'
#![feature(unboxed_closures)]
extern "rust-call" fn foo<T>(_: T) {}
fn main() {
foo(());
foo((1, 2));
}
EOF

9 changes: 9 additions & 0 deletions ices/98842.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

rustc --crate-type lib --edition=2021 - <<'EOF'
struct Foo(<&'static Foo as ::core::ops::Deref>::Target);
const _: *const Foo = 0 as _;
EOF

0 comments on commit 04455c2

Please sign in to comment.