Skip to content

Commit

Permalink
Add 85031
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannesd3 committed May 8, 2021
1 parent 9189af0 commit da3dd0a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ices/85031-1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

rustc --edition 2018 -C incremental=foo --crate-type lib - <<'EOF'
#![allow(incomplete_features)]
#![feature(const_generics, const_evaluatable_checked)]
pub struct Ref<'a>(&'a i32);
impl<'a> Ref<'a> {
pub fn foo<const A: usize>() -> [(); A - 0] {
Self::foo()
}
}
EOF

25 changes: 25 additions & 0 deletions ices/85031-2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

rustc --edition 2018 -C incremental=foo --crate-type lib - <<'EOF'
#![allow(incomplete_features)]
#![feature(const_generics, const_evaluatable_checked)]
pub struct Ref<'a>(&'a i32);
impl Ref<'_> {
pub fn foo<const A: usize>()
where
([(); A - 0], ()): Sized,
{
Self::bar::<A>()
}
fn bar<const A: usize>()
where
([(); A - 0], ()): Sized,
{
}
}
EOF

0 comments on commit da3dd0a

Please sign in to comment.