From 9212e31c92aba29fac1c1e05a258abe36dd0afee Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 6 Mar 2025 14:25:44 +1100 Subject: Add `unreachable_pub` to the default lints for `compiler/` crates. And fix the new errors in the handful of crates that didn't have a `#![warn(unreachable_pub)]`. --- compiler/rustc_data_structures/src/graph/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_data_structures/src/graph') diff --git a/compiler/rustc_data_structures/src/graph/tests.rs b/compiler/rustc_data_structures/src/graph/tests.rs index b69b9dbc4a8..e48b9686c26 100644 --- a/compiler/rustc_data_structures/src/graph/tests.rs +++ b/compiler/rustc_data_structures/src/graph/tests.rs @@ -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>, @@ -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, -- cgit 1.4.1-3-g733a5