diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-15 16:56:07 +0100 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2023-02-17 13:12:46 +0000 |
commit | 5752164328fb2f101a88c6d298dd517436a140ba (patch) | |
tree | c885ecd9ef6e18eb7b114278edc80cd812597950 /gcc/rust/backend/rust-tree.cc | |
parent | e9957814406a224e0ad6efacb09548b724ab13b3 (diff) | |
download | gcc-5752164328fb2f101a88c6d298dd517436a140ba.zip gcc-5752164328fb2f101a88c6d298dd517436a140ba.tar.gz gcc-5752164328fb2f101a88c6d298dd517436a140ba.tar.bz2 |
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/backend/rust-tree.cc')
0 files changed, 0 insertions, 0 deletions