Add warn(unreachable_pub)
to rustc_sanitizers
.
This commit is contained in:
parent
bd53aa3bf7
commit
19843bba64
@ -26,11 +26,11 @@
|
||||
use crate::cfi::typeid::TypeIdOptions;
|
||||
|
||||
/// Options for encode_ty.
|
||||
pub type EncodeTyOptions = TypeIdOptions;
|
||||
pub(crate) type EncodeTyOptions = TypeIdOptions;
|
||||
|
||||
/// Substitution dictionary key.
|
||||
#[derive(Eq, Hash, PartialEq)]
|
||||
pub enum DictKey<'tcx> {
|
||||
pub(crate) enum DictKey<'tcx> {
|
||||
Ty(Ty<'tcx>, TyQ),
|
||||
Region(Region<'tcx>),
|
||||
Const(Const<'tcx>),
|
||||
@ -39,7 +39,7 @@ pub enum DictKey<'tcx> {
|
||||
|
||||
/// Type and extended type qualifiers.
|
||||
#[derive(Eq, Hash, PartialEq)]
|
||||
pub enum TyQ {
|
||||
pub(crate) enum TyQ {
|
||||
None,
|
||||
Const,
|
||||
Mut,
|
||||
|
@ -23,16 +23,16 @@
|
||||
use crate::cfi::typeid::TypeIdOptions;
|
||||
|
||||
/// Options for transform_ty.
|
||||
pub type TransformTyOptions = TypeIdOptions;
|
||||
pub(crate) type TransformTyOptions = TypeIdOptions;
|
||||
|
||||
pub struct TransformTy<'tcx> {
|
||||
pub(crate) struct TransformTy<'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
options: TransformTyOptions,
|
||||
parents: Vec<Ty<'tcx>>,
|
||||
}
|
||||
|
||||
impl<'tcx> TransformTy<'tcx> {
|
||||
pub fn new(tcx: TyCtxt<'tcx>, options: TransformTyOptions) -> Self {
|
||||
pub(crate) fn new(tcx: TyCtxt<'tcx>, options: TransformTyOptions) -> Self {
|
||||
TransformTy { tcx, options, parents: Vec::new() }
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
// tidy-alphabetical-start
|
||||
#![feature(let_chains)]
|
||||
#![warn(unreachable_pub)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
pub mod cfi;
|
||||
|
Loading…
Reference in New Issue
Block a user