Disallow unreachable_pub (#4314)

This commit is contained in:
Jonathan Plasse 2023-05-12 00:00:00 +02:00 committed by GitHub
parent 97802e7466
commit c10a4535b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
444 changed files with 1376 additions and 1106 deletions

View file

@ -64,7 +64,7 @@ pub(super) struct UniqueGroupIdBuilder {
impl UniqueGroupIdBuilder {
/// Creates a new unique group id with the given debug name.
pub fn group_id(&self, debug_name: &'static str) -> GroupId {
pub(crate) fn group_id(&self, debug_name: &'static str) -> GroupId {
let id = self.next_id.fetch_add(1, Ordering::Relaxed);
let id = NonZeroU32::new(id).unwrap_or_else(|| panic!("Group ID counter overflowed"));

View file

@ -31,7 +31,7 @@ pub(super) struct PrintElementArgs {
}
impl PrintElementArgs {
pub fn new(indent: Indention) -> Self {
pub(crate) fn new(indent: Indention) -> Self {
Self {
indent,
..Self::default()
@ -46,27 +46,27 @@ impl PrintElementArgs {
self.indent
}
pub fn increment_indent_level(mut self, indent_style: IndentStyle) -> Self {
pub(crate) fn increment_indent_level(mut self, indent_style: IndentStyle) -> Self {
self.indent = self.indent.increment_level(indent_style);
self
}
pub fn decrement_indent(mut self) -> Self {
pub(crate) fn decrement_indent(mut self) -> Self {
self.indent = self.indent.decrement();
self
}
pub fn reset_indent(mut self) -> Self {
pub(crate) fn reset_indent(mut self) -> Self {
self.indent = Indention::default();
self
}
pub fn set_indent_align(mut self, count: NonZeroU8) -> Self {
pub(crate) fn set_indent_align(mut self, count: NonZeroU8) -> Self {
self.indent = self.indent.set_align(count);
self
}
pub fn with_print_mode(mut self, mode: PrintMode) -> Self {
pub(crate) fn with_print_mode(mut self, mode: PrintMode) -> Self {
self.mode = mode;
self
}