Create new error code E0740 for visibility restrictions to ancestor module issues
This commit is contained in:
parent
eb5ef813f0
commit
c8420db21d
2 changed files with 4 additions and 3 deletions
|
|
@ -256,9 +256,9 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
|
|||
if self.r.is_accessible_from(vis, parent_scope.module) {
|
||||
vis
|
||||
} else {
|
||||
let msg =
|
||||
"visibilities can only be restricted to ancestor modules";
|
||||
self.r.session.span_err(path.span, msg);
|
||||
struct_span_err!(self.r.session, path.span, E0741,
|
||||
"visibilities can only be restricted to ancestor modules")
|
||||
.emit();
|
||||
ty::Visibility::Public
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1953,4 +1953,5 @@ struct Foo<X = Box<Self>> {
|
|||
// E0470, removed
|
||||
E0577,
|
||||
E0578,
|
||||
E0740,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue