}
/// Resolution for a lifetime appearing in a type.
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum LifetimeRes {
/// Successfully linked the lifetime to a generic parameter.
Param {
binder: NodeId,
},
/// This variant is used for anonymous lifetimes that we did not resolve during
- /// late resolution. Shifting the work to the HIR lifetime resolver.
- Anonymous {
- /// Id of the introducing place. See `Param`.
- binder: NodeId,
- /// Whether this lifetime was spelled or elided.
- elided: bool,
- },
+ /// late resolution. Those lifetimes will be inferred by typechecking.
+ Infer,
/// Explicit `'static` lifetime.
Static,
/// Resolution failure.