rust_assert (lookup->get_kind () == TyTy::TypeKind::FNDEF);
fn = static_cast<TyTy::FnType *> (lookup);
- Location unify_locus = mappings->lookup_location (lhs->get_ref ());
+ location_t unify_locus = mappings->lookup_location (lhs->get_ref ());
unify_site (lhs->get_ref (),
TyTy::TyWithLocation (fn->get_self_type ()),
TyTy::TyWithLocation (adjusted_self), unify_locus);
}
else if (unsafe_error)
{
- // Location lhs = mappings->lookup_location (receiver->get_ref ());
- // Location rhs = mappings->lookup_location (expected->get_ref ());
+ // location_t lhs = mappings->lookup_location (receiver->get_ref ());
+ // location_t rhs = mappings->lookup_location (expected->get_ref ());
// object_unsafe_error (locus, lhs, rhs);
return false;
}
if (!coerceable_mutability (from_mutbl, to_mutbl))
{
- Location lhs = mappings->lookup_location (receiver->get_ref ());
- Location rhs = mappings->lookup_location (expected->get_ref ());
+ location_t lhs = mappings->lookup_location (receiver->get_ref ());
+ location_t rhs = mappings->lookup_location (expected->get_ref ());
mismatched_mutability_error (locus, lhs, rhs);
return TypeCoercionRules::CoercionResult::get_error ();
}
if (!coerceable_mutability (from_mutbl, to_mutbl))
{
- Location lhs = mappings->lookup_location (receiver->get_ref ());
- Location rhs = mappings->lookup_location (expected->get_ref ());
+ location_t lhs = mappings->lookup_location (receiver->get_ref ());
+ location_t rhs = mappings->lookup_location (expected->get_ref ());
mismatched_mutability_error (locus, lhs, rhs);
return TypeCoercionRules::CoercionResult::get_error ();
}
if (!coerceable_mutability (from_mutbl, to_mutbl))
{
unsafe_error = true;
- Location lhs = mappings->lookup_location (source->get_ref ());
- Location rhs = mappings->lookup_location (target->get_ref ());
+ location_t lhs = mappings->lookup_location (source->get_ref ());
+ location_t rhs = mappings->lookup_location (target->get_ref ());
mismatched_mutability_error (locus, lhs, rhs);
return TypeCoercionRules::CoercionResult::get_error ();
}
if (!coerceable_mutability (from_mutbl, to_mutbl))
{
unsafe_error = true;
- Location lhs = mappings->lookup_location (source->get_ref ());
- Location rhs = mappings->lookup_location (target->get_ref ());
+ location_t lhs = mappings->lookup_location (source->get_ref ());
+ location_t rhs = mappings->lookup_location (target->get_ref ());
mismatched_mutability_error (locus, lhs, rhs);
return TypeCoercionRules::CoercionResult::get_error ();
}
}
void
-TypeCoercionRules::mismatched_mutability_error (Location expr_locus,
- Location lhs, Location rhs)
+TypeCoercionRules::mismatched_mutability_error (location_t expr_locus,
+ location_t lhs, location_t rhs)
{
if (!emit_errors)
return;
}
void
-TypeCoercionRules::object_unsafe_error (Location expr_locus, Location lhs,
- Location rhs)
+TypeCoercionRules::object_unsafe_error (location_t expr_locus, location_t lhs,
+ location_t rhs)
{
if (!emit_errors)
return;
static bool coerceable_mutability (Mutability from_mutbl,
Mutability to_mutbl);
- void mismatched_mutability_error (Location expr_locus, Location lhs,
- Location rhs);
- void object_unsafe_error (Location expr_locus, Location lhs, Location rhs);
+ void mismatched_mutability_error (location_t expr_locus, location_t lhs,
+ location_t rhs);
+ void object_unsafe_error (location_t expr_locus, location_t lhs,
+ location_t rhs);
protected:
TypeCoercionRules (TyTy::BaseType *expected, location_t locus,
{
public:
static void Report (std::set<PathProbeCandidate> &candidates,
- const HIR::PathIdentSegment &query, Location query_locus)
+ const HIR::PathIdentSegment &query,
+ location_t query_locus)
{
rich_location r (line_table, query_locus);
for (auto &c : candidates)
return hir_trait_item;
}
-Location
+location_t
TraitItemReference::get_locus () const
{
return locus;
return hir_trait_ref == nullptr;
}
-Location
+location_t
TraitReference::get_locus () const
{
return hir_trait_ref->get_locus ();
auto block_expr_ty = TypeCheckExpr::Resolve (func.get_block_expr ().get ());
- Location fn_return_locus
+ location_t fn_return_locus
= func.get_decl ().has_return_type ()
? func.get_decl ().get_return_type ()->get_locus ()
: func.get_locus ();
return check_result;
std::set<HirId> symbols_to_constrain;
- std::map<HirId, Location> symbol_to_location;
+ std::map<HirId, location_t> symbol_to_location;
for (const auto &p : params_to_constrain)
{
HirId ref = p.get_param_ty ()->get_ref ();
TypeCheckExpr::visit (HIR::ReturnExpr &expr)
{
auto fn_return_tyty = context->peek_return_type ();
- Location expr_locus = expr.has_return_expr () ? expr.get_expr ()->get_locus ()
- : expr.get_locus ();
+ location_t expr_locus = expr.has_return_expr ()
+ ? expr.get_expr ()->get_locus ()
+ : expr.get_locus ();
TyTy::BaseType *expr_ty
= expr.has_return_expr ()
? TypeCheckExpr::Resolve (expr.get_expr ().get ())
parameter_types);
context->insert_implicit_type (closure_args);
- Location result_type_locus = expr.has_return_type ()
- ? expr.get_return_type ()->get_locus ()
- : expr.get_locus ();
+ location_t result_type_locus = expr.has_return_type ()
+ ? expr.get_return_type ()->get_locus ()
+ : expr.get_locus ();
TyTy::TyVar result_type
= expr.has_return_type ()
? TyTy::TyVar (
: TyTy::TyVar::get_implicit_infer_var (expr.get_locus ());
// resolve the block
- Location closure_expr_locus = expr.get_expr ()->get_locus ();
+ location_t closure_expr_locus = expr.get_expr ()->get_locus ();
TyTy::BaseType *closure_expr_ty
= TypeCheckExpr::Resolve (expr.get_expr ().get ());
coercion_site (expr.get_mappings ().get_hirid (),
std::vector<HIR::PathExprSegment> &segments,
size_t offset, TyTy::BaseType *tyseg,
const Analysis::NodeMapping &expr_mappings,
- Location expr_locus);
+ location_t expr_locus);
bool
validate_arithmetic_type (const TyTy::BaseType *tyty,
auto block_expr_ty
= TypeCheckExpr::Resolve (function.get_definition ().get ());
- Location fn_return_locus = function.has_function_return_type ()
- ? function.get_return_type ()->get_locus ()
- : function.get_locus ();
+ location_t fn_return_locus = function.has_function_return_type ()
+ ? function.get_return_type ()->get_locus ()
+ : function.get_locus ();
coercion_site (function.get_definition ()->get_mappings ().get_hirid (),
TyTy::TyWithLocation (expected_ret_tyty, fn_return_locus),
auto block_expr_ty
= TypeCheckExpr::Resolve (function.get_definition ().get ());
- Location fn_return_locus = function.has_function_return_type ()
- ? function.get_return_type ()->get_locus ()
- : function.get_locus ();
+ location_t fn_return_locus = function.has_function_return_type ()
+ ? function.get_return_type ()->get_locus ()
+ : function.get_locus ();
coercion_site (function.get_definition ()->get_mappings ().get_hirid (),
TyTy::TyWithLocation (expected_ret_tyty, fn_return_locus),
TyTy::TyWithLocation (block_expr_ty),
std::vector<HIR::PathExprSegment> &segments,
size_t offset, TyTy::BaseType *tyseg,
const Analysis::NodeMapping &expr_mappings,
- Location expr_locus)
+ location_t expr_locus)
{
NodeId resolved_node_id = root_resolved_node_id;
TyTy::BaseType *prev_segment = tyseg;
}
void
-emit_invalid_field_error (Location loc, Rust::TyTy::VariantDef *variant,
+emit_invalid_field_error (location_t loc, Rust::TyTy::VariantDef *variant,
const std::string &name)
{
rust_error_at (loc, ErrorCode::E0026,
HIR::Pattern &stmt_pattern = *stmt.get_pattern ();
TyTy::BaseType *init_expr_ty = nullptr;
- Location init_expr_locus = UNKNOWN_LOCATION;
+ location_t init_expr_locus = UNKNOWN_LOCATION;
if (stmt.has_init_expr ())
{
init_expr_locus = stmt.get_init_expr ()->get_locus ();
}
TyTy::BaseType *specified_ty = nullptr;
- Location specified_ty_locus;
+ location_t specified_ty_locus;
if (stmt.has_type ())
{
specified_ty = TypeCheckType::Resolve (stmt.get_type ().get ());
}
TyTy::BaseType *value = TypeCheckExpr::Resolve (field.get_value ().get ());
- Location value_locus = field.get_value ()->get_locus ();
+ location_t value_locus = field.get_value ()->get_locus ();
HirId coercion_site_id = field.get_mappings ().get_hirid ();
resolved_field_value_expr
}
TyTy::BaseType *value = TypeCheckExpr::Resolve (field.get_value ().get ());
- Location value_locus = field.get_value ()->get_locus ();
+ location_t value_locus = field.get_value ()->get_locus ();
HirId coercion_site_id = field.get_mappings ().get_hirid ();
resolved_field_value_expr
HIR::PathInExpression expr (mappings_copy2, {seg}, field.get_locus (), false,
{});
TyTy::BaseType *value = TypeCheckExpr::Resolve (&expr);
- Location value_locus = expr.get_locus ();
+ location_t value_locus = expr.get_locus ();
HirId coercion_site_id = field.get_mappings ().get_hirid ();
resolved_field_value_expr
NodeId root_resolved_node_id, HirId expr_id,
std::vector<std::unique_ptr<HIR::TypePathSegment>> &segments, size_t offset,
TyTy::BaseType *tyseg, const Analysis::NodeMapping &expr_mappings,
- Location expr_locus)
+ location_t expr_locus)
{
NodeId resolved_node_id = root_resolved_node_id;
TyTy::BaseType *prev_segment = tyseg;
NodeId root_resolved_node_id, HirId expr_id,
std::vector<std::unique_ptr<HIR::TypePathSegment>> &segments, size_t offset,
TyTy::BaseType *tyseg, const Analysis::NodeMapping &expr_mappings,
- Location expr_locus);
+ location_t expr_locus);
TyTy::BaseType *translated;
};
}
// more?
- Location possible_locus = mappings->lookup_location (reference);
+ location_t possible_locus = mappings->lookup_location (reference);
rust_debug_loc (possible_locus, "query system failed to resolve: [%u]",
reference);
context->query_completed (reference);
bool
types_compatable (TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
- Location unify_locus, bool emit_errors)
+ location_t unify_locus, bool emit_errors)
{
TyTy::BaseType *result
= unify_site_and (UNKNOWN_HIRID, lhs, rhs, unify_locus, emit_errors,
TyTy::BaseType *
unify_site (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
- Location unify_locus)
+ location_t unify_locus)
{
TyTy::BaseType *expected = lhs.get_ty ();
TyTy::BaseType *expr = rhs.get_ty ();
TyTy::BaseType *
unify_site_and (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
- Location unify_locus, bool emit_errors, bool commit_if_ok,
+ location_t unify_locus, bool emit_errors, bool commit_if_ok,
bool implicit_infer_vars, bool cleanup)
{
TypeCheckContext &context = *TypeCheckContext::get ();
TyTy::BaseType *
cast_site (HirId id, TyTy::TyWithLocation from, TyTy::TyWithLocation to,
- Location cast_locus)
+ location_t cast_locus)
{
rust_debug ("cast_site id={%u} from={%s} to={%s}", id,
from.get_ty ()->debug_str ().c_str (),
bool
types_compatable (TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
- Location unify_locus, bool emit_errors);
+ location_t unify_locus, bool emit_errors);
TyTy::BaseType *
unify_site (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
- Location unify_locus);
+ location_t unify_locus);
TyTy::BaseType *
unify_site_and (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
- Location unify_locus, bool emit_errors, bool commit_if_ok,
+ location_t unify_locus, bool emit_errors, bool commit_if_ok,
bool implicit_infer_vars, bool cleanup);
TyTy::BaseType *
coercion_site (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
- Location coercion_locus);
+ location_t coercion_locus);
TyTy::BaseType *
try_coercion (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
- Location coercion_locus);
+ location_t coercion_locus);
TyTy::BaseType *
cast_site (HirId id, TyTy::TyWithLocation from, TyTy::TyWithLocation to,
- Location cast_locus);
+ location_t cast_locus);
AssociatedImplTrait *
lookup_associated_impl_block (const TyTy::TypeBoundPredicate &bound,
Analysis::RustLangItem::ItemType::FN_ONCE_OUTPUT);
std::vector<HIR::GenericArgsBinding> bindings;
- Location output_locus = fn.get_return_type ()->get_locus ();
+ location_t output_locus = fn.get_return_type ()->get_locus ();
HIR::GenericArgsBinding binding (Identifier (
trait_item->trait_identifier ()),
fn.get_return_type ()->clone_type (),
return !get_raw_item ()->is_optional ();
}
-Location
+location_t
TypeBoundPredicateItem::get_locus () const
{
return get_raw_item ()->get_locus ();
namespace TyTy {
void
-emit_unexpected_argument_error (Location loc,
+emit_unexpected_argument_error (location_t loc,
unsigned long unexpected_arg_count,
unsigned long expected_arg_count)
{
{
StructFieldType *field = variant.get_field_at_index (i);
BaseType *field_tyty = field->get_field_type ();
- Location arg_locus = argument->get_locus ();
+ location_t arg_locus = argument->get_locus ();
BaseType *arg = Resolver::TypeCheckExpr::Resolve (argument.get ());
if (arg->get_kind () == TyTy::TypeKind::ERROR)
size_t i = 0;
for (auto &argument : call.get_arguments ())
{
- Location arg_locus = argument->get_locus ();
+ location_t arg_locus = argument->get_locus ();
auto argument_expr_tyty
= Resolver::TypeCheckExpr::Resolve (argument.get ());
if (argument_expr_tyty->get_kind () == TyTy::TypeKind::ERROR)
auto fnparam = type.param_at (i);
HIR::Pattern *fn_param_pattern = fnparam.first;
BaseType *param_ty = fnparam.second;
- Location param_locus
+ location_t param_locus
= fn_param_pattern == nullptr
? mappings->lookup_location (param_ty->get_ref ())
: fn_param_pattern->get_locus ();
size_t i = 0;
for (auto &argument : call.get_arguments ())
{
- Location arg_locus = argument->get_locus ();
+ location_t arg_locus = argument->get_locus ();
BaseType *fnparam = type.param_at (i);
auto argument_expr_tyty
= Resolver::TypeCheckExpr::Resolve (argument.get ());
TypeCheckMethodCallExpr::TypeCheckMethodCallExpr (
Analysis::NodeMapping call_mappings, std::vector<Argument> &args,
- Location call_locus, Location receiver_locus, TyTy::BaseType *adjusted_self,
- Resolver::TypeCheckContext *context)
+ location_t call_locus, location_t receiver_locus,
+ TyTy::BaseType *adjusted_self, Resolver::TypeCheckContext *context)
: call_mappings (call_mappings), arguments (args), call_locus (call_locus),
receiver_locus (receiver_locus), adjusted_self (adjusted_self),
context (context), mappings (Analysis::Mappings::get ())
BaseType *
TypeCheckMethodCallExpr::go (FnType *ref, Analysis::NodeMapping call_mappings,
- std::vector<Argument> &args, Location call_locus,
- Location receiver_locus,
+ std::vector<Argument> &args, location_t call_locus,
+ location_t receiver_locus,
TyTy::BaseType *adjusted_self,
Resolver::TypeCheckContext *context)
{
size_t i = 1;
for (auto &argument : arguments)
{
- Location arg_locus = argument.get_locus ();
+ location_t arg_locus = argument.get_locus ();
auto fnparam = type.param_at (i);
HIR::Pattern *fn_param_pattern = fnparam.first;
BaseType *param_ty = fnparam.second;
- Location param_locus
+ location_t param_locus
= fn_param_pattern == nullptr
? mappings->lookup_location (param_ty->get_ref ())
: fn_param_pattern->get_locus ();
Resolver::TypeCheckContext *context);
static BaseType *go (FnType *ref, Analysis::NodeMapping call_mappings,
- std::vector<Argument> &args, Location call_locus,
- Location receiver_locus, TyTy::BaseType *adjusted_self,
+ std::vector<Argument> &args, location_t call_locus,
+ location_t receiver_locus, TyTy::BaseType *adjusted_self,
Resolver::TypeCheckContext *context);
protected:
BaseType *check (FnType &type);
TypeCheckMethodCallExpr (Analysis::NodeMapping call_mappings,
- std::vector<Argument> &args, Location call_locus,
- Location receiver_locus,
+ std::vector<Argument> &args, location_t call_locus,
+ location_t receiver_locus,
TyTy::BaseType *adjusted_self,
Resolver::TypeCheckContext *context);
Analysis::NodeMapping call_mappings;
std::vector<Argument> &arguments;
- Location call_locus;
- Location receiver_locus;
+ location_t call_locus;
+ location_t receiver_locus;
TyTy::BaseType *adjusted_self;
Resolver::TypeCheckContext *context;
Analysis::Mappings *mappings;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
ok = false;
if (emit_error_flag)
{
- Location ref_locus = mappings->lookup_location (type.get_ref ());
- Location base_locus
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t base_locus
= mappings->lookup_location (get_base ()->get_ref ());
rich_location r (line_table, ref_locus);
r.add_range (base_locus);
return;
}
- Location ref_locus = mappings->lookup_location (type.get_ref ());
+ location_t ref_locus = mappings->lookup_location (type.get_ref ());
ok = base->bounds_compatible (type, ref_locus, false);
}
return !(get_param_ty ()->is_concrete ());
}
-Location
+location_t
SubstitutionParamMapping::get_param_locus () const
{
return generic.get_locus ();
return true;
}
-Location
+location_t
SubstitutionArgumentMappings::get_locus () const
{
return locus;
bool needs_substitution () const;
- Location get_param_locus () const;
+ location_t get_param_locus () const;
bool param_has_default_ty () const;
return ident;
}
-Location
+location_t
BaseType::get_locus () const
{
return ident.locus;
rust_debug ("%s", as_string ().c_str ());
}
-Location
+location_t
StructFieldType::get_locus () const
{
return locus;