This repository has been archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add 4 ices rust-lang/rust#98432 rust-lang/rust#98250 rust-lang/rust#98171 rust-lang/rust#98016 * Update ices/98432.rs Co-authored-by: Yuki Okushi <jtitor@2k36.org>
- Loading branch information
1 parent
c048d45
commit 906e616
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
struct Struct<T>(T); | ||
|
||
impl<T> Struct<T> { | ||
const CONST: fn() = || { | ||
struct _Obligation | ||
where | ||
T:; | ||
}; | ||
} | ||
|
||
fn main() {} | ||
|