diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-05-17 19:11:54 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-17 19:11:54 +0530 |
| commit | ff364b0082502dc967f1a08d39e0f338a68fe277 (patch) | |
| tree | 10205fa3dd3a4fd678ffd2f13061eb779f548ded /compiler | |
| parent | 828caa80a942e9e923b75e4806da93c6e85f9752 (diff) | |
| parent | 33ec632381cb0732dd7db3836116e5e273ab908b (diff) | |
| download | rust-ff364b0082502dc967f1a08d39e0f338a68fe277.tar.gz rust-ff364b0082502dc967f1a08d39e0f338a68fe277.zip | |
Rollup merge of #111557 - cjgillot:revert-111020, r=petrochenkov
Revert "Validate resolution for SelfCtor too." This reverts commit 83453408a0ce91b9e3d3ae6e7f117b1fd28b487d. 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`
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/ident.rs | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 6675b8ed59b..59eda9db97f 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -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; } diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs index 755acdd81fe..f065c4ddd2e 100644 --- a/compiler/rustc_resolve/src/ident.rs +++ b/compiler/rustc_resolve/src/ident.rs @@ -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 |
