[−][src]Module rustc_typeck::collect
"Collection" is the process of determining the type and other external details of each item in Rust. Collection is specifically concerned with inter-procedural things -- for example, for a function definition, collection will figure out the type and signature of the function, but it will not visit the body of the function in any way, nor examine type annotations on local variables (that's the job of type checking).
Collecting is ultimately defined by a bundle of queries that
inquire after various facts about the items in the crate (e.g.,
type_of, generics_of, predicates_of, etc). See the provide function
for the full set.
At present, however, we do run collection across all items in the crate as a kind of pass. This should eventually be factored away.
Modules
| item_bounds | |
| type_of |
Structs
| AnonConstInParamListDetector | |
| CollectItemTypesVisitor | |
| ItemCtxt | Context specific to some particular item. This is what implements
|
| OnlySelfBounds | |
| PlaceholderHirTyCollector |
Functions
| adt_def | |
| are_suggestable_generic_args | |
| bad_placeholder_type | |
| check_link_name_xor_ordinal | |
| check_link_ordinal | |
| check_target_feature_trait_unsafe | Checks the function annotated with |
| codegen_fn_attrs | |
| collect_mod_item_types | |
| compute_sig_of_foreign_fn_decl | |
| const_evaluatable_predicates_of | |
| convert_enum_variant_types | |
| convert_impl_item | |
| convert_item | |
| convert_trait_item | |
| convert_variant | |
| convert_variant_ctor | |
| early_bound_lifetimes_from_generics | Returns the early-bound lifetimes declared in this generics
listing. For anything other than fns/methods, this is just all
the lifetimes that are declared. For fns or methods, we have to
screen out those that do not appear in any where-clauses etc using
|
| explicit_predicates_of | |
| fn_sig | |
| from_target_feature | |
| gather_explicit_predicates_of | Returns a list of user-specified type predicates for the definition with ID |
| generator_kind | |
| generics_of | |
| get_infer_ret_ty | |
| get_new_lifetime_name | Synthesize a new lifetime name that doesn't clash with any of the lifetimes already present. |
| has_late_bound_regions | |
| impl_polarity | |
| impl_trait_ref | |
| is_foreign_item | |
| is_param | Tests whether this is the AST for a reference to the type
parameter with ID |
| is_suggestable_infer_ty | Whether |
| linkage_by_name | |
| placeholder_type_error | If there are any placeholder types ( |
| predicates_defined_on | Returns a list of type predicates for the definition with ID |
| predicates_from_bound | Converts a specific |
| predicates_of | Returns a list of all type predicates (explicit and implicit) for the definition with
ID |
| projection_ty_from_predicates | |
| provide | |
| reject_placeholder_type_signatures_in_item | |
| should_inherit_track_caller | Checks if the provided DefId is a method in a trait impl for a trait which has track_caller applied to the method prototype. |
| static_mutability | |
| super_predicates_of | Ensures that the super-predicates of the trait with a |
| trait_def | |
| trait_explicit_predicates_and_bounds | |
| type_param_predicates | Returns the predicates defined on |