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 #1469 from JohnTitor/add-ices-20221221
- Loading branch information
Showing
15 changed files
with
191 additions
and
5 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 |
---|---|---|
|
@@ -9,4 +9,3 @@ fn main() { | |
} | ||
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 @@ | ||
#![feature(min_specialization, rustc_attrs)] | ||
|
||
#[rustc_specialization_trait] | ||
pub trait Trait {} | ||
|
||
struct Struct | ||
where | ||
Self: Iterator<Item = <Self as Iterator>::Item>, {} | ||
|
||
impl Trait for Struct {} | ||
|
||
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,18 @@ | ||
#!/bin/bash | ||
|
||
rustc "--edition=2018" "-Zdrop-tracking" "--crate-type=lib" - << EOF | ||
pub struct File<B> { | ||
block: B, | ||
} | ||
pub async fn commit<B: Clone>(this: &mut File<B>) { | ||
async {}.await; | ||
async {}.await; | ||
async {}.await; | ||
async {}.await; | ||
let file = async { &this }.await; | ||
*async { &mut this.block }.await = file.block.clone(); | ||
} | ||
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,28 @@ | ||
#!/bin/bash | ||
|
||
rustc "-Zdrop-tracking" "--edition=2018" - << EOF | ||
pub struct File<B> { | ||
block: B, | ||
} | ||
pub async fn commit<B: Clone>(this: &mut File<B>) { | ||
async {}.await; | ||
async {}.await; | ||
async {}.await; | ||
async {}.await; | ||
let file = async { &this }.await; | ||
*async { &mut this.block }.await = file.block.clone(); | ||
} | ||
fn main() { | ||
let mut file = File { | ||
block: String::new(), | ||
}; | ||
let _ = async move { | ||
commit(&mut file).await; | ||
}; | ||
} | ||
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,13 @@ | ||
#![allow(dead_code)] | ||
|
||
const N: usize = { | ||
struct U; | ||
! let y = 42; | ||
3 | ||
}; | ||
|
||
struct S { | ||
x: [(); N] | ||
} | ||
|
||
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 @@ | ||
#[derive(A)] | ||
struct S { | ||
d: [u32; { | ||
#![cfg] { | ||
#![w,) | ||
|
||
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 @@ | ||
struct S { | ||
d: [u32; { | ||
#![cfg_attr(not(X),Y) Z] | ||
} | ||
} | ||
|
||
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,15 @@ | ||
#![feature(extern_types)] | ||
|
||
extern "C" { | ||
pub type ExternType; | ||
} | ||
|
||
extern "C" { | ||
pub static EXTERN: ExternType; | ||
} | ||
|
||
pub static EMPTY: () = unsafe { | ||
&EXTERN; | ||
}; | ||
|
||
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,27 @@ | ||
#!/bin/bash | ||
|
||
rustc -O - << EOF | ||
#![feature(let_chains)] | ||
struct F(Box<()>); | ||
impl F { | ||
fn s(&self) -> Option<&str> { | ||
None | ||
} | ||
} | ||
fn cex() -> Option<F> { | ||
None | ||
} | ||
fn main() { | ||
if false | ||
&& let Some(ce) = cex() | ||
&& let Some(_ce) = ce.s() | ||
{ | ||
} | ||
} | ||
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,21 @@ | ||
#![allow(incomplete_features)] | ||
#![feature(adt_const_params, const_ptr_read, generic_const_exprs)] | ||
#![allow(dead_code)] | ||
|
||
const fn catone<const M: usize>(_a: &[u8; M]) -> [u8; M + 1] | ||
where | ||
[(); M + 1]:, | ||
{ | ||
unimplemented!() | ||
} | ||
|
||
struct Catter<const A: &'static [u8]>; | ||
impl<const A: &'static [u8]> Catter<A> | ||
where | ||
[(); A.len() + 1]:, | ||
{ | ||
const ZEROS: &'static [u8; A.len()] = &[0_u8; A.len()]; | ||
const R: &'static [u8] = &catone(Self::ZEROS); | ||
} | ||
|
||
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,16 @@ | ||
#!/bin/bash | ||
|
||
cat > foo.rs << EOF | ||
#![feature(associated_const_equality)] | ||
pub enum ParseMode { | ||
Raw, | ||
} | ||
pub trait Parse { | ||
const PARSE_MODE: ParseMode; | ||
} | ||
pub trait RenderRaw {} | ||
impl<T: Parse<PARSE_MODE = { ParseMode::Raw }>> RenderRaw for T {} | ||
EOF | ||
|
||
rustdoc foo.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,15 @@ | ||
#!/bin/bash | ||
|
||
cat > foo.rs << EOF | ||
#![feature(associated_const_equality)] | ||
pub enum ParseMode { | ||
Raw, | ||
} | ||
pub trait Parse { | ||
const PARSE_MODE: ParseMode; | ||
} | ||
pub trait RenderRaw: Parse<PARSE_MODE = { ParseMode::Raw }> {} | ||
EOF | ||
|
||
rustdoc foo.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,11 @@ | ||
#![feature(dyn_star)] | ||
#![allow(incomplete_features)] | ||
|
||
use core::fmt::Debug; | ||
|
||
const FOO: () = { | ||
let foo = &3; | ||
let i = foo as dyn* Debug; | ||
}; | ||
|
||
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 |
---|---|---|
|
@@ -37,4 +37,4 @@ pub struct SecondaryResolutionHomomorphism< | |
} | ||
EOF | ||
|
||
rustdoc foo.rs | ||
rustdoc foo.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