diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-27 15:24:11 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-27 15:24:11 +1000 |
| commit | f10284162ff1cebaab7b2d7b2d5f952f4e52a5bc (patch) | |
| tree | 2b13acd0acf22fbcf0933b73ec44e46736397ce0 /compiler/rustc_lint/src/nonstandard_style.rs | |
| parent | 6c84c55c9f279b9ea1f77c7cac3a63f0c89ab90a (diff) | |
| download | rust-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.rs | 4 |
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, |
