Add unstable -Zdefault-hidden-visibility cmdline flag for rustc.

The new flag has been described in the Major Change Proposal at
https://github.com/rust-lang/compiler-team/issues/656
This commit is contained in:
Lukasz Anforowicz
2023-12-13 21:14:18 +00:00
parent 56d25ba5ea
commit 981c4e3ce6
10 changed files with 66 additions and 8 deletions

View File

@@ -961,6 +961,14 @@ impl Session {
termize::dimensions().map_or(default_column_width, |(w, _)| w)
}
}
/// Whether the default visibility of symbols should be "hidden" rather than "default".
pub fn default_hidden_visibility(&self) -> bool {
self.opts
.unstable_opts
.default_hidden_visibility
.unwrap_or(self.target.options.default_hidden_visibility)
}
}
// JUSTIFICATION: defn of the suggested wrapper fns