Address PR comments
This commit is contained in:
parent
ca701d7aeb
commit
3a5567bad4
6 changed files with 26 additions and 16 deletions
|
@ -5160,9 +5160,7 @@ impl<'a> Parser<'a> {
|
|||
`pub(in path::to::module)`: visible only on the specified path"##;
|
||||
let path = self.parse_path(PathStyle::Mod)?;
|
||||
let path_span = self.prev_span;
|
||||
let help_msg = format!("to make this visible only to module `{}`, add `in` before \
|
||||
the path:",
|
||||
path);
|
||||
let help_msg = format!("make this visible only to module `{}` with `in`:", path);
|
||||
self.expect(&token::CloseDelim(token::Paren))?; // `)`
|
||||
let mut err = self.span_fatal_help(path_span, &msg, &suggestion);
|
||||
err.span_suggestion(path_span, &help_msg, format!("in {}", path));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue