diff options
author | Florian Diebold <[email protected]> | 2019-12-13 21:01:06 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-12-13 21:33:38 +0000 |
commit | 6911bc89a784ce72b4dfd8e0ba72bd22ce898395 (patch) | |
tree | 7ca2a4f415d0c9b95e29a05172cb6105aaa5065b /crates/ra_hir_ty/src/traits | |
parent | 259c42f00e2e85594c7373166bc8467ce375a045 (diff) |
Rename N! to name!
Diffstat (limited to 'crates/ra_hir_ty/src/traits')
-rw-r--r-- | crates/ra_hir_ty/src/traits/builtin.rs | 6 |
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 27c475a3c..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`. |
3 | use hir_def::{expr::Expr, lang_item::LangItemTarget, TraitId, TypeAliasId}; | 3 | use hir_def::{expr::Expr, lang_item::LangItemTarget, TraitId, TypeAliasId}; |
4 | use hir_expand::name::N; | 4 | use hir_expand::name::name; |
5 | use ra_db::CrateId; | 5 | use ra_db::CrateId; |
6 | 6 | ||
7 | use super::{AssocTyValue, Impl}; | 7 | use 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(&N![Output])?; | 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(&N![Output]) | 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 { |