mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Add warn(unreachable_pub)
to rustc_query_system
.
This commit is contained in:
parent
2eea2d2cf1
commit
afc58beebe
@ -617,14 +617,14 @@ impl<D: Deps> EncoderState<D> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct GraphEncoder<D: Deps> {
|
pub(crate) struct GraphEncoder<D: Deps> {
|
||||||
profiler: SelfProfilerRef,
|
profiler: SelfProfilerRef,
|
||||||
status: Lock<Option<EncoderState<D>>>,
|
status: Lock<Option<EncoderState<D>>>,
|
||||||
record_graph: Option<Lock<DepGraphQuery>>,
|
record_graph: Option<Lock<DepGraphQuery>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<D: Deps> GraphEncoder<D> {
|
impl<D: Deps> GraphEncoder<D> {
|
||||||
pub fn new(
|
pub(crate) fn new(
|
||||||
encoder: FileEncoder,
|
encoder: FileEncoder,
|
||||||
prev_node_count: usize,
|
prev_node_count: usize,
|
||||||
record_graph: bool,
|
record_graph: bool,
|
||||||
@ -723,7 +723,7 @@ impl<D: Deps> GraphEncoder<D> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn finish(&self) -> FileEncodeResult {
|
pub(crate) fn finish(&self) -> FileEncodeResult {
|
||||||
let _prof_timer = self.profiler.generic_activity("incr_comp_encode_dep_graph_finish");
|
let _prof_timer = self.profiler.generic_activity("incr_comp_encode_dep_graph_finish");
|
||||||
|
|
||||||
self.status.lock().take().unwrap().finish(&self.profiler)
|
self.status.lock().take().unwrap().finish(&self.profiler)
|
||||||
|
@ -5,7 +5,7 @@ use rustc_span::{Span, Symbol};
|
|||||||
|
|
||||||
#[derive(Subdiagnostic)]
|
#[derive(Subdiagnostic)]
|
||||||
#[note(query_system_cycle_stack_middle)]
|
#[note(query_system_cycle_stack_middle)]
|
||||||
pub struct CycleStack {
|
pub(crate) struct CycleStack {
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub desc: String,
|
pub desc: String,
|
||||||
@ -20,7 +20,7 @@ pub enum HandleCycleError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Subdiagnostic)]
|
#[derive(Subdiagnostic)]
|
||||||
pub enum StackCount {
|
pub(crate) enum StackCount {
|
||||||
#[note(query_system_cycle_stack_single)]
|
#[note(query_system_cycle_stack_single)]
|
||||||
Single,
|
Single,
|
||||||
#[note(query_system_cycle_stack_multiple)]
|
#[note(query_system_cycle_stack_multiple)]
|
||||||
@ -28,7 +28,7 @@ pub enum StackCount {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Subdiagnostic)]
|
#[derive(Subdiagnostic)]
|
||||||
pub enum Alias {
|
pub(crate) enum Alias {
|
||||||
#[note(query_system_cycle_recursive_ty_alias)]
|
#[note(query_system_cycle_recursive_ty_alias)]
|
||||||
#[help(query_system_cycle_recursive_ty_alias_help1)]
|
#[help(query_system_cycle_recursive_ty_alias_help1)]
|
||||||
#[help(query_system_cycle_recursive_ty_alias_help2)]
|
#[help(query_system_cycle_recursive_ty_alias_help2)]
|
||||||
@ -39,7 +39,7 @@ pub enum Alias {
|
|||||||
|
|
||||||
#[derive(Subdiagnostic)]
|
#[derive(Subdiagnostic)]
|
||||||
#[note(query_system_cycle_usage)]
|
#[note(query_system_cycle_usage)]
|
||||||
pub struct CycleUsage {
|
pub(crate) struct CycleUsage {
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub usage: String,
|
pub usage: String,
|
||||||
@ -47,7 +47,7 @@ pub struct CycleUsage {
|
|||||||
|
|
||||||
#[derive(Diagnostic)]
|
#[derive(Diagnostic)]
|
||||||
#[diag(query_system_cycle, code = E0391)]
|
#[diag(query_system_cycle, code = E0391)]
|
||||||
pub struct Cycle {
|
pub(crate) struct Cycle {
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub stack_bottom: String,
|
pub stack_bottom: String,
|
||||||
@ -65,14 +65,14 @@ pub struct Cycle {
|
|||||||
|
|
||||||
#[derive(Diagnostic)]
|
#[derive(Diagnostic)]
|
||||||
#[diag(query_system_reentrant)]
|
#[diag(query_system_reentrant)]
|
||||||
pub struct Reentrant;
|
pub(crate) struct Reentrant;
|
||||||
|
|
||||||
#[derive(Diagnostic)]
|
#[derive(Diagnostic)]
|
||||||
#[diag(query_system_increment_compilation)]
|
#[diag(query_system_increment_compilation)]
|
||||||
#[help]
|
#[help]
|
||||||
#[note(query_system_increment_compilation_note1)]
|
#[note(query_system_increment_compilation_note1)]
|
||||||
#[note(query_system_increment_compilation_note2)]
|
#[note(query_system_increment_compilation_note2)]
|
||||||
pub struct IncrementCompilation {
|
pub(crate) struct IncrementCompilation {
|
||||||
pub run_cmd: String,
|
pub run_cmd: String,
|
||||||
pub dep_node: String,
|
pub dep_node: String,
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#![feature(hash_raw_entry)]
|
#![feature(hash_raw_entry)]
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
|
#![warn(unreachable_pub)]
|
||||||
// tidy-alphabetical-end
|
// tidy-alphabetical-end
|
||||||
|
|
||||||
pub mod cache;
|
pub mod cache;
|
||||||
|
Loading…
Reference in New Issue
Block a user