Rollup merge of #111557 - cjgillot:revert-111020, r=petrochenkov
Revert "Validate resolution for SelfCtor too."
This reverts commit 83453408a0
.
That PR introduced a breaking change.
Fixes https://github.com/rust-lang/rust/issues/111541
Reopens https://github.com/rust-lang/rust/issues/89868
r? `@petrochenkov`
This commit is contained in:
commit
ff364b0082
5 changed files with 17 additions and 55 deletions
|
@ -550,7 +550,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
|
||||
let sm = self.tcx.sess.source_map();
|
||||
let def_id = match outer_res {
|
||||
Res::SelfTyParam { .. } | Res::SelfCtor(_) => {
|
||||
Res::SelfTyParam { .. } => {
|
||||
err.span_label(span, "can't use `Self` here");
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -1174,10 +1174,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
return Res::Err;
|
||||
}
|
||||
}
|
||||
Res::Def(DefKind::TyParam, _)
|
||||
| Res::SelfTyParam { .. }
|
||||
| Res::SelfTyAlias { .. }
|
||||
| Res::SelfCtor(_) => {
|
||||
Res::Def(DefKind::TyParam, _) | Res::SelfTyParam { .. } | Res::SelfTyAlias { .. } => {
|
||||
for rib in ribs {
|
||||
let has_generic_params: HasGenericParams = match rib.kind {
|
||||
RibKind::Normal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue