1
Fork 0

Add warn(unreachable_pub) to rustc_hir_analysis.

This commit is contained in:
Nicholas Nethercote 2024-08-27 13:14:50 +10:00
parent bffa2244ed
commit 5acf4e7b4b
27 changed files with 155 additions and 145 deletions

View file

@ -53,7 +53,10 @@ mod min_specialization;
/// impl<'a> Trait<Foo> for Bar { type X = &'a i32; }
/// // ^ 'a is unused and appears in assoc type, error
/// ```
pub fn check_impl_wf(tcx: TyCtxt<'_>, impl_def_id: LocalDefId) -> Result<(), ErrorGuaranteed> {
pub(crate) fn check_impl_wf(
tcx: TyCtxt<'_>,
impl_def_id: LocalDefId,
) -> Result<(), ErrorGuaranteed> {
let min_specialization = tcx.features().min_specialization;
let mut res = Ok(());
debug_assert_matches!(tcx.def_kind(impl_def_id), DefKind::Impl { .. });