about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/graph
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-03-11 11:51:07 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-03-11 13:14:21 +1100
commit55505ab1d3da2ad201303674cb6d3ebeb53e395d (patch)
tree2be50d4dca384042dcc183304359dee402d653e1 /compiler/rustc_data_structures/src/graph
parentc9c838795554901fa22ad14c2d34f270567aaa27 (diff)
downloadrust-55505ab1d3da2ad201303674cb6d3ebeb53e395d.tar.gz
rust-55505ab1d3da2ad201303674cb6d3ebeb53e395d.zip
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)]`.
Diffstat (limited to 'compiler/rustc_data_structures/src/graph')
-rw-r--r--compiler/rustc_data_structures/src/graph/tests.rs4
1 files changed, 2 insertions, 2 deletions
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<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,