Add warn(unreachable_pub)
to rustc_transmute
.
This commit is contained in:
parent
2e358e633d
commit
e4b1e28033
@ -204,7 +204,7 @@ fn from(err: &LayoutError<'tcx>) -> Self {
|
||||
}
|
||||
|
||||
impl<'tcx> Tree<Def<'tcx>, Ref<'tcx>> {
|
||||
pub fn from_ty(ty: Ty<'tcx>, cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Result<Self, Err> {
|
||||
pub(crate) fn from_ty(ty: Ty<'tcx>, cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Result<Self, Err> {
|
||||
use rustc_target::abi::HasDataLayout;
|
||||
let layout = layout_of(cx, ty)?;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use super::Tree;
|
||||
|
||||
#[derive(Debug, Hash, Eq, PartialEq, Clone, Copy)]
|
||||
pub enum Def {
|
||||
enum Def {
|
||||
NoSafetyInvariants,
|
||||
HasSafetyInvariants,
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#![allow(unused_variables)]
|
||||
#![feature(alloc_layout_extra)]
|
||||
#![feature(never_type)]
|
||||
#![warn(unreachable_pub)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
pub(crate) use rustc_data_structures::fx::{FxIndexMap as Map, FxIndexSet as Set};
|
||||
|
@ -366,13 +366,13 @@ fn or<R>(lhs: Answer<R>, rhs: Answer<R>) -> Answer<R>
|
||||
}
|
||||
}
|
||||
|
||||
pub enum Quantifier {
|
||||
enum Quantifier {
|
||||
ThereExists,
|
||||
ForAll,
|
||||
}
|
||||
|
||||
impl Quantifier {
|
||||
pub fn apply<R, I>(&self, iter: I) -> Answer<R>
|
||||
fn apply<R, I>(&self, iter: I) -> Answer<R>
|
||||
where
|
||||
R: layout::Ref,
|
||||
I: IntoIterator<Item = Answer<R>>,
|
||||
|
Loading…
Reference in New Issue
Block a user