Skip to content

Commit

Permalink
add 4 ices
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jul 24, 2022
1 parent e0c44f5 commit 0f8b2f3
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ices/99641.sh
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

5 changes: 5 additions & 0 deletions ices/99642.rs
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() {}
16 changes: 16 additions & 0 deletions ices/99647.sh
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

19 changes: 19 additions & 0 deletions ices/99662.sh
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

0 comments on commit 0f8b2f3

Please sign in to comment.