Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
23
tests/ui/const-generics/fn_with_two_const_inputs.rs
Normal file
23
tests/ui/const-generics/fn_with_two_const_inputs.rs
Normal file
|
@ -0,0 +1,23 @@
|
|||
#![feature(generic_const_exprs)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
const fn both(_: usize, b: usize) -> usize {
|
||||
b
|
||||
}
|
||||
|
||||
fn foo<const N: usize, const M: usize>() -> [(); N + 2]
|
||||
where
|
||||
[(); both(N + 1, M + 1)]:,
|
||||
{
|
||||
bar()
|
||||
//~^ ERROR: unconstrained generic constant
|
||||
}
|
||||
|
||||
fn bar<const N: usize>() -> [(); N]
|
||||
where
|
||||
[(); N + 1]:,
|
||||
{
|
||||
[(); N]
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Add table
Add a link
Reference in a new issue