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 ICEs 77696, 77910, 77911, 77919 (#504)
* Add ICE 77696 * Add ICE 77919 * Add ICE 77911 * Add ICE 77910 * Add end of file newline
- Loading branch information
1 parent
64bad42
commit 29ff851
Showing
4 changed files
with
48 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,10 @@ | ||
#![feature(impl_trait_in_bindings)] | ||
|
||
struct S; | ||
trait Trait { | ||
fn demo(&self) {} | ||
} | ||
impl Trait for S {} | ||
fn main() { | ||
let a: &impl Trait = &S; | ||
} |
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,9 @@ | ||
fn foo(s: &i32) -> &i32 { | ||
let xs; | ||
xs | ||
} | ||
|
||
fn main() { | ||
let y; | ||
assert_eq!(foo, y); | ||
} |
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,17 @@ | ||
#!/bin/bash | ||
|
||
rustc -Z mir-opt-level=2 - << EOF | ||
use std::fs::File; | ||
use std::io::{BufRead, BufReader}; | ||
fn file_lines() -> impl Iterator<Item = String> { | ||
BufReader::new(File::open("data.txt").unwrap()) | ||
.lines() | ||
.map(Result::unwrap) | ||
} | ||
fn main() { | ||
for _ in file_lines() {} | ||
} | ||
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,12 @@ | ||
trait TypeVal<T> { | ||
const VAL: T; | ||
} | ||
struct Five; | ||
struct Multiply<N, M> { | ||
_n: PhantomData, | ||
} | ||
impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {} | ||
|
||
fn main() { | ||
[1; <Multiply<Five, Five>>::VAL]; | ||
} |