Remove more unreachable pubs

This commit is contained in:
Aleksey Kladov 2020-11-02 16:31:38 +01:00
parent 731b38fa3c
commit ba8d6d1e4e
39 changed files with 114 additions and 121 deletions

View file

@ -94,7 +94,7 @@ enum BindingMode {
}
impl BindingMode {
pub fn convert(annotation: BindingAnnotation) -> BindingMode {
fn convert(annotation: BindingAnnotation) -> BindingMode {
match annotation {
BindingAnnotation::Unannotated | BindingAnnotation::Mutable => BindingMode::Move,
BindingAnnotation::Ref => BindingMode::Ref(Mutability::Shared),

View file

@ -35,7 +35,7 @@ where
#[derive(Debug)]
pub(super) struct Canonicalized<T> {
pub value: Canonical<T>,
pub(super) value: Canonical<T>,
free_vars: Vec<InferTy>,
}

View file

@ -27,7 +27,7 @@ use mapping::{
TypeAliasAsValue,
};
pub use self::interner::*;
pub(crate) use self::interner::*;
pub(super) mod tls;
mod interner;

View file

@ -10,21 +10,21 @@ use std::{fmt, sync::Arc};
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct Interner;
pub type AssocTypeId = chalk_ir::AssocTypeId<Interner>;
pub type AssociatedTyDatum = chalk_solve::rust_ir::AssociatedTyDatum<Interner>;
pub type ForeignDefId = chalk_ir::ForeignDefId<Interner>;
pub type TraitId = chalk_ir::TraitId<Interner>;
pub type TraitDatum = chalk_solve::rust_ir::TraitDatum<Interner>;
pub type AdtId = chalk_ir::AdtId<Interner>;
pub type StructDatum = chalk_solve::rust_ir::AdtDatum<Interner>;
pub type ImplId = chalk_ir::ImplId<Interner>;
pub type ImplDatum = chalk_solve::rust_ir::ImplDatum<Interner>;
pub type AssociatedTyValueId = chalk_solve::rust_ir::AssociatedTyValueId<Interner>;
pub type AssociatedTyValue = chalk_solve::rust_ir::AssociatedTyValue<Interner>;
pub type FnDefId = chalk_ir::FnDefId<Interner>;
pub type FnDefDatum = chalk_solve::rust_ir::FnDefDatum<Interner>;
pub type OpaqueTyId = chalk_ir::OpaqueTyId<Interner>;
pub type OpaqueTyDatum = chalk_solve::rust_ir::OpaqueTyDatum<Interner>;
pub(crate) type AssocTypeId = chalk_ir::AssocTypeId<Interner>;
pub(crate) type AssociatedTyDatum = chalk_solve::rust_ir::AssociatedTyDatum<Interner>;
pub(crate) type ForeignDefId = chalk_ir::ForeignDefId<Interner>;
pub(crate) type TraitId = chalk_ir::TraitId<Interner>;
pub(crate) type TraitDatum = chalk_solve::rust_ir::TraitDatum<Interner>;
pub(crate) type AdtId = chalk_ir::AdtId<Interner>;
pub(crate) type StructDatum = chalk_solve::rust_ir::AdtDatum<Interner>;
pub(crate) type ImplId = chalk_ir::ImplId<Interner>;
pub(crate) type ImplDatum = chalk_solve::rust_ir::ImplDatum<Interner>;
pub(crate) type AssociatedTyValueId = chalk_solve::rust_ir::AssociatedTyValueId<Interner>;
pub(crate) type AssociatedTyValue = chalk_solve::rust_ir::AssociatedTyValue<Interner>;
pub(crate) type FnDefId = chalk_ir::FnDefId<Interner>;
pub(crate) type FnDefDatum = chalk_solve::rust_ir::FnDefDatum<Interner>;
pub(crate) type OpaqueTyId = chalk_ir::OpaqueTyId<Interner>;
pub(crate) type OpaqueTyDatum = chalk_solve::rust_ir::OpaqueTyDatum<Interner>;
impl chalk_ir::interner::Interner for Interner {
type InternedType = Arc<chalk_ir::TyData<Self>>;

View file

@ -464,7 +464,7 @@ impl ToChalk for CallableDefId {
}
}
pub struct TypeAliasAsAssocType(pub TypeAliasId);
pub(crate) struct TypeAliasAsAssocType(pub(crate) TypeAliasId);
impl ToChalk for TypeAliasAsAssocType {
type Chalk = AssocTypeId;
@ -478,7 +478,7 @@ impl ToChalk for TypeAliasAsAssocType {
}
}
pub struct TypeAliasAsForeignType(pub TypeAliasId);
pub(crate) struct TypeAliasAsForeignType(pub(crate) TypeAliasId);
impl ToChalk for TypeAliasAsForeignType {
type Chalk = ForeignDefId;
@ -492,7 +492,7 @@ impl ToChalk for TypeAliasAsForeignType {
}
}
pub struct TypeAliasAsValue(pub TypeAliasId);
pub(crate) struct TypeAliasAsValue(pub(crate) TypeAliasId);
impl ToChalk for TypeAliasAsValue {
type Chalk = AssociatedTyValueId;