forked from rust-lang/glacier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0c44f5
commit 0f8b2f3
Showing
4 changed files
with
63 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,23 @@ | ||
#!/bin/bash | ||
|
||
rustc -Cdebuginfo=1 - <<'EOF' | ||
#![feature(adt_const_params)] | ||
fn main() { | ||
pub struct Color<const WHITE: (fn(),)>; | ||
impl<const WHITE: (fn(),)> Color<WHITE> { | ||
/// Construct a new color | ||
pub fn new() -> Self { | ||
Color::<WHITE> | ||
} | ||
} | ||
pub const D65: (fn(),) = (|| {},); | ||
Color::<D65>::new(); | ||
} | ||
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,5 @@ | ||
fn test() -> impl Iterator<Item = impl Sized> { | ||
Box::new(0..) as Box<dyn Iterator<Item = _>> | ||
} | ||
|
||
pub 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 | ||
|
||
rustc --edition=2018 -Zcrate-attr="feature(generic_const_exprs)" - <<'EOF' | ||
#[allow(unused)] | ||
async fn foo<'a>() { | ||
let _data = &mut [0u8; { 1 + 4 }]; | ||
bar().await | ||
} | ||
async fn bar() {} | ||
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,19 @@ | ||
#!/bin/bash | ||
|
||
rustc "-Zcrate-attr=feature(with_negative_coherence)" - <<'EOF' | ||
#![feature(negative_impls)] | ||
// FIXME: this should compile | ||
trait MyPredicate<'a> {} | ||
impl<'a, T> !MyPredicate<'a> for &T where T: 'a {} | ||
trait MyTrait<'a> {} | ||
impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {} | ||
impl<'a, T> MyTrait<'a> for &'a T {} | ||
//~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_` | ||
fn main() {} | ||
EOF | ||
|