tree fndecl = Backend::function (compiled_fn_type, ir_symbol_name,
"" /* asm_name */, flags, locus);
- setup_fndecl (fndecl, is_main_fn, fntype->has_subsititions_defined (),
+ setup_fndecl (fndecl, is_main_fn, fntype->has_substitutions_defined (),
visibility, qualifiers, outer_attrs);
setup_abi_options (fndecl, qualifiers.get_abi ());
HIR::Item *resolved_item = ctx->get_mappings ()->lookup_defid (id);
if (resolved_item != nullptr)
{
- if (!fntype->has_subsititions_defined ())
+ if (!fntype->has_substitutions_defined ())
return CompileItem::compile (resolved_item, ctx);
return CompileItem::compile (resolved_item, ctx, fntype);
rust_assert (fntype_tyty->get_kind () == TyTy::TypeKind::FNDEF);
TyTy::FnType *fntype = static_cast<TyTy::FnType *> (fntype_tyty);
- if (fntype->has_subsititions_defined ())
+ if (fntype->has_substitutions_defined ())
{
// we cant do anything for this only when it is used and a concrete type
// is given
return;
}
- if (fntype->has_subsititions_defined ())
+ if (fntype->has_substitutions_defined ())
{
// override the Hir Lookups for the substituions in this context
fntype->override_context ();
}
}
- if (fntype->has_subsititions_defined ())
+ if (fntype->has_substitutions_defined ())
{
// override the Hir Lookups for the substituions in this context
fntype->override_context ();
static void
maybe_override_ctx (TyTy::FnType *fntype)
{
- if (fntype->has_subsititions_defined ())
+ if (fntype->has_substitutions_defined ())
fntype->override_context ();
}
rust_assert (fntype_tyty->get_kind () == TyTy::TypeKind::FNDEF);
TyTy::FnType *fntype = static_cast<TyTy::FnType *> (fntype_tyty);
- if (fntype->has_subsititions_defined ())
+ if (fntype->has_substitutions_defined ())
{
// we cant do anything for this only when it is used and a concrete type
// is given
return;
}
- if (fntype->has_subsititions_defined ())
+ if (fntype->has_substitutions_defined ())
{
// override the Hir Lookups for the substituions in this context
fntype->override_context ();
bool is_fn = lookup->get_kind () == TyTy::TypeKind::FNDEF;
if (is_hir_item)
{
- if (!lookup->has_subsititions_defined ())
+ if (!lookup->has_substitutions_defined ())
return CompileItem::compile (resolved_item, ctx, nullptr, true,
expr_locus);
else
}
else if (is_hir_extern_item)
{
- if (!lookup->has_subsititions_defined ())
+ if (!lookup->has_substitutions_defined ())
return CompileExternItem::compile (resolved_extern_item, ctx, nullptr,
true, expr_locus);
else
bool is_impl_item = resolved_item != nullptr;
if (is_impl_item)
{
- if (!lookup->has_subsititions_defined ())
+ if (!lookup->has_substitutions_defined ())
return CompileInherentImplItem::Compile (resolved_item, ctx,
nullptr, true, expr_locus);
else
impl->get_type ()->get_mappings ().get_hirid (), &self);
rust_assert (ok);
- if (!lookup->has_subsititions_defined ())
+ if (!lookup->has_substitutions_defined ())
return CompileInherentImplItem::Compile (impl_item, ctx,
nullptr, true,
expr_locus);
// let _: Option<?T> = Some({ return; });
//
// here, we would coerce from `!` to `?T`.
- if (expected->has_subsititions_defined () && !expected->is_concrete ())
+ if (expected->has_substitutions_defined () && !expected->is_concrete ())
{
location_t locus = mappings->lookup_location (receiver->get_ref ());
TyTy::TyVar implicit_var
// we only need to apply to the bounds manually on types which dont bind
// generics
- if (!infer->has_subsititions_defined ())
+ if (!infer->has_substitutions_defined ())
{
for (auto &bound : infer->get_specified_bounds ())
bound.handle_substitions (*infer_arguments);
// turbo-fish segment path::<ty>
if (item_seg.has_generic_args ())
{
- if (!infered->has_subsititions_defined ())
+ if (!infered->has_substitutions_defined ())
{
rust_error_at (item_seg.get_locus (),
"substitutions not supported for %s",
// turbo-fish segment path::<ty>
if (generic_seg.has_generic_args ())
{
- if (!translated->has_subsititions_defined ())
+ if (!translated->has_substitutions_defined ())
{
rust_error_at (item_seg->get_locus (),
"substitutions not supported for %s",
}
bool
-BaseType::has_subsititions_defined () const
+BaseType::has_substitutions_defined () const
{
const TyTy::BaseType *x = destructure ();
switch (x->get_kind ())
if (number_of_variants () != other2.number_of_variants ())
return false;
- if (has_subsititions_defined () != other2.has_subsititions_defined ())
+ if (has_substitutions_defined () != other2.has_substitutions_defined ())
return false;
- if (has_subsititions_defined ())
+ if (has_substitutions_defined ())
{
if (get_num_substitutions () != other2.get_num_substitutions ())
return false;
}
}
}
- else if (fty->has_subsititions_defined () || !fty->is_concrete ())
+ else if (fty->has_substitutions_defined () || !fty->is_concrete ())
{
BaseType *concrete
= Resolver::SubstMapperInternal::Resolve (fty, subst_mappings);
if (!get_return_type ()->is_equal (*other2.get_return_type ()))
return false;
- if (has_subsititions_defined () != other2.has_subsititions_defined ())
+ if (has_substitutions_defined () != other2.has_substitutions_defined ())
return false;
- if (has_subsititions_defined ())
+ if (has_substitutions_defined ())
{
if (get_num_substitutions () != other2.get_num_substitutions ())
return false;
}
}
}
- else if (fty->has_subsititions_defined () || !fty->is_concrete ())
+ else if (fty->has_substitutions_defined () || !fty->is_concrete ())
{
BaseType *concrete
= Resolver::SubstMapperInternal::Resolve (fty, subst_mappings);
const RustIdent &get_ident () const;
location_t get_locus () const;
- bool has_subsititions_defined () const;
+ bool has_substitutions_defined () const;
bool needs_generic_substitutions () const;
std::string mangle_string () const