aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse-impl.h
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2023-02-15 16:56:07 +0100
committerCohenArthur <arthur.cohen@embecosm.com>2023-02-17 13:12:46 +0000
commit5752164328fb2f101a88c6d298dd517436a140ba (patch)
treec885ecd9ef6e18eb7b114278edc80cd812597950 /gcc/rust/parse/rust-parse-impl.h
parente9957814406a224e0ad6efacb09548b724ab13b3 (diff)
downloadgcc-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/parse/rust-parse-impl.h')
-rw-r--r--gcc/rust/parse/rust-parse-impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index cc5436c..6a98bcc 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -444,7 +444,7 @@ Parser<ManagedTokenSource>::parse_crate ()
// emit all errors
for (const auto &error : error_table)
- error.emit_error ();
+ error.emit ();
return std::unique_ptr<AST::Crate> (
new AST::Crate (std::move (items), std::move (inner_attrs)));