diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-11-21 18:51:21 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-30 12:36:47 +0100 |
commit | 5959f32d28ff76b3e9c177914f034aae72c9a835 (patch) | |
tree | c6f3c8d87bc2277341d1101a1978d6daca69cbf1 /gcc/c | |
parent | d6a0d96559b30ffac3dba5be675272f0d8e12a1e (diff) | |
download | gcc-5959f32d28ff76b3e9c177914f034aae72c9a835.zip gcc-5959f32d28ff76b3e9c177914f034aae72c9a835.tar.gz gcc-5959f32d28ff76b3e9c177914f034aae72c9a835.tar.bz2 |
gccrs: Emit an error on unsafe modules
An error should be emitted on unsafe modules during the AST validation
pass as the syntax allows those even though they're not alowed later down
the line.
gcc/rust/ChangeLog:
* ast/rust-item.h: Add safety getter to modules.
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Check
a module's safety and emit an error when meeting an unsafe module.
* checks/errors/rust-ast-validation.h: Add function prototype.
* parse/rust-parse-impl.h (Parser::parse_module): Move the module locus
to the first token instead of the mod keyword.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions