diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-11-02 16:01:38 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-02 16:01:38 +0000 |
commit | cb04f0c019bdd77406a7feb6ae7f4a17924d0693 (patch) | |
tree | 5bb833b20c4d66a3683ceeb60a922a86284d5ad6 /crates/hir_ty/src | |
parent | 731b38fa3c1694648e6c8e60f61820f9783343eb (diff) | |
parent | f5e7f07838975757703a7e00adb45ee43c2d9a1a (diff) |
Merge #6440
6440: Deny unreachable pub r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r-- | crates/hir_ty/src/infer.rs | 2 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/unify.rs | 2 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk.rs | 2 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk/interner.rs | 30 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk/mapping.rs | 6 |
5 files changed, 21 insertions, 21 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index f4c1fa2f2..a14d67c06 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -94,7 +94,7 @@ enum BindingMode { | |||
94 | } | 94 | } |
95 | 95 | ||
96 | impl BindingMode { | 96 | impl BindingMode { |
97 | pub fn convert(annotation: BindingAnnotation) -> BindingMode { | 97 | fn convert(annotation: BindingAnnotation) -> BindingMode { |
98 | match annotation { | 98 | match annotation { |
99 | BindingAnnotation::Unannotated | BindingAnnotation::Mutable => BindingMode::Move, | 99 | BindingAnnotation::Unannotated | BindingAnnotation::Mutable => BindingMode::Move, |
100 | BindingAnnotation::Ref => BindingMode::Ref(Mutability::Shared), | 100 | BindingAnnotation::Ref => BindingMode::Ref(Mutability::Shared), |
diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs index 2406a7361..76984242e 100644 --- a/crates/hir_ty/src/infer/unify.rs +++ b/crates/hir_ty/src/infer/unify.rs | |||
@@ -35,7 +35,7 @@ where | |||
35 | 35 | ||
36 | #[derive(Debug)] | 36 | #[derive(Debug)] |
37 | pub(super) struct Canonicalized<T> { | 37 | pub(super) struct Canonicalized<T> { |
38 | pub value: Canonical<T>, | 38 | pub(super) value: Canonical<T>, |
39 | free_vars: Vec<InferTy>, | 39 | free_vars: Vec<InferTy>, |
40 | } | 40 | } |
41 | 41 | ||
diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs index a6c247f87..55e2c3a3e 100644 --- a/crates/hir_ty/src/traits/chalk.rs +++ b/crates/hir_ty/src/traits/chalk.rs | |||
@@ -27,7 +27,7 @@ use mapping::{ | |||
27 | TypeAliasAsValue, | 27 | TypeAliasAsValue, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | pub use self::interner::*; | 30 | pub(crate) use self::interner::*; |
31 | 31 | ||
32 | pub(super) mod tls; | 32 | pub(super) mod tls; |
33 | mod interner; | 33 | mod interner; |
diff --git a/crates/hir_ty/src/traits/chalk/interner.rs b/crates/hir_ty/src/traits/chalk/interner.rs index f65873872..39569e690 100644 --- a/crates/hir_ty/src/traits/chalk/interner.rs +++ b/crates/hir_ty/src/traits/chalk/interner.rs | |||
@@ -10,21 +10,21 @@ use std::{fmt, sync::Arc}; | |||
10 | #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] | 10 | #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] |
11 | pub struct Interner; | 11 | pub struct Interner; |
12 | 12 | ||
13 | pub type AssocTypeId = chalk_ir::AssocTypeId<Interner>; | 13 | pub(crate) type AssocTypeId = chalk_ir::AssocTypeId<Interner>; |
14 | pub type AssociatedTyDatum = chalk_solve::rust_ir::AssociatedTyDatum<Interner>; | 14 | pub(crate) type AssociatedTyDatum = chalk_solve::rust_ir::AssociatedTyDatum<Interner>; |
15 | pub type ForeignDefId = chalk_ir::ForeignDefId<Interner>; | 15 | pub(crate) type ForeignDefId = chalk_ir::ForeignDefId<Interner>; |
16 | pub type TraitId = chalk_ir::TraitId<Interner>; | 16 | pub(crate) type TraitId = chalk_ir::TraitId<Interner>; |
17 | pub type TraitDatum = chalk_solve::rust_ir::TraitDatum<Interner>; | 17 | pub(crate) type TraitDatum = chalk_solve::rust_ir::TraitDatum<Interner>; |
18 | pub type AdtId = chalk_ir::AdtId<Interner>; | 18 | pub(crate) type AdtId = chalk_ir::AdtId<Interner>; |
19 | pub type StructDatum = chalk_solve::rust_ir::AdtDatum<Interner>; | 19 | pub(crate) type StructDatum = chalk_solve::rust_ir::AdtDatum<Interner>; |
20 | pub type ImplId = chalk_ir::ImplId<Interner>; | 20 | pub(crate) type ImplId = chalk_ir::ImplId<Interner>; |
21 | pub type ImplDatum = chalk_solve::rust_ir::ImplDatum<Interner>; | 21 | pub(crate) type ImplDatum = chalk_solve::rust_ir::ImplDatum<Interner>; |
22 | pub type AssociatedTyValueId = chalk_solve::rust_ir::AssociatedTyValueId<Interner>; | 22 | pub(crate) type AssociatedTyValueId = chalk_solve::rust_ir::AssociatedTyValueId<Interner>; |
23 | pub type AssociatedTyValue = chalk_solve::rust_ir::AssociatedTyValue<Interner>; | 23 | pub(crate) type AssociatedTyValue = chalk_solve::rust_ir::AssociatedTyValue<Interner>; |
24 | pub type FnDefId = chalk_ir::FnDefId<Interner>; | 24 | pub(crate) type FnDefId = chalk_ir::FnDefId<Interner>; |
25 | pub type FnDefDatum = chalk_solve::rust_ir::FnDefDatum<Interner>; | 25 | pub(crate) type FnDefDatum = chalk_solve::rust_ir::FnDefDatum<Interner>; |
26 | pub type OpaqueTyId = chalk_ir::OpaqueTyId<Interner>; | 26 | pub(crate) type OpaqueTyId = chalk_ir::OpaqueTyId<Interner>; |
27 | pub type OpaqueTyDatum = chalk_solve::rust_ir::OpaqueTyDatum<Interner>; | 27 | pub(crate) type OpaqueTyDatum = chalk_solve::rust_ir::OpaqueTyDatum<Interner>; |
28 | 28 | ||
29 | impl chalk_ir::interner::Interner for Interner { | 29 | impl chalk_ir::interner::Interner for Interner { |
30 | type InternedType = Arc<chalk_ir::TyData<Self>>; | 30 | type InternedType = Arc<chalk_ir::TyData<Self>>; |
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index 58c337b40..86cbc4c7e 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs | |||
@@ -464,7 +464,7 @@ impl ToChalk for CallableDefId { | |||
464 | } | 464 | } |
465 | } | 465 | } |
466 | 466 | ||
467 | pub struct TypeAliasAsAssocType(pub TypeAliasId); | 467 | pub(crate) struct TypeAliasAsAssocType(pub(crate) TypeAliasId); |
468 | 468 | ||
469 | impl ToChalk for TypeAliasAsAssocType { | 469 | impl ToChalk for TypeAliasAsAssocType { |
470 | type Chalk = AssocTypeId; | 470 | type Chalk = AssocTypeId; |
@@ -478,7 +478,7 @@ impl ToChalk for TypeAliasAsAssocType { | |||
478 | } | 478 | } |
479 | } | 479 | } |
480 | 480 | ||
481 | pub struct TypeAliasAsForeignType(pub TypeAliasId); | 481 | pub(crate) struct TypeAliasAsForeignType(pub(crate) TypeAliasId); |
482 | 482 | ||
483 | impl ToChalk for TypeAliasAsForeignType { | 483 | impl ToChalk for TypeAliasAsForeignType { |
484 | type Chalk = ForeignDefId; | 484 | type Chalk = ForeignDefId; |
@@ -492,7 +492,7 @@ impl ToChalk for TypeAliasAsForeignType { | |||
492 | } | 492 | } |
493 | } | 493 | } |
494 | 494 | ||
495 | pub struct TypeAliasAsValue(pub TypeAliasId); | 495 | pub(crate) struct TypeAliasAsValue(pub(crate) TypeAliasId); |
496 | 496 | ||
497 | impl ToChalk for TypeAliasAsValue { | 497 | impl ToChalk for TypeAliasAsValue { |
498 | type Chalk = AssociatedTyValueId; | 498 | type Chalk = AssociatedTyValueId; |