Skip to content

Commit

Permalink
add 4 ices
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jun 23, 2022
1 parent c048d45 commit db72f99
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ices/98016.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

rustc --edition=2021 -Zmir-opt-level=3 -Zvalidate-mir - <<EOF
#![crate_type = "lib"]
#![feature(portable_simd)]
use std::simd::Simd;
const N: usize = 8;
#[no_mangle]
// CHECK-LABEL: @wider_reduce_into_iter
pub fn wider_reduce_into_iter(x: Simd<u8, N>) -> u16 {
// CHECK: zext <8 x i8>
// CHECK-SAME: to <8 x i16>
// CHECK: call i16 @llvm.vector.reduce.add.v8i16(<8 x i16>
x.to_array().into_iter().map(u16::from).sum()
}
EOF
36 changes: 36 additions & 0 deletions ices/98171.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

cat > out.rs <<'EOF'
// Issue 22443: Reject code using non-regular types that would
// otherwise cause dropck to loop infinitely.
use std::marker::PhantomData;
struct Digit<T> {
elem: T
}
struct Node<T:'static> { m: PhantomData<&'static T> }
enum FingerTree<T:'static> {
Single(T),
// Bug report said Digit after Box would stack overflow (versus
// Digit before Box; see dropck_no_diverge_on_nonregular_2).
Deep(
Box<FingerTree<Node<T>>>,
Digit<T>,
)
}
fn main() {
let ft = //~ ERROR overflow while adding drop-check rules for FingerTree
FingerTree::Single(1);
//~^ ERROR overflow while adding drop-check rules for FingerTree
}
EOF

rustdoc out.rs
27 changes: 27 additions & 0 deletions ices/98250.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

cat > out.rs <<'EOF'
#![feature(type_alias_impl_trait)]
type Foo = impl PartialEq<(Foo, i32)>;
struct Bar;
impl PartialEq<(Foo, i32)> for Bar {
//~^ ERROR cannot implement trait on type alias impl trait
fn eq(&self, _other: &(Foo, i32)) -> bool {
true
}
}
fn foo() -> Foo {
Bar
}
fn main() {}
EOF

rustdoc out.rs
7 changes: 7 additions & 0 deletions ices/98432.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
struct Struct<T>(T);

impl<T> Struct<T> {
const CONST: fn() = || {
struct _Obligation where T:;
};
}

0 comments on commit db72f99

Please sign in to comment.