diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-07-18 12:15:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-18 12:15:20 +0000 |
commit | 6920d2294b3c6f106478fd3decaa511faf3cac84 (patch) | |
tree | 9425005eaae1a0d2815c0819e01445ccc0197283 /gcc/rust/resolve/rust-ast-resolve-expr.cc | |
parent | e4cdb24c468b8a848980f7138767fbe093471c5b (diff) | |
parent | 43cd742e348d376ed4e7e0375b23289286525c8a (diff) | |
download | gcc-6920d2294b3c6f106478fd3decaa511faf3cac84.zip gcc-6920d2294b3c6f106478fd3decaa511faf3cac84.tar.gz gcc-6920d2294b3c6f106478fd3decaa511faf3cac84.tar.bz2 |
Merge #1373
1373: Typecheck const generic params r=CohenArthur a=CohenArthur
```rust
struct Foo<const N: usize>;
struct Bar<const N: usize = { 15i32 }>; // { dg-error "expected .usize. got .i32." }
```
This PR allows us to typecheck the type of const generics as well as make sure that the optional default expression fits that type
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-expr.cc')
0 files changed, 0 insertions, 0 deletions