1
Fork 0

min_const_generics diagnostics improvements

2

3
This commit is contained in:
Ethan Brierley 2020-10-11 16:47:45 +01:00
parent 1661f77e7b
commit d7029cbd7e
54 changed files with 182 additions and 189 deletions

View file

@ -8,7 +8,7 @@
#[allow(dead_code)]
struct ArithArrayLen<const N: usize>([u32; 0 + N]);
//[full]~^ ERROR constant expression depends on a generic parameter
//[min]~^^ ERROR generic parameters must not be used inside of non-trivial constant values
//[min]~^^ ERROR generic parameters must not be used inside const evaluations
#[derive(PartialEq, Eq)]
struct Config {
@ -19,7 +19,7 @@ struct B<const CFG: Config> {
//[min]~^ ERROR `Config` is forbidden
arr: [u8; CFG.arr_size],
//[full]~^ ERROR constant expression depends on a generic parameter
//[min]~^^ ERROR generic parameters must not be used inside of non-trivial
//[min]~^^ ERROR generic parameters must not be used inside const evaluations
}
const C: Config = Config { arr_size: 5 };