Module rustc_hir_analysis::collect
source · Expand description
“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
Structs
Functions
resolve_lifetime::early_bound_lifetimes
.ty
is a type with _
placeholders that can be inferred. Used in diagnostics only to
use inference to provide suggestions for the appropriate type if possible._
), emit an error explaining that this is not allowed
and suggest adding type parameters in the appropriate place, taking into consideration any and
all already existing generic type parameters to avoid suggesting a name that is already in use.def_id
, including inferred
lifetime constraints. This includes all predicates returned by explicit_predicates_of
, plus
inferred constraints concerning which regions outlive other regions.