Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates.

And fix the new errors in the handful of crates that didn't have a
`#![warn(unreachable_pub)]`.
This commit is contained in:
Nicholas Nethercote
2025-03-11 11:51:07 +11:00
parent c9c8387955
commit 55505ab1d3
9 changed files with 16 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ use std::cmp::max;
use super::*;
use crate::fx::FxHashMap;
pub struct TestGraph {
pub(super) struct TestGraph {
num_nodes: usize,
start_node: usize,
successors: FxHashMap<usize, Vec<usize>>,
@@ -11,7 +11,7 @@ pub struct TestGraph {
}
impl TestGraph {
pub fn new(start_node: usize, edges: &[(usize, usize)]) -> Self {
pub(super) fn new(start_node: usize, edges: &[(usize, usize)]) -> Self {
let mut graph = TestGraph {
num_nodes: start_node + 1,
start_node,