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