aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/item_tree/lower.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/item_tree/lower.rs')
-rw-r--r--crates/hir_def/src/item_tree/lower.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs
index 39e8403b0..ab7ad8310 100644
--- a/crates/hir_def/src/item_tree/lower.rs
+++ b/crates/hir_def/src/item_tree/lower.rs
@@ -411,24 +411,24 @@ impl Ctx {
411 411
412 let ast_id = self.source_ast_id_map.ast_id(func); 412 let ast_id = self.source_ast_id_map.ast_id(func);
413 413
414 let mut flags = FnFlags::empty(); 414 let mut flags = FnFlags::default();
415 if func.body().is_some() { 415 if func.body().is_some() {
416 flags |= FnFlags::HAS_BODY; 416 flags.bits |= FnFlags::HAS_BODY;
417 } 417 }
418 if has_self_param { 418 if has_self_param {
419 flags |= FnFlags::HAS_SELF_PARAM; 419 flags.bits |= FnFlags::HAS_SELF_PARAM;
420 } 420 }
421 if func.default_token().is_some() { 421 if func.default_token().is_some() {
422 flags |= FnFlags::IS_DEFAULT; 422 flags.bits |= FnFlags::IS_DEFAULT;
423 } 423 }
424 if func.const_token().is_some() { 424 if func.const_token().is_some() {
425 flags |= FnFlags::IS_CONST; 425 flags.bits |= FnFlags::IS_CONST;
426 } 426 }
427 if func.async_token().is_some() { 427 if func.async_token().is_some() {
428 flags |= FnFlags::IS_ASYNC; 428 flags.bits |= FnFlags::IS_ASYNC;
429 } 429 }
430 if func.unsafe_token().is_some() { 430 if func.unsafe_token().is_some() {
431 flags |= FnFlags::IS_UNSAFE; 431 flags.bits |= FnFlags::IS_UNSAFE;
432 } 432 }
433 433
434 let mut res = Function { 434 let mut res = Function {
@@ -653,9 +653,9 @@ impl Ctx {
653 let func_id = self.lower_function(&ast)?; 653 let func_id = self.lower_function(&ast)?;
654 let func = &mut self.data().functions[func_id.index]; 654 let func = &mut self.data().functions[func_id.index];
655 if is_intrinsic_fn_unsafe(&func.name) { 655 if is_intrinsic_fn_unsafe(&func.name) {
656 func.flags |= FnFlags::IS_UNSAFE; 656 func.flags.bits |= FnFlags::IS_UNSAFE;
657 } 657 }
658 func.flags |= FnFlags::IS_IN_EXTERN_BLOCK; 658 func.flags.bits |= FnFlags::IS_IN_EXTERN_BLOCK;
659 func_id.into() 659 func_id.into()
660 } 660 }
661 ast::ExternItem::Static(ast) => { 661 ast::ExternItem::Static(ast) => {