Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

add 4 ices #1355

Merged
merged 1 commit into from
Jul 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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