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 #539 from oliviacrain/ices
Browse files Browse the repository at this point in the history
Add ICEs 78652, 78653, 78671, 78722, 78806
  • Loading branch information
Alexendoo authored Nov 8, 2020
2 parents 538e474 + 2fd6e84 commit dfcf9b0
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ices/78652.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#![unstable(feature = "humans", issue = "none")]
#![feature(staged_api)]
struct Foo;
impl Foo {
#[stable(feature = "rust1", since = "1.0.0")]
const fn gated() -> u32 {
42
}
}

fn main() {}
3 changes: 3 additions & 0 deletions ices/78653.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
yield || for _ in 0 {}
}
9 changes: 9 additions & 0 deletions ices/78671.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
trait CollectionFamily {
type Member<T>;
}

fn floatify() {
Family as CollectionFamily
}

fn main() {}
10 changes: 10 additions & 0 deletions ices/78721.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![feature(impl_trait_in_bindings)]

struct Bug {
V1: [(); {
let f: impl core::future::Future<Output = u8> = async { 1 };
1
}],
}

fn main() {}
16 changes: 16 additions & 0 deletions ices/78722.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#![feature(type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)]

type F = impl core::future::Future<Output = u8>;

struct Bug {
V1: [(); {
fn concrete_use() -> F {
async {}
}
let f: F = async { 1 };
1
}],
}

fn main() {}
18 changes: 18 additions & 0 deletions ices/78806.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

rustc --crate-type=lib -Z mir-opt-level=1 -Z new-llvm-pass-manager=yes -Z unsound-mir-opts=yes -Z verify-llvm-ir=yes -Z validate-mir=yes -Z polonius=yes -Z polymorphize=yes -C debuginfo=2 -C opt-level=1 - << EOF
#![feature(no_core, lang_items)]
#![no_core]
#[lang = "sized"]
trait Sized {}
#[lang = "copy"]
trait Copy {}
#[no_mangle]
fn test() {
&1;
}
EOF

0 comments on commit dfcf9b0

Please sign in to comment.