Rollup merge of #76355 - calebcartwright:reduce-rustfmt-visibility, r=nikomatsakis

remove public visibility previously needed for rustfmt

`submod_path_from_attr` in rustc_expand::module was previously public because it was also consumed by rustfmt. However, we've done a bit of refactoring in rustfmt and no longer need to use this function.

This changes the visibility to the parent mod as was originally going to be done before the rustfmt dependency was realized (c189565edc (diff-cd1b379893bae95f7991d5a3f3c6d337R201))
This commit is contained in:
Dylan DPC 2020-09-09 01:35:11 +02:00 committed by GitHub
commit 4ac88c01c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,8 +219,7 @@ fn error_cannot_declare_mod_here<'a, T>(
/// Derive a submodule path from the first found `#[path = "path_string"]`.
/// The provided `dir_path` is joined with the `path_string`.
// Public for rustfmt usage.
pub fn submod_path_from_attr(
pub(super) fn submod_path_from_attr(
sess: &Session,
attrs: &[Attribute],
dir_path: &Path,