change to a struct variant
This commit is contained in:
@@ -1189,7 +1189,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
|
||||
Applicability::HasPlaceholders,
|
||||
);
|
||||
}
|
||||
(Res::SelfTy(..), _) if ns == ValueNS => {
|
||||
(Res::SelfTy { .. }, _) if ns == ValueNS => {
|
||||
err.span_label(span, fallback_label);
|
||||
err.note("can't use `Self` as a constructor, you must use the implemented struct");
|
||||
}
|
||||
|
||||
@@ -2793,7 +2793,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
||||
// Look for `self: &'a Self` - also desugared from `&'a self`,
|
||||
// and if that matches, use it for elision and return early.
|
||||
fn is_self_ty(&self, res: Res) -> bool {
|
||||
if let Res::SelfTy(..) = res {
|
||||
if let Res::SelfTy { .. } = res {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user