diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-15 16:56:07 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-04-06 10:47:24 +0200 |
commit | 2785d591116a135215f473534b20f5da6075b265 (patch) | |
tree | 2efc2bab8b0f2ac49c354679a19305348249af3d /gcc/rust/parse/rust-cfg-parser.cc | |
parent | fa7675df86ad2f22d0d349708da5cd363ed03f0f (diff) | |
download | gcc-2785d591116a135215f473534b20f5da6075b265.zip gcc-2785d591116a135215f473534b20f5da6075b265.tar.gz gcc-2785d591116a135215f473534b20f5da6075b265.tar.bz2 |
gccrs: diagnostic: Refactor Error class
The class now allows for more variants including a `Hint` one which
then gets emitted by calling `rust_inform`. This allows us to display
hints/tips/notes in backtracking contexts such as the parser.
gcc/rust/ChangeLog:
* rust-diagnostics.h (struct Error): Add new Kind enum and various new
static constructors to allow for hints as well.
* rust-diagnostics.cc (Error::Error): Use new `kind` field properly.
* checks/errors/privacy/rust-visibility-resolver.cc
(VisibilityResolver::resolve_module_path): Use new Error API.
* expand/rust-macro-builtins.cc (MacroBuiltin::include_handler): Likewise.
* expand/rust-macro-expand.cc (parse_many): Likewise.
(transcribe_type): Likewise.
* parse/rust-parse-impl.h (Parser::parse_crate): Likewise.
* rust-session-manager.cc (Session::handle_crate_name): Likewise.
* ast/rust-ast.cc (Module::load_items): Likewise.
Diffstat (limited to 'gcc/rust/parse/rust-cfg-parser.cc')
0 files changed, 0 insertions, 0 deletions