Commit 09d92fc
gccrs: Fix ICE with non-trailing const defaults
When a const generic with a default value is not trailing, emit an
error.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_generic_params): Emit
an error when const generics with a default value is not
trailing.
gcc/testsuite/ChangeLog:
* rust/compile/const_generics_17.rs: New test.
* rust/compile/generics14.rs: New test.
Signed-off-by: vishruth-thimmaiah <[email protected]>1 parent da052c3 commit 09d92fc
File tree
3 files changed
+35
-3
lines changed- gcc
- rust/parse
- testsuite/rust/compile
3 files changed
+35
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3262 | 3262 | | |
3263 | 3263 | | |
3264 | 3264 | | |
| 3265 | + | |
| 3266 | + | |
3265 | 3267 | | |
3266 | 3268 | | |
| 3269 | + | |
| 3270 | + | |
3267 | 3271 | | |
3268 | 3272 | | |
3269 | 3273 | | |
3270 | 3274 | | |
3271 | 3275 | | |
3272 | 3276 | | |
3273 | 3277 | | |
3274 | | - | |
3275 | 3278 | | |
3276 | | - | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
3277 | 3284 | | |
3278 | 3285 | | |
3279 | | - | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
3280 | 3301 | | |
3281 | 3302 | | |
3282 | 3303 | | |
| |||
3293 | 3314 | | |
3294 | 3315 | | |
3295 | 3316 | | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
3296 | 3324 | | |
3297 | 3325 | | |
3298 | 3326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments