Validate resolution for SelfCtor too.
This commit is contained in:
parent
89158e210c
commit
83453408a0
4 changed files with 55 additions and 2 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::SelfTyParam { .. } | Res::SelfCtor(_) => {
|
||||
err.span_label(span, "can't use `Self` here");
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue