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

add 3 ices #1332

Merged
merged 1 commit into from
Jul 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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