aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/traits.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-13 19:39:54 +0000
committerGitHub <[email protected]>2021-03-13 19:39:54 +0000
commitd3ca2ab959af672e779757dbcab755b61a4ec091 (patch)
tree6c59a0786f78cc5878ddb74a589f1d221d907137 /crates/hir_ty/src/traits.rs
parent17eeb2a6d2ea81b302b6707c63bf8fba489c2bdd (diff)
parentc82d1823a1624f4990b1ebaba5b6173f15631381 (diff)
Merge #8002
8002: Create TraitEnvironment through a query r=flodiebold a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/traits.rs')
-rw-r--r--crates/hir_ty/src/traits.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/hir_ty/src/traits.rs b/crates/hir_ty/src/traits.rs
index 500d1781c..edfafdff8 100644
--- a/crates/hir_ty/src/traits.rs
+++ b/crates/hir_ty/src/traits.rs
@@ -63,6 +63,15 @@ impl TraitEnvironment {
63 } 63 }
64} 64}
65 65
66impl Default for TraitEnvironment {
67 fn default() -> Self {
68 TraitEnvironment {
69 traits_from_clauses: Vec::new(),
70 env: chalk_ir::Environment::new(&Interner),
71 }
72 }
73}
74
66/// Something (usually a goal), along with an environment. 75/// Something (usually a goal), along with an environment.
67#[derive(Clone, Debug, PartialEq, Eq, Hash)] 76#[derive(Clone, Debug, PartialEq, Eq, Hash)]
68pub struct InEnvironment<T> { 77pub struct InEnvironment<T> {