about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/nonstandard_style.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-08-27 15:24:11 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-08-27 15:24:11 +1000
commitf10284162ff1cebaab7b2d7b2d5f952f4e52a5bc (patch)
tree2b13acd0acf22fbcf0933b73ec44e46736397ce0 /compiler/rustc_lint/src/nonstandard_style.rs
parent6c84c55c9f279b9ea1f77c7cac3a63f0c89ab90a (diff)
downloadrust-f10284162ff1cebaab7b2d7b2d5f952f4e52a5bc.tar.gz
rust-f10284162ff1cebaab7b2d7b2d5f952f4e52a5bc.zip
Add `warn(unreachable_pub)` to `rustc_lint`.
Diffstat (limited to 'compiler/rustc_lint/src/nonstandard_style.rs')
-rw-r--r--compiler/rustc_lint/src/nonstandard_style.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/nonstandard_style.rs b/compiler/rustc_lint/src/nonstandard_style.rs
index d7fd41c0ad7..d81052b5e24 100644
--- a/compiler/rustc_lint/src/nonstandard_style.rs
+++ b/compiler/rustc_lint/src/nonstandard_style.rs
@@ -17,13 +17,13 @@ use crate::lints::{
 use crate::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
 
 #[derive(PartialEq)]
-pub enum MethodLateContext {
+pub(crate) enum MethodLateContext {
     TraitAutoImpl,
     TraitImpl,
     PlainImpl,
 }
 
-pub fn method_context(cx: &LateContext<'_>, id: LocalDefId) -> MethodLateContext {
+pub(crate) fn method_context(cx: &LateContext<'_>, id: LocalDefId) -> MethodLateContext {
     let item = cx.tcx.associated_item(id);
     match item.container {
         ty::TraitContainer => MethodLateContext::TraitAutoImpl,