Skip to content

Commit

Permalink
Add error emitting when we can't resolve id expr
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add error emitting
  • Loading branch information
badumbatish authored and CohenArthur committed Mar 4, 2024
1 parent 61b5a05 commit 92874ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gcc/rust/resolve/rust-late-name-resolver-2.0.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ Late::visit (AST::IdentifierExpr &expr)
resolved = label;
else if (value)
resolved = value;
// TODO: else emit error?
else {
rust_error_at(expr.get_locus (), "could not resolve identifier expression: %qs", expr.get_ident ().as_string ().c_str ());
return;
}

ctx.map_usage (expr.get_node_id (), *resolved);

Expand Down

0 comments on commit 92874ed

Please sign in to comment.