aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-tree.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-09-12 16:26:46 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2023-01-31 14:16:51 +0100
commitff9d7741d4b9d5255bc809a7505225216ecc7b86 (patch)
tree717d70350195e764ebd3a6e64b1937253f3a083e /gcc/rust/backend/rust-tree.cc
parent288b6298a6ae9356122362cd604e3582d8decd26 (diff)
downloadgcc-ff9d7741d4b9d5255bc809a7505225216ecc7b86.zip
gcc-ff9d7741d4b9d5255bc809a7505225216ecc7b86.tar.gz
gcc-ff9d7741d4b9d5255bc809a7505225216ecc7b86.tar.bz2
gccrs: const generics: Forbid default values in Functions, Traits and Impls
gcc/rust/ChangeLog: * checks/errors/rust-const-checker.cc (ConstChecker::ctx_to_str): Allow getting an error string from a specific constant context. (ConstChecker::ctx_allows_default): New function, check if a context allows default values for Const generics. (ConstChecker::visit): Call into `ctx_allows_default`. * checks/errors/rust-const-checker.h: Declare `ctx_allows_default`. gcc/testsuite/ChangeLog: * rust/compile/const_generics_8.rs: New test.
Diffstat (limited to 'gcc/rust/backend/rust-tree.cc')
0 files changed, 0 insertions, 0 deletions