Error message did not match the test from the previous name resolver when
a given path cannot be resolved.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path):
Change error message to match old resolver and test case.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
{
if (is_root)
{
- rust_error_at (seg.get_locus (),
- "failed to resolve root segment");
+ rust_error_at (expr.get_locus (), ErrorCode::E0425,
+ "cannot find value %qs in this scope",
+ expr.as_simple_path ().as_string ().c_str ());
+
return new TyTy::ErrorType (expr.get_mappings ().get_hirid ());
}
return root_tyty;