Skip to content

Commit

Permalink
Add warn(unreachable_pub) to rustc_traits.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Sep 2, 2024
1 parent 0fb3a50 commit c4f6f52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_traits/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use tracing::debug;
/// obligations *could be* resolved if we wanted to.
///
/// This also expects that `trait_ref` is fully normalized.
pub fn codegen_select_candidate<'tcx>(
pub(crate) fn codegen_select_candidate<'tcx>(
tcx: TyCtxt<'tcx>,
(param_env, trait_ref): (ty::ParamEnv<'tcx>, ty::TraitRef<'tcx>),
) -> Result<&'tcx ImplSource<'tcx, ()>, CodegenObligationError> {
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_traits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

// tidy-alphabetical-start
#![recursion_limit = "256"]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

mod codegen;
Expand Down

0 comments on commit c4f6f52

Please sign in to comment.