Remove crate
visibility usage in compiler
This commit is contained in:
parent
536020c5f9
commit
49c82f31a8
186 changed files with 865 additions and 800 deletions
|
@ -2705,7 +2705,7 @@ impl SymbolName {
|
|||
}
|
||||
|
||||
impl ClashingExternDeclarations {
|
||||
crate fn new() -> Self {
|
||||
pub(crate) fn new() -> Self {
|
||||
ClashingExternDeclarations { seen_decls: FxHashMap::default() }
|
||||
}
|
||||
/// Insert a new foreign item into the seen set. If a symbol with the same name already exists
|
||||
|
|
|
@ -34,7 +34,7 @@ use tracing::debug;
|
|||
|
||||
/// Extract the `LintStore` from the query context.
|
||||
/// This function exists because we've erased `LintStore` as `dyn Any` in the context.
|
||||
crate fn unerased_lint_store(tcx: TyCtxt<'_>) -> &LintStore {
|
||||
pub(crate) fn unerased_lint_store(tcx: TyCtxt<'_>) -> &LintStore {
|
||||
let store: &dyn Any = &*tcx.lint_store;
|
||||
store.downcast_ref().unwrap()
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#![feature(array_windows)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(control_flow_enum)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(iter_intersperse)]
|
||||
#![feature(iter_order_by)]
|
||||
|
|
|
@ -651,7 +651,7 @@ declare_lint! {
|
|||
declare_lint_pass!(ImproperCTypesDefinitions => [IMPROPER_CTYPES_DEFINITIONS]);
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
crate enum CItemKind {
|
||||
pub(crate) enum CItemKind {
|
||||
Declaration,
|
||||
Definition,
|
||||
}
|
||||
|
@ -667,7 +667,10 @@ enum FfiResult<'tcx> {
|
|||
FfiUnsafe { ty: Ty<'tcx>, reason: String, help: Option<String> },
|
||||
}
|
||||
|
||||
crate fn nonnull_optimization_guaranteed<'tcx>(tcx: TyCtxt<'tcx>, def: ty::AdtDef<'tcx>) -> bool {
|
||||
pub(crate) fn nonnull_optimization_guaranteed<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
def: ty::AdtDef<'tcx>,
|
||||
) -> bool {
|
||||
tcx.has_attr(def.did(), sym::rustc_nonnull_optimization_guaranteed)
|
||||
}
|
||||
|
||||
|
@ -766,7 +769,7 @@ fn get_nullable_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'t
|
|||
/// Currently restricted to function pointers, boxes, references, `core::num::NonZero*`,
|
||||
/// `core::ptr::NonNull`, and `#[repr(transparent)]` newtypes.
|
||||
/// FIXME: This duplicates code in codegen.
|
||||
crate fn repr_nullable_ptr<'tcx>(
|
||||
pub(crate) fn repr_nullable_ptr<'tcx>(
|
||||
cx: &LateContext<'tcx>,
|
||||
ty: Ty<'tcx>,
|
||||
ckind: CItemKind,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue