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.
Merge pull request #419 from JohnTitor/add-ices
- Loading branch information
Showing
9 changed files
with
54 additions
and
4 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#/bin/bash | ||
#!/bin/bash | ||
|
||
rustc -Z validate-mir - <<EOF | ||
fn main() { | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#/bin/bash | ||
#!/bin/bash | ||
|
||
rustc --emit mir -Z mir-opt-level=2 - <<EOF | ||
// build-pass | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#/bin/bash | ||
#!/bin/bash | ||
|
||
rustc -Z save-analysis - << EOF | ||
#![feature(const_generics)] | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#/bin/bash | ||
#!/bin/bash | ||
|
||
rustc -Zunstable-options --pretty=expanded - << EOF | ||
fn main(/* | ||
|
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,8 @@ | ||
#!/bin/bash | ||
|
||
rustc -Zvalidate-mir - << EOF | ||
fn main() { | ||
for _ in &[0] {} | ||
} | ||
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,10 @@ | ||
struct X<P,Q>(P,Q); | ||
struct L<T:?Sized>(T); | ||
|
||
impl<T:?Sized> L<T>{ | ||
const S: usize=1; | ||
} | ||
|
||
impl<T> X<T,[u8;L::<T>::S]> {} | ||
|
||
fn main() {} |
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,7 @@ | ||
#![crate_type = "lib"] | ||
|
||
pub struct Fixed64(i64); | ||
|
||
pub fn div(f: Fixed64) { | ||
f.0 / 0; | ||
} |
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,11 @@ | ||
trait Trait { | ||
type Associated; | ||
fn into(self) -> Self::Associated; | ||
} | ||
|
||
impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) { | ||
type Associated = (i32, impl Iterator<Item = i32>); | ||
fn into(self) -> Self::Associated { (0_i32, &[0_i32].iter()) } | ||
} | ||
|
||
fn main() {} |
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,14 @@ | ||
use std::convert::{TryFrom, TryInto}; | ||
use std::io; | ||
|
||
pub struct MyStream; | ||
pub struct OtherStream; | ||
|
||
pub async fn connect() -> io::Result<MyStream> { | ||
let stream: MyStream = OtherStream.try_into()?; | ||
Ok(stream) | ||
} | ||
|
||
impl TryFrom<OtherStream> for MyStream {} | ||
|
||
fn main() {} |