mirror of https://github.com/rust-lang/rust.git
Add `warn(unreachable_pub)` to `rustc_transmute`.
This commit is contained in:
parent
2e358e633d
commit
e4b1e28033
|
@ -204,7 +204,7 @@ pub(crate) mod rustc {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> Tree<Def<'tcx>, Ref<'tcx>> {
|
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;
|
use rustc_target::abi::HasDataLayout;
|
||||||
let layout = layout_of(cx, ty)?;
|
let layout = layout_of(cx, ty)?;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use super::Tree;
|
use super::Tree;
|
||||||
|
|
||||||
#[derive(Debug, Hash, Eq, PartialEq, Clone, Copy)]
|
#[derive(Debug, Hash, Eq, PartialEq, Clone, Copy)]
|
||||||
pub enum Def {
|
enum Def {
|
||||||
NoSafetyInvariants,
|
NoSafetyInvariants,
|
||||||
HasSafetyInvariants,
|
HasSafetyInvariants,
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#![allow(unused_variables)]
|
#![allow(unused_variables)]
|
||||||
#![feature(alloc_layout_extra)]
|
#![feature(alloc_layout_extra)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
#![warn(unreachable_pub)]
|
||||||
// tidy-alphabetical-end
|
// tidy-alphabetical-end
|
||||||
|
|
||||||
pub(crate) use rustc_data_structures::fx::{FxIndexMap as Map, FxIndexSet as Set};
|
pub(crate) use rustc_data_structures::fx::{FxIndexMap as Map, FxIndexSet as Set};
|
||||||
|
|
|
@ -366,13 +366,13 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum Quantifier {
|
enum Quantifier {
|
||||||
ThereExists,
|
ThereExists,
|
||||||
ForAll,
|
ForAll,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Quantifier {
|
impl Quantifier {
|
||||||
pub fn apply<R, I>(&self, iter: I) -> Answer<R>
|
fn apply<R, I>(&self, iter: I) -> Answer<R>
|
||||||
where
|
where
|
||||||
R: layout::Ref,
|
R: layout::Ref,
|
||||||
I: IntoIterator<Item = Answer<R>>,
|
I: IntoIterator<Item = Answer<R>>,
|
||||||
|
|
Loading…
Reference in New Issue