mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
Add warn(unreachable_pub)
to rustc_sanitizers
.
This commit is contained in:
parent
bd53aa3bf7
commit
19843bba64
@ -26,11 +26,11 @@ use crate::cfi::typeid::itanium_cxx_abi::transform::{TransformTy, TransformTyOpt
|
||||
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::itanium_cxx_abi::encode::EncodeTyOptions;
|
||||
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