aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/traits
diff options
context:
space:
mode:
authorOmer Ben-Amram <[email protected]>2019-12-14 15:29:30 +0000
committerOmer Ben-Amram <[email protected]>2019-12-14 15:29:30 +0000
commit5e4e713fc9c201852fc5fbafd57e5b9243149a78 (patch)
tree996b679a9ae1d07be1edd9eb04e93d433c6524a3 /crates/ra_hir_ty/src/traits
parent083010f6339e558184f06ce76a18e1ad0b0ee936 (diff)
parent77db6177658b32f69ad7ebfdef96c1b3b2893fdd (diff)
Merge branch 'refs/heads/master' into feature/granular-scopes
Diffstat (limited to 'crates/ra_hir_ty/src/traits')
-rw-r--r--crates/ra_hir_ty/src/traits/builtin.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/traits/builtin.rs b/crates/ra_hir_ty/src/traits/builtin.rs
index 598fd81e3..cd587a338 100644
--- a/crates/ra_hir_ty/src/traits/builtin.rs
+++ b/crates/ra_hir_ty/src/traits/builtin.rs
@@ -1,7 +1,7 @@
1//! This module provides the built-in trait implementations, e.g. to make 1//! This module provides the built-in trait implementations, e.g. to make
2//! closures implement `Fn`. 2//! closures implement `Fn`.
3use hir_def::{expr::Expr, lang_item::LangItemTarget, TraitId, TypeAliasId}; 3use hir_def::{expr::Expr, lang_item::LangItemTarget, TraitId, TypeAliasId};
4use hir_expand::name; 4use hir_expand::name::name;
5use ra_db::CrateId; 5use ra_db::CrateId;
6 6
7use super::{AssocTyValue, Impl}; 7use super::{AssocTyValue, Impl};
@@ -79,7 +79,7 @@ fn closure_fn_trait_impl_datum(
79 // and don't want to return a valid value only to find out later that FnOnce 79 // and don't want to return a valid value only to find out later that FnOnce
80 // is broken 80 // is broken
81 let fn_once_trait = get_fn_trait(db, krate, super::FnTrait::FnOnce)?; 81 let fn_once_trait = get_fn_trait(db, krate, super::FnTrait::FnOnce)?;
82 let _output = db.trait_data(fn_once_trait).associated_type_by_name(&name::OUTPUT_TYPE)?; 82 let _output = db.trait_data(fn_once_trait).associated_type_by_name(&name![Output])?;
83 83
84 let num_args: u16 = match &db.body(data.def.into())[data.expr] { 84 let num_args: u16 = match &db.body(data.def.into())[data.expr] {
85 Expr::Lambda { args, .. } => args.len() as u16, 85 Expr::Lambda { args, .. } => args.len() as u16,
@@ -137,7 +137,7 @@ fn closure_fn_trait_output_assoc_ty_value(
137 137
138 let output_ty_id = db 138 let output_ty_id = db
139 .trait_data(fn_once_trait) 139 .trait_data(fn_once_trait)
140 .associated_type_by_name(&name::OUTPUT_TYPE) 140 .associated_type_by_name(&name![Output])
141 .expect("assoc ty value should not exist"); 141 .expect("assoc ty value should not exist");
142 142
143 BuiltinImplAssocTyValueData { 143 BuiltinImplAssocTyValueData {