aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_assists/src/handlers/add_missing_impl_members.rs12
-rw-r--r--crates/ra_assists/src/handlers/change_return_type_to_result.rs2
-rw-r--r--crates/ra_assists/src/handlers/change_visibility.rs4
-rw-r--r--crates/ra_assists/src/handlers/early_return.rs4
-rw-r--r--crates/ra_assists/src/handlers/generate_function.rs2
-rw-r--r--crates/ra_assists/src/handlers/generate_new.rs2
-rw-r--r--crates/ra_assists/src/handlers/introduce_named_lifetime.rs4
-rw-r--r--crates/ra_assists/src/handlers/move_bounds.rs2
-rw-r--r--crates/ra_assists/src/utils.rs2
-rw-r--r--crates/ra_hir/src/has_source.rs4
-rw-r--r--crates/ra_hir/src/semantics.rs2
-rw-r--r--crates/ra_hir/src/semantics/source_to_def.rs8
-rw-r--r--crates/ra_hir_def/src/body/lower.rs2
-rw-r--r--crates/ra_hir_def/src/item_tree.rs4
-rw-r--r--crates/ra_hir_def/src/item_tree/lower.rs10
-rw-r--r--crates/ra_hir_def/src/item_tree/tests.rs24
-rw-r--r--crates/ra_hir_def/src/keys.rs2
-rw-r--r--crates/ra_hir_ty/src/tests.rs2
-rw-r--r--crates/ra_ide/src/call_hierarchy.rs54
-rw-r--r--crates/ra_ide/src/completion/complete_fn_param.rs10
-rw-r--r--crates/ra_ide/src/completion/complete_keyword.rs2
-rw-r--r--crates/ra_ide/src/completion/complete_trait_impl.rs6
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs4
-rw-r--r--crates/ra_ide/src/completion/patterns.rs2
-rw-r--r--crates/ra_ide/src/display.rs2
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs4
-rw-r--r--crates/ra_ide/src/display/short_label.rs2
-rw-r--r--crates/ra_ide/src/file_structure.rs12
-rw-r--r--crates/ra_ide/src/hover.rs2
-rw-r--r--crates/ra_ide/src/references.rs10
-rw-r--r--crates/ra_ide/src/references/rename.rs4
-rw-r--r--crates/ra_ide/src/runnables.rs40
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs4
-rw-r--r--crates/ra_ide/src/syntax_tree.rs14
-rw-r--r--crates/ra_ide_db/src/defs.rs2
-rw-r--r--crates/ra_ide_db/src/symbol_index.rs2
-rw-r--r--crates/ra_mbe/src/tests.rs2
-rw-r--r--crates/ra_parser/src/grammar/items.rs2
-rw-r--r--crates/ra_parser/src/syntax_kind/generated.rs2
-rw-r--r--crates/ra_syntax/src/ast/edit.rs4
-rw-r--r--crates/ra_syntax/src/ast/expr_ext.rs2
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs415
-rw-r--r--crates/ra_syntax/src/ast/make.rs2
-rw-r--r--crates/ra_syntax/src/ast/node_ext.rs2
-rw-r--r--crates/ra_syntax/src/lib.rs6
-rw-r--r--crates/ra_syntax/src/parsing/text_tree_sink.rs2
-rw-r--r--crates/ra_syntax/src/validation.rs4
-rw-r--r--crates/ra_syntax/src/validation/block.rs2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0019_let_recover.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0025_nope.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0029_field_completion.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0035_use_recover.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast10
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0012_visibility.rast10
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0029_range_forms.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0030_traits.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0031_extern.rast24
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0032_where_for.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0033_label_break.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast38
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0049_async_block.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast26
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0052_for_range_block.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0056_neq_in_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0057_loop_in_call.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0058_unary_expr_precedence.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0060_as_range.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0061_match_full_range.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast10
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast8
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0065_comment_newline.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast12
-rw-r--r--crates/rust-analyzer/src/handlers.rs2
-rw-r--r--crates/rust-analyzer/src/to_proto.rs2
240 files changed, 650 insertions, 647 deletions
diff --git a/crates/ra_assists/src/handlers/add_missing_impl_members.rs b/crates/ra_assists/src/handlers/add_missing_impl_members.rs
index a2d9006e4..4f377e37f 100644
--- a/crates/ra_assists/src/handlers/add_missing_impl_members.rs
+++ b/crates/ra_assists/src/handlers/add_missing_impl_members.rs
@@ -118,7 +118,7 @@ fn add_missing_impl_members_inner(
118 118
119 let def_name = |item: &ast::AssocItem| -> Option<SmolStr> { 119 let def_name = |item: &ast::AssocItem| -> Option<SmolStr> {
120 match item { 120 match item {
121 ast::AssocItem::FnDef(def) => def.name(), 121 ast::AssocItem::Fn(def) => def.name(),
122 ast::AssocItem::TypeAliasDef(def) => def.name(), 122 ast::AssocItem::TypeAliasDef(def) => def.name(),
123 ast::AssocItem::ConstDef(def) => def.name(), 123 ast::AssocItem::ConstDef(def) => def.name(),
124 ast::AssocItem::MacroCall(_) => None, 124 ast::AssocItem::MacroCall(_) => None,
@@ -129,13 +129,13 @@ fn add_missing_impl_members_inner(
129 let missing_items = get_missing_assoc_items(&ctx.sema, &impl_def) 129 let missing_items = get_missing_assoc_items(&ctx.sema, &impl_def)
130 .iter() 130 .iter()
131 .map(|i| match i { 131 .map(|i| match i {
132 hir::AssocItem::Function(i) => ast::AssocItem::FnDef(i.source(ctx.db()).value), 132 hir::AssocItem::Function(i) => ast::AssocItem::Fn(i.source(ctx.db()).value),
133 hir::AssocItem::TypeAlias(i) => ast::AssocItem::TypeAliasDef(i.source(ctx.db()).value), 133 hir::AssocItem::TypeAlias(i) => ast::AssocItem::TypeAliasDef(i.source(ctx.db()).value),
134 hir::AssocItem::Const(i) => ast::AssocItem::ConstDef(i.source(ctx.db()).value), 134 hir::AssocItem::Const(i) => ast::AssocItem::ConstDef(i.source(ctx.db()).value),
135 }) 135 })
136 .filter(|t| def_name(&t).is_some()) 136 .filter(|t| def_name(&t).is_some())
137 .filter(|t| match t { 137 .filter(|t| match t {
138 ast::AssocItem::FnDef(def) => match mode { 138 ast::AssocItem::Fn(def) => match mode {
139 AddMissingImplMembersMode::DefaultMethodsOnly => def.body().is_some(), 139 AddMissingImplMembersMode::DefaultMethodsOnly => def.body().is_some(),
140 AddMissingImplMembersMode::NoDefaultMethods => def.body().is_none(), 140 AddMissingImplMembersMode::NoDefaultMethods => def.body().is_none(),
141 }, 141 },
@@ -158,7 +158,7 @@ fn add_missing_impl_members_inner(
158 .into_iter() 158 .into_iter()
159 .map(|it| ast_transform::apply(&*ast_transform, it)) 159 .map(|it| ast_transform::apply(&*ast_transform, it))
160 .map(|it| match it { 160 .map(|it| match it {
161 ast::AssocItem::FnDef(def) => ast::AssocItem::FnDef(add_body(def)), 161 ast::AssocItem::Fn(def) => ast::AssocItem::Fn(add_body(def)),
162 ast::AssocItem::TypeAliasDef(def) => { 162 ast::AssocItem::TypeAliasDef(def) => {
163 ast::AssocItem::TypeAliasDef(def.remove_bounds()) 163 ast::AssocItem::TypeAliasDef(def.remove_bounds())
164 } 164 }
@@ -174,7 +174,7 @@ fn add_missing_impl_members_inner(
174 Some(cap) => { 174 Some(cap) => {
175 let mut cursor = Cursor::Before(first_new_item.syntax()); 175 let mut cursor = Cursor::Before(first_new_item.syntax());
176 let placeholder; 176 let placeholder;
177 if let ast::AssocItem::FnDef(func) = &first_new_item { 177 if let ast::AssocItem::Fn(func) = &first_new_item {
178 if let Some(m) = func.syntax().descendants().find_map(ast::MacroCall::cast) { 178 if let Some(m) = func.syntax().descendants().find_map(ast::MacroCall::cast) {
179 if m.syntax().text() == "todo!()" { 179 if m.syntax().text() == "todo!()" {
180 placeholder = m; 180 placeholder = m;
@@ -192,7 +192,7 @@ fn add_missing_impl_members_inner(
192 }) 192 })
193} 193}
194 194
195fn add_body(fn_def: ast::FnDef) -> ast::FnDef { 195fn add_body(fn_def: ast::Fn) -> ast::Fn {
196 if fn_def.body().is_some() { 196 if fn_def.body().is_some() {
197 return fn_def; 197 return fn_def;
198 } 198 }
diff --git a/crates/ra_assists/src/handlers/change_return_type_to_result.rs b/crates/ra_assists/src/handlers/change_return_type_to_result.rs
index def00f7d8..52e24af6c 100644
--- a/crates/ra_assists/src/handlers/change_return_type_to_result.rs
+++ b/crates/ra_assists/src/handlers/change_return_type_to_result.rs
@@ -20,7 +20,7 @@ use test_utils::mark;
20pub(crate) fn change_return_type_to_result(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { 20pub(crate) fn change_return_type_to_result(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
21 let ret_type = ctx.find_node_at_offset::<ast::RetType>()?; 21 let ret_type = ctx.find_node_at_offset::<ast::RetType>()?;
22 // FIXME: extend to lambdas as well 22 // FIXME: extend to lambdas as well
23 let fn_def = ret_type.syntax().parent().and_then(ast::FnDef::cast)?; 23 let fn_def = ret_type.syntax().parent().and_then(ast::Fn::cast)?;
24 24
25 let type_ref = &ret_type.type_ref()?; 25 let type_ref = &ret_type.type_ref()?;
26 let ret_type_str = type_ref.syntax().text().to_string(); 26 let ret_type_str = type_ref.syntax().text().to_string();
diff --git a/crates/ra_assists/src/handlers/change_visibility.rs b/crates/ra_assists/src/handlers/change_visibility.rs
index 4343b423c..67b46376e 100644
--- a/crates/ra_assists/src/handlers/change_visibility.rs
+++ b/crates/ra_assists/src/handlers/change_visibility.rs
@@ -2,7 +2,7 @@ use ra_syntax::{
2 ast::{self, NameOwner, VisibilityOwner}, 2 ast::{self, NameOwner, VisibilityOwner},
3 AstNode, 3 AstNode,
4 SyntaxKind::{ 4 SyntaxKind::{
5 CONST_DEF, ENUM_DEF, FN_DEF, MODULE, STATIC_DEF, STRUCT_DEF, TRAIT_DEF, VISIBILITY, 5 CONST_DEF, ENUM_DEF, FN, MODULE, STATIC_DEF, STRUCT_DEF, TRAIT_DEF, VISIBILITY,
6 }, 6 },
7 T, 7 T,
8}; 8};
@@ -38,7 +38,7 @@ fn add_vis(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
38 38
39 let (offset, target) = if let Some(keyword) = item_keyword { 39 let (offset, target) = if let Some(keyword) = item_keyword {
40 let parent = keyword.parent(); 40 let parent = keyword.parent();
41 let def_kws = vec![CONST_DEF, STATIC_DEF, FN_DEF, MODULE, STRUCT_DEF, ENUM_DEF, TRAIT_DEF]; 41 let def_kws = vec![CONST_DEF, STATIC_DEF, FN, MODULE, STRUCT_DEF, ENUM_DEF, TRAIT_DEF];
42 // Parent is not a definition, can't add visibility 42 // Parent is not a definition, can't add visibility
43 if !def_kws.iter().any(|&def_kw| def_kw == parent.kind()) { 43 if !def_kws.iter().any(|&def_kw| def_kw == parent.kind()) {
44 return None; 44 return None;
diff --git a/crates/ra_assists/src/handlers/early_return.rs b/crates/ra_assists/src/handlers/early_return.rs
index 330459f3c..3650289fd 100644
--- a/crates/ra_assists/src/handlers/early_return.rs
+++ b/crates/ra_assists/src/handlers/early_return.rs
@@ -8,7 +8,7 @@ use ra_syntax::{
8 make, 8 make,
9 }, 9 },
10 AstNode, 10 AstNode,
11 SyntaxKind::{FN_DEF, LOOP_EXPR, L_CURLY, R_CURLY, WHILE_EXPR, WHITESPACE}, 11 SyntaxKind::{FN, LOOP_EXPR, L_CURLY, R_CURLY, WHILE_EXPR, WHITESPACE},
12 SyntaxNode, 12 SyntaxNode,
13}; 13};
14 14
@@ -88,7 +88,7 @@ pub(crate) fn convert_to_guarded_return(acc: &mut Assists, ctx: &AssistContext)
88 88
89 let early_expression: ast::Expr = match parent_container.kind() { 89 let early_expression: ast::Expr = match parent_container.kind() {
90 WHILE_EXPR | LOOP_EXPR => make::expr_continue(), 90 WHILE_EXPR | LOOP_EXPR => make::expr_continue(),
91 FN_DEF => make::expr_return(), 91 FN => make::expr_return(),
92 _ => return None, 92 _ => return None,
93 }; 93 };
94 94
diff --git a/crates/ra_assists/src/handlers/generate_function.rs b/crates/ra_assists/src/handlers/generate_function.rs
index b721b96bb..006d0ffb2 100644
--- a/crates/ra_assists/src/handlers/generate_function.rs
+++ b/crates/ra_assists/src/handlers/generate_function.rs
@@ -82,7 +82,7 @@ struct FunctionTemplate {
82 insert_offset: TextSize, 82 insert_offset: TextSize,
83 placeholder_expr: ast::MacroCall, 83 placeholder_expr: ast::MacroCall,
84 leading_ws: String, 84 leading_ws: String,
85 fn_def: ast::FnDef, 85 fn_def: ast::Fn,
86 trailing_ws: String, 86 trailing_ws: String,
87 file: FileId, 87 file: FileId,
88} 88}
diff --git a/crates/ra_assists/src/handlers/generate_new.rs b/crates/ra_assists/src/handlers/generate_new.rs
index 25bc171bf..4dff0ae4d 100644
--- a/crates/ra_assists/src/handlers/generate_new.rs
+++ b/crates/ra_assists/src/handlers/generate_new.rs
@@ -160,7 +160,7 @@ fn find_struct_impl(ctx: &AssistContext, strukt: &ast::StructDef) -> Option<Opti
160fn has_new_fn(imp: &ast::ImplDef) -> bool { 160fn has_new_fn(imp: &ast::ImplDef) -> bool {
161 if let Some(il) = imp.assoc_item_list() { 161 if let Some(il) = imp.assoc_item_list() {
162 for item in il.assoc_items() { 162 for item in il.assoc_items() {
163 if let ast::AssocItem::FnDef(f) = item { 163 if let ast::AssocItem::Fn(f) = item {
164 if let Some(name) = f.name() { 164 if let Some(name) = f.name() {
165 if name.text().eq_ignore_ascii_case("new") { 165 if name.text().eq_ignore_ascii_case("new") {
166 return true; 166 return true;
diff --git a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
index 967593031..f3774fab1 100644
--- a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
+++ b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
@@ -38,7 +38,7 @@ pub(crate) fn introduce_named_lifetime(acc: &mut Assists, ctx: &AssistContext) -
38 let lifetime_token = ctx 38 let lifetime_token = ctx
39 .find_token_at_offset(SyntaxKind::LIFETIME) 39 .find_token_at_offset(SyntaxKind::LIFETIME)
40 .filter(|lifetime| lifetime.text() == "'_")?; 40 .filter(|lifetime| lifetime.text() == "'_")?;
41 if let Some(fn_def) = lifetime_token.ancestors().find_map(ast::FnDef::cast) { 41 if let Some(fn_def) = lifetime_token.ancestors().find_map(ast::Fn::cast) {
42 generate_fn_def_assist(acc, &fn_def, lifetime_token.text_range()) 42 generate_fn_def_assist(acc, &fn_def, lifetime_token.text_range())
43 } else if let Some(impl_def) = lifetime_token.ancestors().find_map(ast::ImplDef::cast) { 43 } else if let Some(impl_def) = lifetime_token.ancestors().find_map(ast::ImplDef::cast) {
44 generate_impl_def_assist(acc, &impl_def, lifetime_token.text_range()) 44 generate_impl_def_assist(acc, &impl_def, lifetime_token.text_range())
@@ -50,7 +50,7 @@ pub(crate) fn introduce_named_lifetime(acc: &mut Assists, ctx: &AssistContext) -
50/// Generate the assist for the fn def case 50/// Generate the assist for the fn def case
51fn generate_fn_def_assist( 51fn generate_fn_def_assist(
52 acc: &mut Assists, 52 acc: &mut Assists,
53 fn_def: &ast::FnDef, 53 fn_def: &ast::Fn,
54 lifetime_loc: TextRange, 54 lifetime_loc: TextRange,
55) -> Option<()> { 55) -> Option<()> {
56 let param_list: ast::ParamList = fn_def.param_list()?; 56 let param_list: ast::ParamList = fn_def.param_list()?;
diff --git a/crates/ra_assists/src/handlers/move_bounds.rs b/crates/ra_assists/src/handlers/move_bounds.rs
index 6b73fff44..dae6198ed 100644
--- a/crates/ra_assists/src/handlers/move_bounds.rs
+++ b/crates/ra_assists/src/handlers/move_bounds.rs
@@ -37,7 +37,7 @@ pub(crate) fn move_bounds_to_where_clause(acc: &mut Assists, ctx: &AssistContext
37 37
38 let anchor = match_ast! { 38 let anchor = match_ast! {
39 match parent { 39 match parent {
40 ast::FnDef(it) => it.body()?.syntax().clone().into(), 40 ast::Fn(it) => it.body()?.syntax().clone().into(),
41 ast::TraitDef(it) => it.assoc_item_list()?.syntax().clone().into(), 41 ast::TraitDef(it) => it.assoc_item_list()?.syntax().clone().into(),
42 ast::ImplDef(it) => it.assoc_item_list()?.syntax().clone().into(), 42 ast::ImplDef(it) => it.assoc_item_list()?.syntax().clone().into(),
43 ast::EnumDef(it) => it.variant_list()?.syntax().clone().into(), 43 ast::EnumDef(it) => it.variant_list()?.syntax().clone().into(),
diff --git a/crates/ra_assists/src/utils.rs b/crates/ra_assists/src/utils.rs
index 27c33df23..4478ea0e2 100644
--- a/crates/ra_assists/src/utils.rs
+++ b/crates/ra_assists/src/utils.rs
@@ -66,7 +66,7 @@ pub fn get_missing_assoc_items(
66 if let Some(item_list) = impl_def.assoc_item_list() { 66 if let Some(item_list) = impl_def.assoc_item_list() {
67 for item in item_list.assoc_items() { 67 for item in item_list.assoc_items() {
68 match item { 68 match item {
69 ast::AssocItem::FnDef(f) => { 69 ast::AssocItem::Fn(f) => {
70 if let Some(n) = f.name() { 70 if let Some(n) = f.name() {
71 impl_fns_consts.insert(n.syntax().to_string()); 71 impl_fns_consts.insert(n.syntax().to_string());
72 } 72 }
diff --git a/crates/ra_hir/src/has_source.rs b/crates/ra_hir/src/has_source.rs
index 76c32fc17..f32b8cbb9 100644
--- a/crates/ra_hir/src/has_source.rs
+++ b/crates/ra_hir/src/has_source.rs
@@ -81,8 +81,8 @@ impl HasSource for EnumVariant {
81 } 81 }
82} 82}
83impl HasSource for Function { 83impl HasSource for Function {
84 type Ast = ast::FnDef; 84 type Ast = ast::Fn;
85 fn source(self, db: &dyn HirDatabase) -> InFile<ast::FnDef> { 85 fn source(self, db: &dyn HirDatabase) -> InFile<ast::Fn> {
86 self.id.lookup(db.upcast()).source(db.upcast()) 86 self.id.lookup(db.upcast()).source(db.upcast())
87 } 87 }
88} 88}
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs
index 1436b1afe..0b634f23e 100644
--- a/crates/ra_hir/src/semantics.rs
+++ b/crates/ra_hir/src/semantics.rs
@@ -585,7 +585,7 @@ to_def_impls![
585 (crate::TypeAlias, ast::TypeAliasDef, type_alias_to_def), 585 (crate::TypeAlias, ast::TypeAliasDef, type_alias_to_def),
586 (crate::Const, ast::ConstDef, const_to_def), 586 (crate::Const, ast::ConstDef, const_to_def),
587 (crate::Static, ast::StaticDef, static_to_def), 587 (crate::Static, ast::StaticDef, static_to_def),
588 (crate::Function, ast::FnDef, fn_to_def), 588 (crate::Function, ast::Fn, fn_to_def),
589 (crate::Field, ast::RecordFieldDef, record_field_to_def), 589 (crate::Field, ast::RecordFieldDef, record_field_to_def),
590 (crate::Field, ast::TupleFieldDef, tuple_field_to_def), 590 (crate::Field, ast::TupleFieldDef, tuple_field_to_def),
591 (crate::EnumVariant, ast::EnumVariant, enum_variant_to_def), 591 (crate::EnumVariant, ast::EnumVariant, enum_variant_to_def),
diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs
index 42e5a1bdb..4118de2e2 100644
--- a/crates/ra_hir/src/semantics/source_to_def.rs
+++ b/crates/ra_hir/src/semantics/source_to_def.rs
@@ -71,7 +71,7 @@ impl SourceToDefCtx<'_, '_> {
71 pub(super) fn impl_to_def(&mut self, src: InFile<ast::ImplDef>) -> Option<ImplId> { 71 pub(super) fn impl_to_def(&mut self, src: InFile<ast::ImplDef>) -> Option<ImplId> {
72 self.to_def(src, keys::IMPL) 72 self.to_def(src, keys::IMPL)
73 } 73 }
74 pub(super) fn fn_to_def(&mut self, src: InFile<ast::FnDef>) -> Option<FunctionId> { 74 pub(super) fn fn_to_def(&mut self, src: InFile<ast::Fn>) -> Option<FunctionId> {
75 self.to_def(src, keys::FUNCTION) 75 self.to_def(src, keys::FUNCTION)
76 } 76 }
77 pub(super) fn struct_to_def(&mut self, src: InFile<ast::StructDef>) -> Option<StructId> { 77 pub(super) fn struct_to_def(&mut self, src: InFile<ast::StructDef>) -> Option<StructId> {
@@ -171,7 +171,7 @@ impl SourceToDefCtx<'_, '_> {
171 let def = self.impl_to_def(container.with_value(it))?; 171 let def = self.impl_to_def(container.with_value(it))?;
172 def.into() 172 def.into()
173 }, 173 },
174 ast::FnDef(it) => { 174 ast::Fn(it) => {
175 let def = self.fn_to_def(container.with_value(it))?; 175 let def = self.fn_to_def(container.with_value(it))?;
176 DefWithBodyId::from(def).into() 176 DefWithBodyId::from(def).into()
177 }, 177 },
@@ -213,7 +213,7 @@ impl SourceToDefCtx<'_, '_> {
213 for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) { 213 for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) {
214 let res: GenericDefId = match_ast! { 214 let res: GenericDefId = match_ast! {
215 match (container.value) { 215 match (container.value) {
216 ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(), 216 ast::Fn(it) => self.fn_to_def(container.with_value(it))?.into(),
217 ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(), 217 ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(),
218 ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(), 218 ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(),
219 ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(), 219 ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(),
@@ -233,7 +233,7 @@ impl SourceToDefCtx<'_, '_> {
233 match (container.value) { 233 match (container.value) {
234 ast::ConstDef(it) => self.const_to_def(container.with_value(it))?.into(), 234 ast::ConstDef(it) => self.const_to_def(container.with_value(it))?.into(),
235 ast::StaticDef(it) => self.static_to_def(container.with_value(it))?.into(), 235 ast::StaticDef(it) => self.static_to_def(container.with_value(it))?.into(),
236 ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(), 236 ast::Fn(it) => self.fn_to_def(container.with_value(it))?.into(),
237 _ => continue, 237 _ => continue,
238 } 238 }
239 }; 239 };
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 5c57d8bde..6b13f013d 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -627,7 +627,7 @@ impl ExprCollector<'_> {
627 .items() 627 .items()
628 .filter_map(|item| { 628 .filter_map(|item| {
629 let (def, name): (ModuleDefId, Option<ast::Name>) = match item { 629 let (def, name): (ModuleDefId, Option<ast::Name>) = match item {
630 ast::Item::FnDef(def) => { 630 ast::Item::Fn(def) => {
631 let id = self.find_inner_item(&def)?; 631 let id = self.find_inner_item(&def)?;
632 ( 632 (
633 FunctionLoc { container: container.into(), id }.intern(self.db).into(), 633 FunctionLoc { container: container.into(), id }.intern(self.db).into(),
diff --git a/crates/ra_hir_def/src/item_tree.rs b/crates/ra_hir_def/src/item_tree.rs
index 0bab9c6d8..34fc9ff8e 100644
--- a/crates/ra_hir_def/src/item_tree.rs
+++ b/crates/ra_hir_def/src/item_tree.rs
@@ -413,7 +413,7 @@ macro_rules! mod_items {
413mod_items! { 413mod_items! {
414 Import in imports -> ast::Use, 414 Import in imports -> ast::Use,
415 ExternCrate in extern_crates -> ast::ExternCrate, 415 ExternCrate in extern_crates -> ast::ExternCrate,
416 Function in functions -> ast::FnDef, 416 Function in functions -> ast::Fn,
417 Struct in structs -> ast::StructDef, 417 Struct in structs -> ast::StructDef,
418 Union in unions -> ast::UnionDef, 418 Union in unions -> ast::UnionDef,
419 Enum in enums -> ast::EnumDef, 419 Enum in enums -> ast::EnumDef,
@@ -505,7 +505,7 @@ pub struct Function {
505 pub params: Box<[TypeRef]>, 505 pub params: Box<[TypeRef]>,
506 pub is_varargs: bool, 506 pub is_varargs: bool,
507 pub ret_type: TypeRef, 507 pub ret_type: TypeRef,
508 pub ast_id: FileAstId<ast::FnDef>, 508 pub ast_id: FileAstId<ast::Fn>,
509} 509}
510 510
511#[derive(Debug, Clone, Eq, PartialEq)] 511#[derive(Debug, Clone, Eq, PartialEq)]
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs
index 8bd0362dc..2764d8674 100644
--- a/crates/ra_hir_def/src/item_tree/lower.rs
+++ b/crates/ra_hir_def/src/item_tree/lower.rs
@@ -78,7 +78,7 @@ impl Ctx {
78 ast::Item::StructDef(_) 78 ast::Item::StructDef(_)
79 | ast::Item::UnionDef(_) 79 | ast::Item::UnionDef(_)
80 | ast::Item::EnumDef(_) 80 | ast::Item::EnumDef(_)
81 | ast::Item::FnDef(_) 81 | ast::Item::Fn(_)
82 | ast::Item::TypeAliasDef(_) 82 | ast::Item::TypeAliasDef(_)
83 | ast::Item::ConstDef(_) 83 | ast::Item::ConstDef(_)
84 | ast::Item::StaticDef(_) 84 | ast::Item::StaticDef(_)
@@ -103,7 +103,7 @@ impl Ctx {
103 ast::Item::StructDef(ast) => self.lower_struct(ast).map(Into::into), 103 ast::Item::StructDef(ast) => self.lower_struct(ast).map(Into::into),
104 ast::Item::UnionDef(ast) => self.lower_union(ast).map(Into::into), 104 ast::Item::UnionDef(ast) => self.lower_union(ast).map(Into::into),
105 ast::Item::EnumDef(ast) => self.lower_enum(ast).map(Into::into), 105 ast::Item::EnumDef(ast) => self.lower_enum(ast).map(Into::into),
106 ast::Item::FnDef(ast) => self.lower_function(ast).map(Into::into), 106 ast::Item::Fn(ast) => self.lower_function(ast).map(Into::into),
107 ast::Item::TypeAliasDef(ast) => self.lower_type_alias(ast).map(Into::into), 107 ast::Item::TypeAliasDef(ast) => self.lower_type_alias(ast).map(Into::into),
108 ast::Item::StaticDef(ast) => self.lower_static(ast).map(Into::into), 108 ast::Item::StaticDef(ast) => self.lower_static(ast).map(Into::into),
109 ast::Item::ConstDef(ast) => Some(self.lower_const(ast).into()), 109 ast::Item::ConstDef(ast) => Some(self.lower_const(ast).into()),
@@ -155,7 +155,7 @@ impl Ctx {
155 155
156 fn lower_assoc_item(&mut self, item: &ast::AssocItem) -> Option<AssocItem> { 156 fn lower_assoc_item(&mut self, item: &ast::AssocItem) -> Option<AssocItem> {
157 match item { 157 match item {
158 ast::AssocItem::FnDef(ast) => self.lower_function(ast).map(Into::into), 158 ast::AssocItem::Fn(ast) => self.lower_function(ast).map(Into::into),
159 ast::AssocItem::TypeAliasDef(ast) => self.lower_type_alias(ast).map(Into::into), 159 ast::AssocItem::TypeAliasDef(ast) => self.lower_type_alias(ast).map(Into::into),
160 ast::AssocItem::ConstDef(ast) => Some(self.lower_const(ast).into()), 160 ast::AssocItem::ConstDef(ast) => Some(self.lower_const(ast).into()),
161 ast::AssocItem::MacroCall(ast) => self.lower_macro_call(ast).map(Into::into), 161 ast::AssocItem::MacroCall(ast) => self.lower_macro_call(ast).map(Into::into),
@@ -277,7 +277,7 @@ impl Ctx {
277 Some(res) 277 Some(res)
278 } 278 }
279 279
280 fn lower_function(&mut self, func: &ast::FnDef) -> Option<FileItemTreeId<Function>> { 280 fn lower_function(&mut self, func: &ast::Fn) -> Option<FileItemTreeId<Function>> {
281 let visibility = self.lower_visibility(func); 281 let visibility = self.lower_visibility(func);
282 let name = func.name()?.as_name(); 282 let name = func.name()?.as_name();
283 283
@@ -547,7 +547,7 @@ impl Ctx {
547 self.collect_inner_items(item.syntax()); 547 self.collect_inner_items(item.syntax());
548 let attrs = Attrs::new(&item, &self.hygiene); 548 let attrs = Attrs::new(&item, &self.hygiene);
549 let id: ModItem = match item { 549 let id: ModItem = match item {
550 ast::ExternItem::FnDef(ast) => { 550 ast::ExternItem::Fn(ast) => {
551 let func = self.lower_function(&ast)?; 551 let func = self.lower_function(&ast)?;
552 self.data().functions[func.index].is_unsafe = true; 552 self.data().functions[func.index].is_unsafe = true;
553 func.into() 553 func.into()
diff --git a/crates/ra_hir_def/src/item_tree/tests.rs b/crates/ra_hir_def/src/item_tree/tests.rs
index 3f2e29d9e..4e2f6008b 100644
--- a/crates/ra_hir_def/src/item_tree/tests.rs
+++ b/crates/ra_hir_def/src/item_tree/tests.rs
@@ -240,9 +240,9 @@ fn smoke() {
240 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_const"))] }, input: None }]) }] 240 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_const"))] }, input: None }]) }]
241 > Const { name: Some(Name(Text("CONST"))), visibility: RawVisibilityId("pub(self)"), type_ref: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("u8"))] }, generic_args: [None] }), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::ConstDef>(9) } 241 > Const { name: Some(Name(Text("CONST"))), visibility: RawVisibilityId("pub(self)"), type_ref: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("u8"))] }, generic_args: [None] }), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::ConstDef>(9) }
242 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_method"))] }, input: None }]) }] 242 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_method"))] }, input: None }]) }]
243 > Function { name: Name(Text("method")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: true, is_unsafe: false, params: [Reference(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Self"))] }, generic_args: [None] }), Shared)], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(10) } 243 > Function { name: Name(Text("method")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: true, is_unsafe: false, params: [Reference(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Self"))] }, generic_args: [None] }), Shared)], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(10) }
244 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_dfl_method"))] }, input: None }]) }] 244 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_dfl_method"))] }, input: None }]) }]
245 > Function { name: Name(Text("dfl_method")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: true, is_unsafe: false, params: [Reference(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Self"))] }, generic_args: [None] }), Mut)], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(11) } 245 > Function { name: Name(Text("dfl_method")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: true, is_unsafe: false, params: [Reference(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Self"))] }, generic_args: [None] }), Mut)], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(11) }
246 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct0"))] }, input: None }]) }] 246 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct0"))] }, input: None }]) }]
247 Struct { name: Name(Text("Struct0")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), fields: Unit, ast_id: FileAstId::<ra_syntax::ast::generated::nodes::StructDef>(3), kind: Unit } 247 Struct { name: Name(Text("Struct0")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), fields: Unit, ast_id: FileAstId::<ra_syntax::ast::generated::nodes::StructDef>(3), kind: Unit }
248 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct1"))] }, input: None }]) }] 248 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct1"))] }, input: None }]) }]
@@ -275,12 +275,12 @@ fn simple_inner_items() {
275 275
276 top-level items: 276 top-level items:
277 Impl { generic_params: GenericParamsId(0), target_trait: Some(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("D"))] }, generic_args: [None] })), target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Response"))] }, generic_args: [Some(GenericArgs { args: [Type(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("T"))] }, generic_args: [None] }))], has_self_type: false, bindings: [] })] }), is_negative: false, items: [Function(Idx::<Function>(1))], ast_id: FileAstId::<ra_syntax::ast::generated::nodes::ImplDef>(0) } 277 Impl { generic_params: GenericParamsId(0), target_trait: Some(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("D"))] }, generic_args: [None] })), target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Response"))] }, generic_args: [Some(GenericArgs { args: [Type(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("T"))] }, generic_args: [None] }))], has_self_type: false, bindings: [] })] }), is_negative: false, items: [Function(Idx::<Function>(1))], ast_id: FileAstId::<ra_syntax::ast::generated::nodes::ImplDef>(0) }
278 > Function { name: Name(Text("foo")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(1) } 278 > Function { name: Name(Text("foo")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(1) }
279 279
280 inner items: 280 inner items:
281 281
282 for AST FileAstId::<ra_syntax::ast::generated::nodes::Item>(2): 282 for AST FileAstId::<ra_syntax::ast::generated::nodes::Item>(2):
283 Function { name: Name(Text("end")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(2) } 283 Function { name: Name(Text("end")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(2) }
284 284
285 "#]], 285 "#]],
286 ); 286 );
@@ -303,9 +303,9 @@ fn extern_attrs() {
303 303
304 top-level items: 304 top-level items:
305 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_a"))] }, input: None }, Attr { path: ModPath { kind: Plain, segments: [Name(Text("block_attr"))] }, input: None }]) }] 305 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_a"))] }, input: None }, Attr { path: ModPath { kind: Plain, segments: [Name(Text("block_attr"))] }, input: None }]) }]
306 Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: true, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(1) } 306 Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: true, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(1) }
307 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_b"))] }, input: None }, Attr { path: ModPath { kind: Plain, segments: [Name(Text("block_attr"))] }, input: None }]) }] 307 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_b"))] }, input: None }, Attr { path: ModPath { kind: Plain, segments: [Name(Text("block_attr"))] }, input: None }]) }]
308 Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: true, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(2) } 308 Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: true, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(2) }
309 "##]], 309 "##]],
310 ); 310 );
311} 311}
@@ -329,9 +329,9 @@ fn trait_attrs() {
329 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("trait_attr"))] }, input: None }]) }] 329 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("trait_attr"))] }, input: None }]) }]
330 Trait { name: Name(Text("Tr")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(0), auto: false, items: [Function(Idx::<Function>(0)), Function(Idx::<Function>(1))], ast_id: FileAstId::<ra_syntax::ast::generated::nodes::TraitDef>(0) } 330 Trait { name: Name(Text("Tr")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(0), auto: false, items: [Function(Idx::<Function>(0)), Function(Idx::<Function>(1))], ast_id: FileAstId::<ra_syntax::ast::generated::nodes::TraitDef>(0) }
331 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_a"))] }, input: None }]) }] 331 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_a"))] }, input: None }]) }]
332 > Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(1) } 332 > Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(1) }
333 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_b"))] }, input: None }]) }] 333 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_b"))] }, input: None }]) }]
334 > Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(2) } 334 > Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(2) }
335 "##]], 335 "##]],
336 ); 336 );
337} 337}
@@ -355,9 +355,9 @@ fn impl_attrs() {
355 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("impl_attr"))] }, input: None }]) }] 355 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("impl_attr"))] }, input: None }]) }]
356 Impl { generic_params: GenericParamsId(4294967295), target_trait: None, target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Ty"))] }, generic_args: [None] }), is_negative: false, items: [Function(Idx::<Function>(0)), Function(Idx::<Function>(1))], ast_id: FileAstId::<ra_syntax::ast::generated::nodes::ImplDef>(0) } 356 Impl { generic_params: GenericParamsId(4294967295), target_trait: None, target_type: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Ty"))] }, generic_args: [None] }), is_negative: false, items: [Function(Idx::<Function>(0)), Function(Idx::<Function>(1))], ast_id: FileAstId::<ra_syntax::ast::generated::nodes::ImplDef>(0) }
357 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_a"))] }, input: None }]) }] 357 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_a"))] }, input: None }]) }]
358 > Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(1) } 358 > Function { name: Name(Text("a")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(1) }
359 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_b"))] }, input: None }]) }] 359 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("attr_b"))] }, input: None }]) }]
360 > Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(2) } 360 > Function { name: Name(Text("b")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(2) }
361 "##]], 361 "##]],
362 ); 362 );
363} 363}
@@ -408,13 +408,13 @@ fn inner_item_attrs() {
408 inner attrs: Attrs { entries: None } 408 inner attrs: Attrs { entries: None }
409 409
410 top-level items: 410 top-level items:
411 Function { name: Name(Text("foo")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(0) } 411 Function { name: Name(Text("foo")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(0) }
412 412
413 inner items: 413 inner items:
414 414
415 for AST FileAstId::<ra_syntax::ast::generated::nodes::Item>(1): 415 for AST FileAstId::<ra_syntax::ast::generated::nodes::Item>(1):
416 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("on_inner"))] }, input: None }]) }] 416 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("on_inner"))] }, input: None }]) }]
417 Function { name: Name(Text("inner")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::FnDef>(1) } 417 Function { name: Name(Text("inner")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: false, is_unsafe: false, params: [], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(1) }
418 418
419 "##]], 419 "##]],
420 ); 420 );
diff --git a/crates/ra_hir_def/src/keys.rs b/crates/ra_hir_def/src/keys.rs
index a7349a21d..7fed5523e 100644
--- a/crates/ra_hir_def/src/keys.rs
+++ b/crates/ra_hir_def/src/keys.rs
@@ -14,7 +14,7 @@ use crate::{
14 14
15pub type Key<K, V> = crate::dyn_map::Key<InFile<K>, V, AstPtrPolicy<K, V>>; 15pub type Key<K, V> = crate::dyn_map::Key<InFile<K>, V, AstPtrPolicy<K, V>>;
16 16
17pub const FUNCTION: Key<ast::FnDef, FunctionId> = Key::new(); 17pub const FUNCTION: Key<ast::Fn, FunctionId> = Key::new();
18pub const CONST: Key<ast::ConstDef, ConstId> = Key::new(); 18pub const CONST: Key<ast::ConstDef, ConstId> = Key::new();
19pub const STATIC: Key<ast::StaticDef, StaticId> = Key::new(); 19pub const STATIC: Key<ast::StaticDef, StaticId> = Key::new();
20pub const TYPE_ALIAS: Key<ast::TypeAliasDef, TypeAliasId> = Key::new(); 20pub const TYPE_ALIAS: Key<ast::TypeAliasDef, TypeAliasId> = Key::new();
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs
index 45bc14c37..016e689ff 100644
--- a/crates/ra_hir_ty/src/tests.rs
+++ b/crates/ra_hir_ty/src/tests.rs
@@ -81,7 +81,7 @@ fn check_types_impl(ra_fixture: &str, display_source: bool) {
81fn type_at_range(db: &TestDB, pos: FileRange) -> Ty { 81fn type_at_range(db: &TestDB, pos: FileRange) -> Ty {
82 let file = db.parse(pos.file_id).ok().unwrap(); 82 let file = db.parse(pos.file_id).ok().unwrap();
83 let expr = algo::find_node_at_range::<ast::Expr>(file.syntax(), pos.range).unwrap(); 83 let expr = algo::find_node_at_range::<ast::Expr>(file.syntax(), pos.range).unwrap();
84 let fn_def = expr.syntax().ancestors().find_map(ast::FnDef::cast).unwrap(); 84 let fn_def = expr.syntax().ancestors().find_map(ast::Fn::cast).unwrap();
85 let module = db.module_for_file(pos.file_id); 85 let module = db.module_for_file(pos.file_id);
86 let func = *module.child_by_source(db)[keys::FUNCTION] 86 let func = *module.child_by_source(db)[keys::FUNCTION]
87 .get(&InFile::new(pos.file_id.into(), fn_def)) 87 .get(&InFile::new(pos.file_id.into(), fn_def))
diff --git a/crates/ra_ide/src/call_hierarchy.rs b/crates/ra_ide/src/call_hierarchy.rs
index c28af8ab3..1fcaf4a32 100644
--- a/crates/ra_ide/src/call_hierarchy.rs
+++ b/crates/ra_ide/src/call_hierarchy.rs
@@ -59,7 +59,7 @@ pub(crate) fn incoming_calls(db: &RootDatabase, position: FilePosition) -> Optio
59 if let Some(nav) = syntax.ancestors().find_map(|node| { 59 if let Some(nav) = syntax.ancestors().find_map(|node| {
60 match_ast! { 60 match_ast! {
61 match node { 61 match node {
62 ast::FnDef(it) => { 62 ast::Fn(it) => {
63 let def = sema.to_def(&it)?; 63 let def = sema.to_def(&it)?;
64 Some(def.to_nav(sema.db)) 64 Some(def.to_nav(sema.db))
65 }, 65 },
@@ -181,8 +181,8 @@ fn caller() {
181 call<|>ee(); 181 call<|>ee();
182} 182}
183"#, 183"#,
184 "callee FN_DEF FileId(1) 0..14 3..9", 184 "callee FN FileId(1) 0..14 3..9",
185 &["caller FN_DEF FileId(1) 15..44 18..24 : [33..39]"], 185 &["caller FN FileId(1) 15..44 18..24 : [33..39]"],
186 &[], 186 &[],
187 ); 187 );
188 } 188 }
@@ -197,8 +197,8 @@ fn caller() {
197 callee(); 197 callee();
198} 198}
199"#, 199"#,
200 "callee FN_DEF FileId(1) 0..14 3..9", 200 "callee FN FileId(1) 0..14 3..9",
201 &["caller FN_DEF FileId(1) 15..44 18..24 : [33..39]"], 201 &["caller FN FileId(1) 15..44 18..24 : [33..39]"],
202 &[], 202 &[],
203 ); 203 );
204 } 204 }
@@ -214,8 +214,8 @@ fn caller() {
214 callee(); 214 callee();
215} 215}
216"#, 216"#,
217 "callee FN_DEF FileId(1) 0..14 3..9", 217 "callee FN FileId(1) 0..14 3..9",
218 &["caller FN_DEF FileId(1) 15..58 18..24 : [33..39, 47..53]"], 218 &["caller FN FileId(1) 15..58 18..24 : [33..39, 47..53]"],
219 &[], 219 &[],
220 ); 220 );
221 } 221 }
@@ -234,10 +234,10 @@ fn caller2() {
234 callee(); 234 callee();
235} 235}
236"#, 236"#,
237 "callee FN_DEF FileId(1) 0..14 3..9", 237 "callee FN FileId(1) 0..14 3..9",
238 &[ 238 &[
239 "caller1 FN_DEF FileId(1) 15..45 18..25 : [34..40]", 239 "caller1 FN FileId(1) 15..45 18..25 : [34..40]",
240 "caller2 FN_DEF FileId(1) 47..77 50..57 : [66..72]", 240 "caller2 FN FileId(1) 47..77 50..57 : [66..72]",
241 ], 241 ],
242 &[], 242 &[],
243 ); 243 );
@@ -263,10 +263,10 @@ mod tests {
263 } 263 }
264} 264}
265"#, 265"#,
266 "callee FN_DEF FileId(1) 0..14 3..9", 266 "callee FN FileId(1) 0..14 3..9",
267 &[ 267 &[
268 "caller1 FN_DEF FileId(1) 15..45 18..25 : [34..40]", 268 "caller1 FN FileId(1) 15..45 18..25 : [34..40]",
269 "test_caller FN_DEF FileId(1) 95..149 110..121 : [134..140]", 269 "test_caller FN FileId(1) 95..149 110..121 : [134..140]",
270 ], 270 ],
271 &[], 271 &[],
272 ); 272 );
@@ -287,8 +287,8 @@ fn caller() {
287//- /foo/mod.rs 287//- /foo/mod.rs
288pub fn callee() {} 288pub fn callee() {}
289"#, 289"#,
290 "callee FN_DEF FileId(2) 0..18 7..13", 290 "callee FN FileId(2) 0..18 7..13",
291 &["caller FN_DEF FileId(1) 27..56 30..36 : [45..51]"], 291 &["caller FN FileId(1) 27..56 30..36 : [45..51]"],
292 &[], 292 &[],
293 ); 293 );
294 } 294 }
@@ -304,9 +304,9 @@ fn call<|>er() {
304 callee(); 304 callee();
305} 305}
306"#, 306"#,
307 "caller FN_DEF FileId(1) 15..58 18..24", 307 "caller FN FileId(1) 15..58 18..24",
308 &[], 308 &[],
309 &["callee FN_DEF FileId(1) 0..14 3..9 : [33..39, 47..53]"], 309 &["callee FN FileId(1) 0..14 3..9 : [33..39, 47..53]"],
310 ); 310 );
311 } 311 }
312 312
@@ -325,9 +325,9 @@ fn call<|>er() {
325//- /foo/mod.rs 325//- /foo/mod.rs
326pub fn callee() {} 326pub fn callee() {}
327"#, 327"#,
328 "caller FN_DEF FileId(1) 27..56 30..36", 328 "caller FN FileId(1) 27..56 30..36",
329 &[], 329 &[],
330 &["callee FN_DEF FileId(2) 0..18 7..13 : [45..51]"], 330 &["callee FN FileId(2) 0..18 7..13 : [45..51]"],
331 ); 331 );
332 } 332 }
333 333
@@ -348,9 +348,9 @@ fn caller3() {
348 348
349} 349}
350"#, 350"#,
351 "caller2 FN_DEF FileId(1) 33..64 36..43", 351 "caller2 FN FileId(1) 33..64 36..43",
352 &["caller1 FN_DEF FileId(1) 0..31 3..10 : [19..26]"], 352 &["caller1 FN FileId(1) 0..31 3..10 : [19..26]"],
353 &["caller3 FN_DEF FileId(1) 66..83 69..76 : [52..59]"], 353 &["caller3 FN FileId(1) 66..83 69..76 : [52..59]"],
354 ); 354 );
355 } 355 }
356 356
@@ -368,9 +368,9 @@ fn main() {
368 a<|>() 368 a<|>()
369} 369}
370"#, 370"#,
371 "a FN_DEF FileId(1) 0..18 3..4", 371 "a FN FileId(1) 0..18 3..4",
372 &["main FN_DEF FileId(1) 31..52 34..38 : [47..48]"], 372 &["main FN FileId(1) 31..52 34..38 : [47..48]"],
373 &["b FN_DEF FileId(1) 20..29 23..24 : [13..14]"], 373 &["b FN FileId(1) 20..29 23..24 : [13..14]"],
374 ); 374 );
375 375
376 check_hierarchy( 376 check_hierarchy(
@@ -385,8 +385,8 @@ fn main() {
385 a() 385 a()
386} 386}
387"#, 387"#,
388 "b FN_DEF FileId(1) 20..29 23..24", 388 "b FN FileId(1) 20..29 23..24",
389 &["a FN_DEF FileId(1) 0..18 3..4 : [13..14]"], 389 &["a FN FileId(1) 0..18 3..4 : [13..14]"],
390 &[], 390 &[],
391 ); 391 );
392 } 392 }
diff --git a/crates/ra_ide/src/completion/complete_fn_param.rs b/crates/ra_ide/src/completion/complete_fn_param.rs
index d4b6112a5..406334257 100644
--- a/crates/ra_ide/src/completion/complete_fn_param.rs
+++ b/crates/ra_ide/src/completion/complete_fn_param.rs
@@ -19,8 +19,8 @@ pub(super) fn complete_fn_param(acc: &mut Completions, ctx: &CompletionContext)
19 19
20 let mut params = FxHashMap::default(); 20 let mut params = FxHashMap::default();
21 21
22 let me = ctx.token.ancestors().find_map(ast::FnDef::cast); 22 let me = ctx.token.ancestors().find_map(ast::Fn::cast);
23 let mut process_fn = |func: ast::FnDef| { 23 let mut process_fn = |func: ast::Fn| {
24 if Some(&func) == me.as_ref() { 24 if Some(&func) == me.as_ref() {
25 return; 25 return;
26 } 26 }
@@ -34,15 +34,15 @@ pub(super) fn complete_fn_param(acc: &mut Completions, ctx: &CompletionContext)
34 match_ast! { 34 match_ast! {
35 match node { 35 match node {
36 ast::SourceFile(it) => it.items().filter_map(|item| match item { 36 ast::SourceFile(it) => it.items().filter_map(|item| match item {
37 ast::Item::FnDef(it) => Some(it), 37 ast::Item::Fn(it) => Some(it),
38 _ => None, 38 _ => None,
39 }).for_each(&mut process_fn), 39 }).for_each(&mut process_fn),
40 ast::ItemList(it) => it.items().filter_map(|item| match item { 40 ast::ItemList(it) => it.items().filter_map(|item| match item {
41 ast::Item::FnDef(it) => Some(it), 41 ast::Item::Fn(it) => Some(it),
42 _ => None, 42 _ => None,
43 }).for_each(&mut process_fn), 43 }).for_each(&mut process_fn),
44 ast::AssocItemList(it) => it.assoc_items().filter_map(|item| match item { 44 ast::AssocItemList(it) => it.assoc_items().filter_map(|item| match item {
45 ast::AssocItem::FnDef(it) => Some(it), 45 ast::AssocItem::Fn(it) => Some(it),
46 _ => None, 46 _ => None,
47 }).for_each(&mut process_fn), 47 }).for_each(&mut process_fn),
48 _ => continue, 48 _ => continue,
diff --git a/crates/ra_ide/src/completion/complete_keyword.rs b/crates/ra_ide/src/completion/complete_keyword.rs
index 1581b2d5d..b62064797 100644
--- a/crates/ra_ide/src/completion/complete_keyword.rs
+++ b/crates/ra_ide/src/completion/complete_keyword.rs
@@ -169,7 +169,7 @@ fn add_keyword(ctx: &CompletionContext, acc: &mut Completions, kw: &str, snippet
169 169
170fn complete_return( 170fn complete_return(
171 ctx: &CompletionContext, 171 ctx: &CompletionContext,
172 fn_def: &ast::FnDef, 172 fn_def: &ast::Fn,
173 can_be_stmt: bool, 173 can_be_stmt: bool,
174) -> Option<CompletionItem> { 174) -> Option<CompletionItem> {
175 let snip = match (can_be_stmt, fn_def.ret_type().is_some()) { 175 let snip = match (can_be_stmt, fn_def.ret_type().is_some()) {
diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs
index cf716540f..dbb9eecc6 100644
--- a/crates/ra_ide/src/completion/complete_trait_impl.rs
+++ b/crates/ra_ide/src/completion/complete_trait_impl.rs
@@ -2,7 +2,7 @@
2//! 2//!
3//! This module adds the completion items related to implementing associated 3//! This module adds the completion items related to implementing associated
4//! items within a `impl Trait for Struct` block. The current context node 4//! items within a `impl Trait for Struct` block. The current context node
5//! must be within either a `FN_DEF`, `TYPE_ALIAS_DEF`, or `CONST_DEF` node 5//! must be within either a `FN`, `TYPE_ALIAS_DEF`, or `CONST_DEF` node
6//! and an direct child of an `IMPL_DEF`. 6//! and an direct child of an `IMPL_DEF`.
7//! 7//!
8//! # Examples 8//! # Examples
@@ -63,7 +63,7 @@ pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext
63 } 63 }
64 }), 64 }),
65 65
66 SyntaxKind::FN_DEF => { 66 SyntaxKind::FN => {
67 for missing_fn in get_missing_assoc_items(&ctx.sema, &impl_def) 67 for missing_fn in get_missing_assoc_items(&ctx.sema, &impl_def)
68 .into_iter() 68 .into_iter()
69 .filter_map(|item| match item { 69 .filter_map(|item| match item {
@@ -106,7 +106,7 @@ pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext
106 106
107fn completion_match(ctx: &CompletionContext) -> Option<(SyntaxNode, ImplDef)> { 107fn completion_match(ctx: &CompletionContext) -> Option<(SyntaxNode, ImplDef)> {
108 let (trigger, impl_def_offset) = ctx.token.ancestors().find_map(|p| match p.kind() { 108 let (trigger, impl_def_offset) = ctx.token.ancestors().find_map(|p| match p.kind() {
109 SyntaxKind::FN_DEF 109 SyntaxKind::FN
110 | SyntaxKind::TYPE_ALIAS_DEF 110 | SyntaxKind::TYPE_ALIAS_DEF
111 | SyntaxKind::CONST_DEF 111 | SyntaxKind::CONST_DEF
112 | SyntaxKind::BLOCK_EXPR => Some((p, 2)), 112 | SyntaxKind::BLOCK_EXPR => Some((p, 2)),
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index cc55f6dd6..221d7847e 100644
--- a/crates/ra_ide/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
@@ -35,7 +35,7 @@ pub(crate) struct CompletionContext<'a> {
35 pub(super) krate: Option<hir::Crate>, 35 pub(super) krate: Option<hir::Crate>,
36 pub(super) expected_type: Option<Type>, 36 pub(super) expected_type: Option<Type>,
37 pub(super) name_ref_syntax: Option<ast::NameRef>, 37 pub(super) name_ref_syntax: Option<ast::NameRef>,
38 pub(super) function_syntax: Option<ast::FnDef>, 38 pub(super) function_syntax: Option<ast::Fn>,
39 pub(super) use_item_syntax: Option<ast::Use>, 39 pub(super) use_item_syntax: Option<ast::Use>,
40 pub(super) record_lit_syntax: Option<ast::RecordLit>, 40 pub(super) record_lit_syntax: Option<ast::RecordLit>,
41 pub(super) record_pat_syntax: Option<ast::RecordPat>, 41 pub(super) record_pat_syntax: Option<ast::RecordPat>,
@@ -349,7 +349,7 @@ impl<'a> CompletionContext<'a> {
349 .sema 349 .sema
350 .ancestors_with_macros(self.token.parent()) 350 .ancestors_with_macros(self.token.parent())
351 .take_while(|it| it.kind() != SOURCE_FILE && it.kind() != MODULE) 351 .take_while(|it| it.kind() != SOURCE_FILE && it.kind() != MODULE)
352 .find_map(ast::FnDef::cast); 352 .find_map(ast::Fn::cast);
353 353
354 self.record_field_syntax = self 354 self.record_field_syntax = self
355 .sema 355 .sema
diff --git a/crates/ra_ide/src/completion/patterns.rs b/crates/ra_ide/src/completion/patterns.rs
index 175209d8a..b8408da4e 100644
--- a/crates/ra_ide/src/completion/patterns.rs
+++ b/crates/ra_ide/src/completion/patterns.rs
@@ -134,7 +134,7 @@ pub(crate) fn is_in_loop_body(element: SyntaxElement) -> bool {
134 NodeOrToken::Token(token) => token.parent(), 134 NodeOrToken::Token(token) => token.parent(),
135 }; 135 };
136 for node in leaf.ancestors() { 136 for node in leaf.ancestors() {
137 if node.kind() == FN_DEF || node.kind() == LAMBDA_EXPR { 137 if node.kind() == FN || node.kind() == LAMBDA_EXPR {
138 break; 138 break;
139 } 139 }
140 let loop_body = match_ast! { 140 let loop_body = match_ast! {
diff --git a/crates/ra_ide/src/display.rs b/crates/ra_ide/src/display.rs
index 6d4151dd8..e4effc66c 100644
--- a/crates/ra_ide/src/display.rs
+++ b/crates/ra_ide/src/display.rs
@@ -16,7 +16,7 @@ pub use navigation_target::NavigationTarget;
16pub(crate) use navigation_target::{ToNav, TryToNav}; 16pub(crate) use navigation_target::{ToNav, TryToNav};
17pub(crate) use short_label::ShortLabel; 17pub(crate) use short_label::ShortLabel;
18 18
19pub(crate) fn function_declaration(node: &ast::FnDef) -> String { 19pub(crate) fn function_declaration(node: &ast::Fn) -> String {
20 let mut buf = String::new(); 20 let mut buf = String::new();
21 if let Some(vis) = node.visibility() { 21 if let Some(vis) = node.visibility() {
22 format_to!(buf, "{} ", vis); 22 format_to!(buf, "{} ", vis);
diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs
index fd245705c..222cb3502 100644
--- a/crates/ra_ide/src/display/navigation_target.rs
+++ b/crates/ra_ide/src/display/navigation_target.rs
@@ -379,7 +379,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option
379 379
380 match_ast! { 380 match_ast! {
381 match node { 381 match node {
382 ast::FnDef(it) => it.doc_comment_text(), 382 ast::Fn(it) => it.doc_comment_text(),
383 ast::StructDef(it) => it.doc_comment_text(), 383 ast::StructDef(it) => it.doc_comment_text(),
384 ast::EnumDef(it) => it.doc_comment_text(), 384 ast::EnumDef(it) => it.doc_comment_text(),
385 ast::TraitDef(it) => it.doc_comment_text(), 385 ast::TraitDef(it) => it.doc_comment_text(),
@@ -404,7 +404,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) ->
404 404
405 match_ast! { 405 match_ast! {
406 match node { 406 match node {
407 ast::FnDef(it) => it.short_label(), 407 ast::Fn(it) => it.short_label(),
408 ast::StructDef(it) => it.short_label(), 408 ast::StructDef(it) => it.short_label(),
409 ast::EnumDef(it) => it.short_label(), 409 ast::EnumDef(it) => it.short_label(),
410 ast::TraitDef(it) => it.short_label(), 410 ast::TraitDef(it) => it.short_label(),
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs
index 5588130a1..63863943a 100644
--- a/crates/ra_ide/src/display/short_label.rs
+++ b/crates/ra_ide/src/display/short_label.rs
@@ -7,7 +7,7 @@ pub(crate) trait ShortLabel {
7 fn short_label(&self) -> Option<String>; 7 fn short_label(&self) -> Option<String>;
8} 8}
9 9
10impl ShortLabel for ast::FnDef { 10impl ShortLabel for ast::Fn {
11 fn short_label(&self) -> Option<String> { 11 fn short_label(&self) -> Option<String> {
12 Some(crate::display::function_declaration(self)) 12 Some(crate::display::function_declaration(self))
13 } 13 }
diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs
index 1f6a3febf..41603480e 100644
--- a/crates/ra_ide/src/file_structure.rs
+++ b/crates/ra_ide/src/file_structure.rs
@@ -111,7 +111,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
111 111
112 match_ast! { 112 match_ast! {
113 match node { 113 match node {
114 ast::FnDef(it) => { 114 ast::Fn(it) => {
115 let mut detail = String::from("fn"); 115 let mut detail = String::from("fn");
116 if let Some(type_param_list) = it.type_param_list() { 116 if let Some(type_param_list) = it.type_param_list() {
117 collapse_ws(type_param_list.syntax(), &mut detail); 117 collapse_ws(type_param_list.syntax(), &mut detail);
@@ -271,7 +271,7 @@ fn very_obsolete() {}
271 label: "bar1", 271 label: "bar1",
272 navigation_range: 43..47, 272 navigation_range: 43..47,
273 node_range: 40..52, 273 node_range: 40..52,
274 kind: FN_DEF, 274 kind: FN,
275 detail: Some( 275 detail: Some(
276 "fn()", 276 "fn()",
277 ), 277 ),
@@ -284,7 +284,7 @@ fn very_obsolete() {}
284 label: "bar2", 284 label: "bar2",
285 navigation_range: 60..64, 285 navigation_range: 60..64,
286 node_range: 57..81, 286 node_range: 57..81,
287 kind: FN_DEF, 287 kind: FN,
288 detail: Some( 288 detail: Some(
289 "fn<T>(t: T) -> T", 289 "fn<T>(t: T) -> T",
290 ), 290 ),
@@ -297,7 +297,7 @@ fn very_obsolete() {}
297 label: "bar3", 297 label: "bar3",
298 navigation_range: 89..93, 298 navigation_range: 89..93,
299 node_range: 86..156, 299 node_range: 86..156,
300 kind: FN_DEF, 300 kind: FN,
301 detail: Some( 301 detail: Some(
302 "fn<A, B>(a: A, b: B) -> Vec< u32 >", 302 "fn<A, B>(a: A, b: B) -> Vec< u32 >",
303 ), 303 ),
@@ -417,7 +417,7 @@ fn very_obsolete() {}
417 label: "obsolete", 417 label: "obsolete",
418 navigation_range: 428..436, 418 navigation_range: 428..436,
419 node_range: 411..441, 419 node_range: 411..441,
420 kind: FN_DEF, 420 kind: FN,
421 detail: Some( 421 detail: Some(
422 "fn()", 422 "fn()",
423 ), 423 ),
@@ -428,7 +428,7 @@ fn very_obsolete() {}
428 label: "very_obsolete", 428 label: "very_obsolete",
429 navigation_range: 481..494, 429 navigation_range: 481..494,
430 node_range: 443..499, 430 node_range: 443..499,
431 kind: FN_DEF, 431 kind: FN,
432 detail: Some( 432 detail: Some(
433 "fn()", 433 "fn()",
434 ), 434 ),
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index d067c339d..4ef7efd26 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -1361,7 +1361,7 @@ fn foo_<|>test() {}
1361 11..19, 1361 11..19,
1362 ), 1362 ),
1363 name: "foo_test", 1363 name: "foo_test",
1364 kind: FN_DEF, 1364 kind: FN,
1365 container_name: None, 1365 container_name: None,
1366 description: None, 1366 description: None,
1367 docs: None, 1367 docs: None,
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs
index fe1c074d1..8d3452a83 100644
--- a/crates/ra_ide/src/references.rs
+++ b/crates/ra_ide/src/references.rs
@@ -376,7 +376,7 @@ impl Foo {
376} 376}
377"#, 377"#,
378 ); 378 );
379 check_result(refs, "f FN_DEF FileId(1) 27..43 30..31 Other", &[]); 379 check_result(refs, "f FN FileId(1) 27..43 30..31 Other", &[]);
380 } 380 }
381 381
382 #[test] 382 #[test]
@@ -514,7 +514,7 @@ pub(super) struct Foo<|> {
514 let refs = analysis.find_all_refs(pos, None).unwrap().unwrap(); 514 let refs = analysis.find_all_refs(pos, None).unwrap().unwrap();
515 check_result( 515 check_result(
516 refs, 516 refs,
517 "quux FN_DEF FileId(1) 19..35 26..30 Other", 517 "quux FN FileId(1) 19..35 26..30 Other",
518 &["FileId(2) 16..20 StructLiteral", "FileId(3) 16..20 StructLiteral"], 518 &["FileId(2) 16..20 StructLiteral", "FileId(3) 16..20 StructLiteral"],
519 ); 519 );
520 520
@@ -522,7 +522,7 @@ pub(super) struct Foo<|> {
522 analysis.find_all_refs(pos, Some(SearchScope::single_file(bar))).unwrap().unwrap(); 522 analysis.find_all_refs(pos, Some(SearchScope::single_file(bar))).unwrap().unwrap();
523 check_result( 523 check_result(
524 refs, 524 refs,
525 "quux FN_DEF FileId(1) 19..35 26..30 Other", 525 "quux FN FileId(1) 19..35 26..30 Other",
526 &["FileId(3) 16..20 StructLiteral"], 526 &["FileId(3) 16..20 StructLiteral"],
527 ); 527 );
528 } 528 }
@@ -619,7 +619,7 @@ fn main() {
619 ); 619 );
620 check_result( 620 check_result(
621 refs, 621 refs,
622 "new FN_DEF FileId(1) 54..101 61..64 Other", 622 "new FN FileId(1) 54..101 61..64 Other",
623 &["FileId(1) 146..149 StructLiteral"], 623 &["FileId(1) 146..149 StructLiteral"],
624 ); 624 );
625 } 625 }
@@ -646,7 +646,7 @@ fn main() {
646 let refs = analysis.find_all_refs(pos, None).unwrap().unwrap(); 646 let refs = analysis.find_all_refs(pos, None).unwrap().unwrap();
647 check_result( 647 check_result(
648 refs, 648 refs,
649 "f FN_DEF FileId(1) 26..35 29..30 Other", 649 "f FN FileId(1) 26..35 29..30 Other",
650 &["FileId(2) 11..12 Other", "FileId(2) 28..29 StructLiteral"], 650 &["FileId(2) 11..12 Other", "FileId(2) 28..29 StructLiteral"],
651 ); 651 );
652 } 652 }
diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs
index 8735ec53c..d8ffb8c84 100644
--- a/crates/ra_ide/src/references/rename.rs
+++ b/crates/ra_ide/src/references/rename.rs
@@ -149,7 +149,7 @@ fn rename_to_self(
149 let source_file = sema.parse(position.file_id); 149 let source_file = sema.parse(position.file_id);
150 let syn = source_file.syntax(); 150 let syn = source_file.syntax();
151 151
152 let fn_def = find_node_at_offset::<ast::FnDef>(syn, position.offset)?; 152 let fn_def = find_node_at_offset::<ast::Fn>(syn, position.offset)?;
153 let params = fn_def.param_list()?; 153 let params = fn_def.param_list()?;
154 if params.self_param().is_some() { 154 if params.self_param().is_some() {
155 return None; // method already has self param 155 return None; // method already has self param
@@ -221,7 +221,7 @@ fn rename_self_to_param(
221 let syn = source_file.syntax(); 221 let syn = source_file.syntax();
222 222
223 let text = sema.db.file_text(position.file_id); 223 let text = sema.db.file_text(position.file_id);
224 let fn_def = find_node_at_offset::<ast::FnDef>(syn, position.offset)?; 224 let fn_def = find_node_at_offset::<ast::Fn>(syn, position.offset)?;
225 let search_range = fn_def.syntax().text_range(); 225 let search_range = fn_def.syntax().text_range();
226 226
227 let mut edits: Vec<SourceFileEdit> = vec![]; 227 let mut edits: Vec<SourceFileEdit> = vec![];
diff --git a/crates/ra_ide/src/runnables.rs b/crates/ra_ide/src/runnables.rs
index f612835c2..3b7162b84 100644
--- a/crates/ra_ide/src/runnables.rs
+++ b/crates/ra_ide/src/runnables.rs
@@ -102,7 +102,7 @@ pub(crate) fn runnable(
102) -> Option<Runnable> { 102) -> Option<Runnable> {
103 match_ast! { 103 match_ast! {
104 match item { 104 match item {
105 ast::FnDef(it) => runnable_fn(sema, it, file_id), 105 ast::Fn(it) => runnable_fn(sema, it, file_id),
106 ast::Module(it) => runnable_mod(sema, it, file_id), 106 ast::Module(it) => runnable_mod(sema, it, file_id),
107 _ => None, 107 _ => None,
108 } 108 }
@@ -111,7 +111,7 @@ pub(crate) fn runnable(
111 111
112fn runnable_fn( 112fn runnable_fn(
113 sema: &Semantics<RootDatabase>, 113 sema: &Semantics<RootDatabase>,
114 fn_def: ast::FnDef, 114 fn_def: ast::Fn,
115 file_id: FileId, 115 file_id: FileId,
116) -> Option<Runnable> { 116) -> Option<Runnable> {
117 let name_string = fn_def.name()?.text().to_string(); 117 let name_string = fn_def.name()?.text().to_string();
@@ -188,7 +188,7 @@ pub struct TestAttr {
188} 188}
189 189
190impl TestAttr { 190impl TestAttr {
191 fn from_fn(fn_def: &ast::FnDef) -> TestAttr { 191 fn from_fn(fn_def: &ast::Fn) -> TestAttr {
192 let ignore = fn_def 192 let ignore = fn_def
193 .attrs() 193 .attrs()
194 .filter_map(|attr| attr.simple_name()) 194 .filter_map(|attr| attr.simple_name())
@@ -203,7 +203,7 @@ impl TestAttr {
203/// 203///
204/// It may produce false positives, for example, `#[wasm_bindgen_test]` requires a different command to run the test, 204/// It may produce false positives, for example, `#[wasm_bindgen_test]` requires a different command to run the test,
205/// but it's better than not to have the runnables for the tests at all. 205/// but it's better than not to have the runnables for the tests at all.
206fn has_test_related_attribute(fn_def: &ast::FnDef) -> bool { 206fn has_test_related_attribute(fn_def: &ast::Fn) -> bool {
207 fn_def 207 fn_def
208 .attrs() 208 .attrs()
209 .filter_map(|attr| attr.path()) 209 .filter_map(|attr| attr.path())
@@ -211,7 +211,7 @@ fn has_test_related_attribute(fn_def: &ast::FnDef) -> bool {
211 .any(|attribute_text| attribute_text.contains("test")) 211 .any(|attribute_text| attribute_text.contains("test"))
212} 212}
213 213
214fn has_doc_test(fn_def: &ast::FnDef) -> bool { 214fn has_doc_test(fn_def: &ast::Fn) -> bool {
215 fn_def.doc_comment_text().map_or(false, |comment| comment.contains("```")) 215 fn_def.doc_comment_text().map_or(false, |comment| comment.contains("```"))
216} 216}
217 217
@@ -246,7 +246,7 @@ fn has_test_function_or_multiple_test_submodules(module: &ast::Module) -> bool {
246 246
247 for item in item_list.items() { 247 for item in item_list.items() {
248 match item { 248 match item {
249 ast::Item::FnDef(f) => { 249 ast::Item::Fn(f) => {
250 if has_test_related_attribute(&f) { 250 if has_test_related_attribute(&f) {
251 return true; 251 return true;
252 } 252 }
@@ -320,7 +320,7 @@ fn bench() {}
320 4..8, 320 4..8,
321 ), 321 ),
322 name: "main", 322 name: "main",
323 kind: FN_DEF, 323 kind: FN,
324 container_name: None, 324 container_name: None,
325 description: None, 325 description: None,
326 docs: None, 326 docs: None,
@@ -338,7 +338,7 @@ fn bench() {}
338 26..34, 338 26..34,
339 ), 339 ),
340 name: "test_foo", 340 name: "test_foo",
341 kind: FN_DEF, 341 kind: FN,
342 container_name: None, 342 container_name: None,
343 description: None, 343 description: None,
344 docs: None, 344 docs: None,
@@ -363,7 +363,7 @@ fn bench() {}
363 62..70, 363 62..70,
364 ), 364 ),
365 name: "test_foo", 365 name: "test_foo",
366 kind: FN_DEF, 366 kind: FN,
367 container_name: None, 367 container_name: None,
368 description: None, 368 description: None,
369 docs: None, 369 docs: None,
@@ -388,7 +388,7 @@ fn bench() {}
388 89..94, 388 89..94,
389 ), 389 ),
390 name: "bench", 390 name: "bench",
391 kind: FN_DEF, 391 kind: FN,
392 container_name: None, 392 container_name: None,
393 description: None, 393 description: None,
394 docs: None, 394 docs: None,
@@ -431,7 +431,7 @@ fn foo() {}
431 4..8, 431 4..8,
432 ), 432 ),
433 name: "main", 433 name: "main",
434 kind: FN_DEF, 434 kind: FN,
435 container_name: None, 435 container_name: None,
436 description: None, 436 description: None,
437 docs: None, 437 docs: None,
@@ -447,7 +447,7 @@ fn foo() {}
447 full_range: 15..57, 447 full_range: 15..57,
448 focus_range: None, 448 focus_range: None,
449 name: "foo", 449 name: "foo",
450 kind: FN_DEF, 450 kind: FN,
451 container_name: None, 451 container_name: None,
452 description: None, 452 description: None,
453 docs: None, 453 docs: None,
@@ -493,7 +493,7 @@ impl Data {
493 4..8, 493 4..8,
494 ), 494 ),
495 name: "main", 495 name: "main",
496 kind: FN_DEF, 496 kind: FN,
497 container_name: None, 497 container_name: None,
498 description: None, 498 description: None,
499 docs: None, 499 docs: None,
@@ -509,7 +509,7 @@ impl Data {
509 full_range: 44..98, 509 full_range: 44..98,
510 focus_range: None, 510 focus_range: None,
511 name: "foo", 511 name: "foo",
512 kind: FN_DEF, 512 kind: FN,
513 container_name: None, 513 container_name: None,
514 description: None, 514 description: None,
515 docs: None, 515 docs: None,
@@ -570,7 +570,7 @@ mod test_mod {
570 35..44, 570 35..44,
571 ), 571 ),
572 name: "test_foo1", 572 name: "test_foo1",
573 kind: FN_DEF, 573 kind: FN,
574 container_name: None, 574 container_name: None,
575 description: None, 575 description: None,
576 docs: None, 576 docs: None,
@@ -670,7 +670,7 @@ mod root_tests {
670 107..121, 670 107..121,
671 ), 671 ),
672 name: "nested_test_11", 672 name: "nested_test_11",
673 kind: FN_DEF, 673 kind: FN,
674 container_name: None, 674 container_name: None,
675 description: None, 675 description: None,
676 docs: None, 676 docs: None,
@@ -695,7 +695,7 @@ mod root_tests {
695 163..177, 695 163..177,
696 ), 696 ),
697 name: "nested_test_12", 697 name: "nested_test_12",
698 kind: FN_DEF, 698 kind: FN,
699 container_name: None, 699 container_name: None,
700 description: None, 700 description: None,
701 docs: None, 701 docs: None,
@@ -740,7 +740,7 @@ mod root_tests {
740 258..271, 740 258..271,
741 ), 741 ),
742 name: "nested_test_2", 742 name: "nested_test_2",
743 kind: FN_DEF, 743 kind: FN,
744 container_name: None, 744 container_name: None,
745 description: None, 745 description: None,
746 docs: None, 746 docs: None,
@@ -783,7 +783,7 @@ fn test_foo1() {}
783 36..45, 783 36..45,
784 ), 784 ),
785 name: "test_foo1", 785 name: "test_foo1",
786 kind: FN_DEF, 786 kind: FN,
787 container_name: None, 787 container_name: None,
788 description: None, 788 description: None,
789 docs: None, 789 docs: None,
@@ -831,7 +831,7 @@ fn test_foo1() {}
831 58..67, 831 58..67,
832 ), 832 ),
833 name: "test_foo1", 833 name: "test_foo1",
834 kind: FN_DEF, 834 kind: FN,
835 container_name: None, 835 container_name: None,
836 description: None, 836 description: None,
837 docs: None, 837 docs: None,
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index d456d5d36..5198727d9 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -464,7 +464,7 @@ fn highlight_element(
464 let db = sema.db; 464 let db = sema.db;
465 let mut binding_hash = None; 465 let mut binding_hash = None;
466 let highlight: Highlight = match element.kind() { 466 let highlight: Highlight = match element.kind() {
467 FN_DEF => { 467 FN => {
468 bindings_shadow_count.clear(); 468 bindings_shadow_count.clear();
469 return None; 469 return None;
470 } 470 }
@@ -713,7 +713,7 @@ fn highlight_name_by_syntax(name: ast::Name) -> Highlight {
713 TYPE_PARAM => HighlightTag::TypeParam, 713 TYPE_PARAM => HighlightTag::TypeParam,
714 RECORD_FIELD_DEF => HighlightTag::Field, 714 RECORD_FIELD_DEF => HighlightTag::Field,
715 MODULE => HighlightTag::Module, 715 MODULE => HighlightTag::Module,
716 FN_DEF => HighlightTag::Function, 716 FN => HighlightTag::Function,
717 CONST_DEF => HighlightTag::Constant, 717 CONST_DEF => HighlightTag::Constant,
718 STATIC_DEF => HighlightTag::Static, 718 STATIC_DEF => HighlightTag::Static,
719 ENUM_VARIANT => HighlightTag::EnumVariant, 719 ENUM_VARIANT => HighlightTag::EnumVariant,
diff --git a/crates/ra_ide/src/syntax_tree.rs b/crates/ra_ide/src/syntax_tree.rs
index f716a3861..07217e808 100644
--- a/crates/ra_ide/src/syntax_tree.rs
+++ b/crates/ra_ide/src/syntax_tree.rs
@@ -116,7 +116,7 @@ mod tests {
116 syn.trim(), 116 syn.trim(),
117 r#" 117 r#"
118[email protected] 118[email protected]
119 FN_DEF@0..11 119 [email protected]
120 [email protected] "fn" 120 [email protected] "fn"
121 [email protected] " " 121 [email protected] " "
122 [email protected] 122 [email protected]
@@ -148,7 +148,7 @@ fn test() {
148 syn.trim(), 148 syn.trim(),
149 r#" 149 r#"
150[email protected] 150[email protected]
151 FN_DEF@0..60 151 [email protected]
152 [email protected] "fn" 152 [email protected] "fn"
153 [email protected] " " 153 [email protected] " "
154 [email protected] 154 [email protected]
@@ -190,7 +190,7 @@ [email protected]
190 assert_eq_text!( 190 assert_eq_text!(
191 syn.trim(), 191 syn.trim(),
192 r#" 192 r#"
193FN_DEF@0..11 193[email protected]
194 [email protected] "fn" 194 [email protected] "fn"
195 [email protected] " " 195 [email protected] " "
196 [email protected] 196 [email protected]
@@ -258,7 +258,7 @@ fn bar() {
258 syn.trim(), 258 syn.trim(),
259 r#" 259 r#"
260[email protected] 260[email protected]
261 FN_DEF@0..12 261 [email protected]
262 [email protected] "fn" 262 [email protected] "fn"
263 [email protected] " " 263 [email protected] " "
264 [email protected] 264 [email protected]
@@ -292,7 +292,7 @@ fn bar() {
292 syn.trim(), 292 syn.trim(),
293 r#" 293 r#"
294[email protected] 294[email protected]
295 FN_DEF@0..12 295 [email protected]
296 [email protected] "fn" 296 [email protected] "fn"
297 [email protected] " " 297 [email protected] " "
298 [email protected] 298 [email protected]
@@ -325,7 +325,7 @@ fn bar() {
325 syn.trim(), 325 syn.trim(),
326 r#" 326 r#"
327[email protected] 327[email protected]
328 FN_DEF@0..12 328 [email protected]
329 [email protected] "fn" 329 [email protected] "fn"
330 [email protected] " " 330 [email protected] " "
331 [email protected] 331 [email protected]
@@ -339,7 +339,7 @@ [email protected]
339 [email protected] "\n" 339 [email protected] "\n"
340 [email protected] "}" 340 [email protected] "}"
341 [email protected] "\n" 341 [email protected] "\n"
342 FN_DEF@13..25 342 [email protected]
343 [email protected] "fn" 343 [email protected] "fn"
344 [email protected] " " 344 [email protected] " "
345 [email protected] 345 [email protected]
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs
index 1464c5f2a..234d3175a 100644
--- a/crates/ra_ide_db/src/defs.rs
+++ b/crates/ra_ide_db/src/defs.rs
@@ -174,7 +174,7 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option
174 let def: hir::EnumVariant = sema.to_def(&it)?; 174 let def: hir::EnumVariant = sema.to_def(&it)?;
175 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 175 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
176 }, 176 },
177 ast::FnDef(it) => { 177 ast::Fn(it) => {
178 let def: hir::Function = sema.to_def(&it)?; 178 let def: hir::Function = sema.to_def(&it)?;
179 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 179 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
180 }, 180 },
diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs
index 131e2a128..c6e1ad432 100644
--- a/crates/ra_ide_db/src/symbol_index.rs
+++ b/crates/ra_ide_db/src/symbol_index.rs
@@ -397,7 +397,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> {
397 } 397 }
398 match_ast! { 398 match_ast! {
399 match node { 399 match node {
400 ast::FnDef(it) => decl(it), 400 ast::Fn(it) => decl(it),
401 ast::StructDef(it) => decl(it), 401 ast::StructDef(it) => decl(it),
402 ast::EnumDef(it) => decl(it), 402 ast::EnumDef(it) => decl(it),
403 ast::TraitDef(it) => decl(it), 403 ast::TraitDef(it) => decl(it),
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs
index c43003fd6..220690cdd 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/ra_mbe/src/tests.rs
@@ -258,7 +258,7 @@ fn test_expr_order() {
258 assert_eq_text!( 258 assert_eq_text!(
259 dump.trim(), 259 dump.trim(),
260 r#"[email protected] 260 r#"[email protected]
261 FN_DEF@0..15 261 [email protected]
262 [email protected] "fn" 262 [email protected] "fn"
263 [email protected] 263 [email protected]
264 [email protected] "bar" 264 [email protected] "bar"
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs
index 3b73e5346..7f8a51ddb 100644
--- a/crates/ra_parser/src/grammar/items.rs
+++ b/crates/ra_parser/src/grammar/items.rs
@@ -180,7 +180,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul
180 // unsafe const fn bar() {} 180 // unsafe const fn bar() {}
181 T![fn] => { 181 T![fn] => {
182 fn_def(p); 182 fn_def(p);
183 m.complete(p, FN_DEF); 183 m.complete(p, FN);
184 } 184 }
185 185
186 // test unsafe_trait 186 // test unsafe_trait
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs
index 4f35e0baa..1390fa407 100644
--- a/crates/ra_parser/src/syntax_kind/generated.rs
+++ b/crates/ra_parser/src/syntax_kind/generated.rs
@@ -126,7 +126,7 @@ pub enum SyntaxKind {
126 STRUCT_DEF, 126 STRUCT_DEF,
127 UNION_DEF, 127 UNION_DEF,
128 ENUM_DEF, 128 ENUM_DEF,
129 FN_DEF, 129 FN,
130 RET_TYPE, 130 RET_TYPE,
131 EXTERN_CRATE, 131 EXTERN_CRATE,
132 MODULE, 132 MODULE,
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index 6ebe10ff6..4a67fd44a 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -29,9 +29,9 @@ impl ast::BinExpr {
29 } 29 }
30} 30}
31 31
32impl ast::FnDef { 32impl ast::Fn {
33 #[must_use] 33 #[must_use]
34 pub fn with_body(&self, body: ast::BlockExpr) -> ast::FnDef { 34 pub fn with_body(&self, body: ast::BlockExpr) -> ast::Fn {
35 let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new(); 35 let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new();
36 let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() { 36 let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() {
37 old_body.syntax().clone().into() 37 old_body.syntax().clone().into()
diff --git a/crates/ra_syntax/src/ast/expr_ext.rs b/crates/ra_syntax/src/ast/expr_ext.rs
index 69c85c809..8692b9bb5 100644
--- a/crates/ra_syntax/src/ast/expr_ext.rs
+++ b/crates/ra_syntax/src/ast/expr_ext.rs
@@ -401,7 +401,7 @@ impl ast::BlockExpr {
401 Some(it) => it, 401 Some(it) => it,
402 None => return true, 402 None => return true,
403 }; 403 };
404 !matches!(parent.kind(), FN_DEF | IF_EXPR | WHILE_EXPR | LOOP_EXPR | EFFECT_EXPR) 404 !matches!(parent.kind(), FN | IF_EXPR | WHILE_EXPR | LOOP_EXPR | EFFECT_EXPR)
405 } 405 }
406} 406}
407 407
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index be657699f..4fc35585d 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -79,19 +79,19 @@ impl ExternCrate {
79 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 79 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
80} 80}
81#[derive(Debug, Clone, PartialEq, Eq, Hash)] 81#[derive(Debug, Clone, PartialEq, Eq, Hash)]
82pub struct FnDef { 82pub struct Fn {
83 pub(crate) syntax: SyntaxNode, 83 pub(crate) syntax: SyntaxNode,
84} 84}
85impl ast::AttrsOwner for FnDef {} 85impl ast::AttrsOwner for Fn {}
86impl ast::NameOwner for FnDef {} 86impl ast::NameOwner for Fn {}
87impl ast::VisibilityOwner for FnDef {} 87impl ast::VisibilityOwner for Fn {}
88impl ast::TypeParamsOwner for FnDef {} 88impl ast::TypeParamsOwner for Fn {}
89impl FnDef { 89impl Fn {
90 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
91 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
92 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } 90 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
93 pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) } 91 pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
92 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
94 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } 93 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
94 pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
95 pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) } 95 pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
96 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } 96 pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
97 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } 97 pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
@@ -303,7 +303,9 @@ impl UseTreeList {
303pub struct Abi { 303pub struct Abi {
304 pub(crate) syntax: SyntaxNode, 304 pub(crate) syntax: SyntaxNode,
305} 305}
306impl Abi {} 306impl Abi {
307 pub fn extern_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![extern]) }
308}
307#[derive(Debug, Clone, PartialEq, Eq, Hash)] 309#[derive(Debug, Clone, PartialEq, Eq, Hash)]
308pub struct TypeParamList { 310pub struct TypeParamList {
309 pub(crate) syntax: SyntaxNode, 311 pub(crate) syntax: SyntaxNode,
@@ -321,8 +323,9 @@ pub struct ParamList {
321} 323}
322impl ParamList { 324impl ParamList {
323 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } 325 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
324 pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) }
325 pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) } 326 pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) }
327 pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) }
328 pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
326 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 329 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
327} 330}
328#[derive(Debug, Clone, PartialEq, Eq, Hash)] 331#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -355,6 +358,32 @@ impl BlockExpr {
355 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 358 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
356} 359}
357#[derive(Debug, Clone, PartialEq, Eq, Hash)] 360#[derive(Debug, Clone, PartialEq, Eq, Hash)]
361pub struct Param {
362 pub(crate) syntax: SyntaxNode,
363}
364impl ast::AttrsOwner for Param {}
365impl ast::TypeAscriptionOwner for Param {}
366impl Param {
367 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
368 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
369 pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) }
370}
371#[derive(Debug, Clone, PartialEq, Eq, Hash)]
372pub struct SelfParam {
373 pub(crate) syntax: SyntaxNode,
374}
375impl ast::AttrsOwner for SelfParam {}
376impl ast::TypeAscriptionOwner for SelfParam {}
377impl SelfParam {
378 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
379 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
380 support::token(&self.syntax, T![lifetime])
381 }
382 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
383 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
384 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
385}
386#[derive(Debug, Clone, PartialEq, Eq, Hash)]
358pub struct RecordFieldDefList { 387pub struct RecordFieldDefList {
359 pub(crate) syntax: SyntaxNode, 388 pub(crate) syntax: SyntaxNode,
360} 389}
@@ -1173,32 +1202,6 @@ impl LetStmt {
1173 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 1202 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1174} 1203}
1175#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1204#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1176pub struct SelfParam {
1177 pub(crate) syntax: SyntaxNode,
1178}
1179impl ast::AttrsOwner for SelfParam {}
1180impl ast::TypeAscriptionOwner for SelfParam {}
1181impl SelfParam {
1182 pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1183 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
1184 support::token(&self.syntax, T![lifetime])
1185 }
1186 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1187 pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
1188 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1189}
1190#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1191pub struct Param {
1192 pub(crate) syntax: SyntaxNode,
1193}
1194impl ast::AttrsOwner for Param {}
1195impl ast::TypeAscriptionOwner for Param {}
1196impl Param {
1197 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1198 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1199 pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) }
1200}
1201#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1202pub struct PathSegment { 1205pub struct PathSegment {
1203 pub(crate) syntax: SyntaxNode, 1206 pub(crate) syntax: SyntaxNode,
1204} 1207}
@@ -1274,7 +1277,7 @@ pub enum Item {
1274 EnumDef(EnumDef), 1277 EnumDef(EnumDef),
1275 ExternBlock(ExternBlock), 1278 ExternBlock(ExternBlock),
1276 ExternCrate(ExternCrate), 1279 ExternCrate(ExternCrate),
1277 FnDef(FnDef), 1280 Fn(Fn),
1278 ImplDef(ImplDef), 1281 ImplDef(ImplDef),
1279 MacroCall(MacroCall), 1282 MacroCall(MacroCall),
1280 Module(Module), 1283 Module(Module),
@@ -1303,6 +1306,24 @@ pub enum TypeRef {
1303 DynTraitType(DynTraitType), 1306 DynTraitType(DynTraitType),
1304} 1307}
1305#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1308#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1309pub enum Pat {
1310 OrPat(OrPat),
1311 ParenPat(ParenPat),
1312 RefPat(RefPat),
1313 BoxPat(BoxPat),
1314 BindPat(BindPat),
1315 PlaceholderPat(PlaceholderPat),
1316 DotDotPat(DotDotPat),
1317 PathPat(PathPat),
1318 RecordPat(RecordPat),
1319 TupleStructPat(TupleStructPat),
1320 TuplePat(TuplePat),
1321 SlicePat(SlicePat),
1322 RangePat(RangePat),
1323 LiteralPat(LiteralPat),
1324 MacroPat(MacroPat),
1325}
1326#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1306pub enum FieldDefList { 1327pub enum FieldDefList {
1307 RecordFieldDefList(RecordFieldDefList), 1328 RecordFieldDefList(RecordFieldDefList),
1308 TupleFieldDefList(TupleFieldDefList), 1329 TupleFieldDefList(TupleFieldDefList),
@@ -1343,7 +1364,7 @@ pub enum Expr {
1343} 1364}
1344#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1365#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1345pub enum AssocItem { 1366pub enum AssocItem {
1346 FnDef(FnDef), 1367 Fn(Fn),
1347 TypeAliasDef(TypeAliasDef), 1368 TypeAliasDef(TypeAliasDef),
1348 ConstDef(ConstDef), 1369 ConstDef(ConstDef),
1349 MacroCall(MacroCall), 1370 MacroCall(MacroCall),
@@ -1351,24 +1372,6 @@ pub enum AssocItem {
1351impl ast::AttrsOwner for AssocItem {} 1372impl ast::AttrsOwner for AssocItem {}
1352impl ast::NameOwner for AssocItem {} 1373impl ast::NameOwner for AssocItem {}
1353#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1374#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1354pub enum Pat {
1355 OrPat(OrPat),
1356 ParenPat(ParenPat),
1357 RefPat(RefPat),
1358 BoxPat(BoxPat),
1359 BindPat(BindPat),
1360 PlaceholderPat(PlaceholderPat),
1361 DotDotPat(DotDotPat),
1362 PathPat(PathPat),
1363 RecordPat(RecordPat),
1364 TupleStructPat(TupleStructPat),
1365 TuplePat(TuplePat),
1366 SlicePat(SlicePat),
1367 RangePat(RangePat),
1368 LiteralPat(LiteralPat),
1369 MacroPat(MacroPat),
1370}
1371#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1372pub enum Stmt { 1375pub enum Stmt {
1373 LetStmt(LetStmt), 1376 LetStmt(LetStmt),
1374 ExprStmt(ExprStmt), 1377 ExprStmt(ExprStmt),
@@ -1381,7 +1384,7 @@ pub enum AttrInput {
1381} 1384}
1382#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1385#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1383pub enum ExternItem { 1386pub enum ExternItem {
1384 FnDef(FnDef), 1387 Fn(Fn),
1385 StaticDef(StaticDef), 1388 StaticDef(StaticDef),
1386} 1389}
1387impl ast::AttrsOwner for ExternItem {} 1390impl ast::AttrsOwner for ExternItem {}
@@ -1463,8 +1466,8 @@ impl AstNode for ExternCrate {
1463 } 1466 }
1464 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1467 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1465} 1468}
1466impl AstNode for FnDef { 1469impl AstNode for Fn {
1467 fn can_cast(kind: SyntaxKind) -> bool { kind == FN_DEF } 1470 fn can_cast(kind: SyntaxKind) -> bool { kind == FN }
1468 fn cast(syntax: SyntaxNode) -> Option<Self> { 1471 fn cast(syntax: SyntaxNode) -> Option<Self> {
1469 if Self::can_cast(syntax.kind()) { 1472 if Self::can_cast(syntax.kind()) {
1470 Some(Self { syntax }) 1473 Some(Self { syntax })
@@ -1727,6 +1730,28 @@ impl AstNode for BlockExpr {
1727 } 1730 }
1728 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1731 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1729} 1732}
1733impl AstNode for Param {
1734 fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM }
1735 fn cast(syntax: SyntaxNode) -> Option<Self> {
1736 if Self::can_cast(syntax.kind()) {
1737 Some(Self { syntax })
1738 } else {
1739 None
1740 }
1741 }
1742 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1743}
1744impl AstNode for SelfParam {
1745 fn can_cast(kind: SyntaxKind) -> bool { kind == SELF_PARAM }
1746 fn cast(syntax: SyntaxNode) -> Option<Self> {
1747 if Self::can_cast(syntax.kind()) {
1748 Some(Self { syntax })
1749 } else {
1750 None
1751 }
1752 }
1753 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1754}
1730impl AstNode for RecordFieldDefList { 1755impl AstNode for RecordFieldDefList {
1731 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF_LIST } 1756 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF_LIST }
1732 fn cast(syntax: SyntaxNode) -> Option<Self> { 1757 fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -2673,28 +2698,6 @@ impl AstNode for LetStmt {
2673 } 2698 }
2674 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2699 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2675} 2700}
2676impl AstNode for SelfParam {
2677 fn can_cast(kind: SyntaxKind) -> bool { kind == SELF_PARAM }
2678 fn cast(syntax: SyntaxNode) -> Option<Self> {
2679 if Self::can_cast(syntax.kind()) {
2680 Some(Self { syntax })
2681 } else {
2682 None
2683 }
2684 }
2685 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2686}
2687impl AstNode for Param {
2688 fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM }
2689 fn cast(syntax: SyntaxNode) -> Option<Self> {
2690 if Self::can_cast(syntax.kind()) {
2691 Some(Self { syntax })
2692 } else {
2693 None
2694 }
2695 }
2696 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2697}
2698impl AstNode for PathSegment { 2701impl AstNode for PathSegment {
2699 fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT } 2702 fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT }
2700 fn cast(syntax: SyntaxNode) -> Option<Self> { 2703 fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -2784,8 +2787,8 @@ impl From<ExternBlock> for Item {
2784impl From<ExternCrate> for Item { 2787impl From<ExternCrate> for Item {
2785 fn from(node: ExternCrate) -> Item { Item::ExternCrate(node) } 2788 fn from(node: ExternCrate) -> Item { Item::ExternCrate(node) }
2786} 2789}
2787impl From<FnDef> for Item { 2790impl From<Fn> for Item {
2788 fn from(node: FnDef) -> Item { Item::FnDef(node) } 2791 fn from(node: Fn) -> Item { Item::Fn(node) }
2789} 2792}
2790impl From<ImplDef> for Item { 2793impl From<ImplDef> for Item {
2791 fn from(node: ImplDef) -> Item { Item::ImplDef(node) } 2794 fn from(node: ImplDef) -> Item { Item::ImplDef(node) }
@@ -2817,7 +2820,7 @@ impl From<Use> for Item {
2817impl AstNode for Item { 2820impl AstNode for Item {
2818 fn can_cast(kind: SyntaxKind) -> bool { 2821 fn can_cast(kind: SyntaxKind) -> bool {
2819 match kind { 2822 match kind {
2820 CONST_DEF | ENUM_DEF | EXTERN_BLOCK | EXTERN_CRATE | FN_DEF | IMPL_DEF | MACRO_CALL 2823 CONST_DEF | ENUM_DEF | EXTERN_BLOCK | EXTERN_CRATE | FN | IMPL_DEF | MACRO_CALL
2821 | MODULE | STATIC_DEF | STRUCT_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | UNION_DEF | USE => { 2824 | MODULE | STATIC_DEF | STRUCT_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | UNION_DEF | USE => {
2822 true 2825 true
2823 } 2826 }
@@ -2830,7 +2833,7 @@ impl AstNode for Item {
2830 ENUM_DEF => Item::EnumDef(EnumDef { syntax }), 2833 ENUM_DEF => Item::EnumDef(EnumDef { syntax }),
2831 EXTERN_BLOCK => Item::ExternBlock(ExternBlock { syntax }), 2834 EXTERN_BLOCK => Item::ExternBlock(ExternBlock { syntax }),
2832 EXTERN_CRATE => Item::ExternCrate(ExternCrate { syntax }), 2835 EXTERN_CRATE => Item::ExternCrate(ExternCrate { syntax }),
2833 FN_DEF => Item::FnDef(FnDef { syntax }), 2836 FN => Item::Fn(Fn { syntax }),
2834 IMPL_DEF => Item::ImplDef(ImplDef { syntax }), 2837 IMPL_DEF => Item::ImplDef(ImplDef { syntax }),
2835 MACRO_CALL => Item::MacroCall(MacroCall { syntax }), 2838 MACRO_CALL => Item::MacroCall(MacroCall { syntax }),
2836 MODULE => Item::Module(Module { syntax }), 2839 MODULE => Item::Module(Module { syntax }),
@@ -2850,7 +2853,7 @@ impl AstNode for Item {
2850 Item::EnumDef(it) => &it.syntax, 2853 Item::EnumDef(it) => &it.syntax,
2851 Item::ExternBlock(it) => &it.syntax, 2854 Item::ExternBlock(it) => &it.syntax,
2852 Item::ExternCrate(it) => &it.syntax, 2855 Item::ExternCrate(it) => &it.syntax,
2853 Item::FnDef(it) => &it.syntax, 2856 Item::Fn(it) => &it.syntax,
2854 Item::ImplDef(it) => &it.syntax, 2857 Item::ImplDef(it) => &it.syntax,
2855 Item::MacroCall(it) => &it.syntax, 2858 Item::MacroCall(it) => &it.syntax,
2856 Item::Module(it) => &it.syntax, 2859 Item::Module(it) => &it.syntax,
@@ -2948,6 +2951,101 @@ impl AstNode for TypeRef {
2948 } 2951 }
2949 } 2952 }
2950} 2953}
2954impl From<OrPat> for Pat {
2955 fn from(node: OrPat) -> Pat { Pat::OrPat(node) }
2956}
2957impl From<ParenPat> for Pat {
2958 fn from(node: ParenPat) -> Pat { Pat::ParenPat(node) }
2959}
2960impl From<RefPat> for Pat {
2961 fn from(node: RefPat) -> Pat { Pat::RefPat(node) }
2962}
2963impl From<BoxPat> for Pat {
2964 fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
2965}
2966impl From<BindPat> for Pat {
2967 fn from(node: BindPat) -> Pat { Pat::BindPat(node) }
2968}
2969impl From<PlaceholderPat> for Pat {
2970 fn from(node: PlaceholderPat) -> Pat { Pat::PlaceholderPat(node) }
2971}
2972impl From<DotDotPat> for Pat {
2973 fn from(node: DotDotPat) -> Pat { Pat::DotDotPat(node) }
2974}
2975impl From<PathPat> for Pat {
2976 fn from(node: PathPat) -> Pat { Pat::PathPat(node) }
2977}
2978impl From<RecordPat> for Pat {
2979 fn from(node: RecordPat) -> Pat { Pat::RecordPat(node) }
2980}
2981impl From<TupleStructPat> for Pat {
2982 fn from(node: TupleStructPat) -> Pat { Pat::TupleStructPat(node) }
2983}
2984impl From<TuplePat> for Pat {
2985 fn from(node: TuplePat) -> Pat { Pat::TuplePat(node) }
2986}
2987impl From<SlicePat> for Pat {
2988 fn from(node: SlicePat) -> Pat { Pat::SlicePat(node) }
2989}
2990impl From<RangePat> for Pat {
2991 fn from(node: RangePat) -> Pat { Pat::RangePat(node) }
2992}
2993impl From<LiteralPat> for Pat {
2994 fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) }
2995}
2996impl From<MacroPat> for Pat {
2997 fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) }
2998}
2999impl AstNode for Pat {
3000 fn can_cast(kind: SyntaxKind) -> bool {
3001 match kind {
3002 OR_PAT | PAREN_PAT | REF_PAT | BOX_PAT | BIND_PAT | PLACEHOLDER_PAT | DOT_DOT_PAT
3003 | PATH_PAT | RECORD_PAT | TUPLE_STRUCT_PAT | TUPLE_PAT | SLICE_PAT | RANGE_PAT
3004 | LITERAL_PAT | MACRO_PAT => true,
3005 _ => false,
3006 }
3007 }
3008 fn cast(syntax: SyntaxNode) -> Option<Self> {
3009 let res = match syntax.kind() {
3010 OR_PAT => Pat::OrPat(OrPat { syntax }),
3011 PAREN_PAT => Pat::ParenPat(ParenPat { syntax }),
3012 REF_PAT => Pat::RefPat(RefPat { syntax }),
3013 BOX_PAT => Pat::BoxPat(BoxPat { syntax }),
3014 BIND_PAT => Pat::BindPat(BindPat { syntax }),
3015 PLACEHOLDER_PAT => Pat::PlaceholderPat(PlaceholderPat { syntax }),
3016 DOT_DOT_PAT => Pat::DotDotPat(DotDotPat { syntax }),
3017 PATH_PAT => Pat::PathPat(PathPat { syntax }),
3018 RECORD_PAT => Pat::RecordPat(RecordPat { syntax }),
3019 TUPLE_STRUCT_PAT => Pat::TupleStructPat(TupleStructPat { syntax }),
3020 TUPLE_PAT => Pat::TuplePat(TuplePat { syntax }),
3021 SLICE_PAT => Pat::SlicePat(SlicePat { syntax }),
3022 RANGE_PAT => Pat::RangePat(RangePat { syntax }),
3023 LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }),
3024 MACRO_PAT => Pat::MacroPat(MacroPat { syntax }),
3025 _ => return None,
3026 };
3027 Some(res)
3028 }
3029 fn syntax(&self) -> &SyntaxNode {
3030 match self {
3031 Pat::OrPat(it) => &it.syntax,
3032 Pat::ParenPat(it) => &it.syntax,
3033 Pat::RefPat(it) => &it.syntax,
3034 Pat::BoxPat(it) => &it.syntax,
3035 Pat::BindPat(it) => &it.syntax,
3036 Pat::PlaceholderPat(it) => &it.syntax,
3037 Pat::DotDotPat(it) => &it.syntax,
3038 Pat::PathPat(it) => &it.syntax,
3039 Pat::RecordPat(it) => &it.syntax,
3040 Pat::TupleStructPat(it) => &it.syntax,
3041 Pat::TuplePat(it) => &it.syntax,
3042 Pat::SlicePat(it) => &it.syntax,
3043 Pat::RangePat(it) => &it.syntax,
3044 Pat::LiteralPat(it) => &it.syntax,
3045 Pat::MacroPat(it) => &it.syntax,
3046 }
3047 }
3048}
2951impl From<RecordFieldDefList> for FieldDefList { 3049impl From<RecordFieldDefList> for FieldDefList {
2952 fn from(node: RecordFieldDefList) -> FieldDefList { FieldDefList::RecordFieldDefList(node) } 3050 fn from(node: RecordFieldDefList) -> FieldDefList { FieldDefList::RecordFieldDefList(node) }
2953} 3051}
@@ -3157,8 +3255,8 @@ impl AstNode for Expr {
3157 } 3255 }
3158 } 3256 }
3159} 3257}
3160impl From<FnDef> for AssocItem { 3258impl From<Fn> for AssocItem {
3161 fn from(node: FnDef) -> AssocItem { AssocItem::FnDef(node) } 3259 fn from(node: Fn) -> AssocItem { AssocItem::Fn(node) }
3162} 3260}
3163impl From<TypeAliasDef> for AssocItem { 3261impl From<TypeAliasDef> for AssocItem {
3164 fn from(node: TypeAliasDef) -> AssocItem { AssocItem::TypeAliasDef(node) } 3262 fn from(node: TypeAliasDef) -> AssocItem { AssocItem::TypeAliasDef(node) }
@@ -3172,13 +3270,13 @@ impl From<MacroCall> for AssocItem {
3172impl AstNode for AssocItem { 3270impl AstNode for AssocItem {
3173 fn can_cast(kind: SyntaxKind) -> bool { 3271 fn can_cast(kind: SyntaxKind) -> bool {
3174 match kind { 3272 match kind {
3175 FN_DEF | TYPE_ALIAS_DEF | CONST_DEF | MACRO_CALL => true, 3273 FN | TYPE_ALIAS_DEF | CONST_DEF | MACRO_CALL => true,
3176 _ => false, 3274 _ => false,
3177 } 3275 }
3178 } 3276 }
3179 fn cast(syntax: SyntaxNode) -> Option<Self> { 3277 fn cast(syntax: SyntaxNode) -> Option<Self> {
3180 let res = match syntax.kind() { 3278 let res = match syntax.kind() {
3181 FN_DEF => AssocItem::FnDef(FnDef { syntax }), 3279 FN => AssocItem::Fn(Fn { syntax }),
3182 TYPE_ALIAS_DEF => AssocItem::TypeAliasDef(TypeAliasDef { syntax }), 3280 TYPE_ALIAS_DEF => AssocItem::TypeAliasDef(TypeAliasDef { syntax }),
3183 CONST_DEF => AssocItem::ConstDef(ConstDef { syntax }), 3281 CONST_DEF => AssocItem::ConstDef(ConstDef { syntax }),
3184 MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }), 3282 MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }),
@@ -3188,108 +3286,13 @@ impl AstNode for AssocItem {
3188 } 3286 }
3189 fn syntax(&self) -> &SyntaxNode { 3287 fn syntax(&self) -> &SyntaxNode {
3190 match self { 3288 match self {
3191 AssocItem::FnDef(it) => &it.syntax, 3289 AssocItem::Fn(it) => &it.syntax,
3192 AssocItem::TypeAliasDef(it) => &it.syntax, 3290 AssocItem::TypeAliasDef(it) => &it.syntax,
3193 AssocItem::ConstDef(it) => &it.syntax, 3291 AssocItem::ConstDef(it) => &it.syntax,
3194 AssocItem::MacroCall(it) => &it.syntax, 3292 AssocItem::MacroCall(it) => &it.syntax,
3195 } 3293 }
3196 } 3294 }
3197} 3295}
3198impl From<OrPat> for Pat {
3199 fn from(node: OrPat) -> Pat { Pat::OrPat(node) }
3200}
3201impl From<ParenPat> for Pat {
3202 fn from(node: ParenPat) -> Pat { Pat::ParenPat(node) }
3203}
3204impl From<RefPat> for Pat {
3205 fn from(node: RefPat) -> Pat { Pat::RefPat(node) }
3206}
3207impl From<BoxPat> for Pat {
3208 fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
3209}
3210impl From<BindPat> for Pat {
3211 fn from(node: BindPat) -> Pat { Pat::BindPat(node) }
3212}
3213impl From<PlaceholderPat> for Pat {
3214 fn from(node: PlaceholderPat) -> Pat { Pat::PlaceholderPat(node) }
3215}
3216impl From<DotDotPat> for Pat {
3217 fn from(node: DotDotPat) -> Pat { Pat::DotDotPat(node) }
3218}
3219impl From<PathPat> for Pat {
3220 fn from(node: PathPat) -> Pat { Pat::PathPat(node) }
3221}
3222impl From<RecordPat> for Pat {
3223 fn from(node: RecordPat) -> Pat { Pat::RecordPat(node) }
3224}
3225impl From<TupleStructPat> for Pat {
3226 fn from(node: TupleStructPat) -> Pat { Pat::TupleStructPat(node) }
3227}
3228impl From<TuplePat> for Pat {
3229 fn from(node: TuplePat) -> Pat { Pat::TuplePat(node) }
3230}
3231impl From<SlicePat> for Pat {
3232 fn from(node: SlicePat) -> Pat { Pat::SlicePat(node) }
3233}
3234impl From<RangePat> for Pat {
3235 fn from(node: RangePat) -> Pat { Pat::RangePat(node) }
3236}
3237impl From<LiteralPat> for Pat {
3238 fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) }
3239}
3240impl From<MacroPat> for Pat {
3241 fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) }
3242}
3243impl AstNode for Pat {
3244 fn can_cast(kind: SyntaxKind) -> bool {
3245 match kind {
3246 OR_PAT | PAREN_PAT | REF_PAT | BOX_PAT | BIND_PAT | PLACEHOLDER_PAT | DOT_DOT_PAT
3247 | PATH_PAT | RECORD_PAT | TUPLE_STRUCT_PAT | TUPLE_PAT | SLICE_PAT | RANGE_PAT
3248 | LITERAL_PAT | MACRO_PAT => true,
3249 _ => false,
3250 }
3251 }
3252 fn cast(syntax: SyntaxNode) -> Option<Self> {
3253 let res = match syntax.kind() {
3254 OR_PAT => Pat::OrPat(OrPat { syntax }),
3255 PAREN_PAT => Pat::ParenPat(ParenPat { syntax }),
3256 REF_PAT => Pat::RefPat(RefPat { syntax }),
3257 BOX_PAT => Pat::BoxPat(BoxPat { syntax }),
3258 BIND_PAT => Pat::BindPat(BindPat { syntax }),
3259 PLACEHOLDER_PAT => Pat::PlaceholderPat(PlaceholderPat { syntax }),
3260 DOT_DOT_PAT => Pat::DotDotPat(DotDotPat { syntax }),
3261 PATH_PAT => Pat::PathPat(PathPat { syntax }),
3262 RECORD_PAT => Pat::RecordPat(RecordPat { syntax }),
3263 TUPLE_STRUCT_PAT => Pat::TupleStructPat(TupleStructPat { syntax }),
3264 TUPLE_PAT => Pat::TuplePat(TuplePat { syntax }),
3265 SLICE_PAT => Pat::SlicePat(SlicePat { syntax }),
3266 RANGE_PAT => Pat::RangePat(RangePat { syntax }),
3267 LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }),
3268 MACRO_PAT => Pat::MacroPat(MacroPat { syntax }),
3269 _ => return None,
3270 };
3271 Some(res)
3272 }
3273 fn syntax(&self) -> &SyntaxNode {
3274 match self {
3275 Pat::OrPat(it) => &it.syntax,
3276 Pat::ParenPat(it) => &it.syntax,
3277 Pat::RefPat(it) => &it.syntax,
3278 Pat::BoxPat(it) => &it.syntax,
3279 Pat::BindPat(it) => &it.syntax,
3280 Pat::PlaceholderPat(it) => &it.syntax,
3281 Pat::DotDotPat(it) => &it.syntax,
3282 Pat::PathPat(it) => &it.syntax,
3283 Pat::RecordPat(it) => &it.syntax,
3284 Pat::TupleStructPat(it) => &it.syntax,
3285 Pat::TuplePat(it) => &it.syntax,
3286 Pat::SlicePat(it) => &it.syntax,
3287 Pat::RangePat(it) => &it.syntax,
3288 Pat::LiteralPat(it) => &it.syntax,
3289 Pat::MacroPat(it) => &it.syntax,
3290 }
3291 }
3292}
3293impl From<LetStmt> for Stmt { 3296impl From<LetStmt> for Stmt {
3294 fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) } 3297 fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) }
3295} 3298}
@@ -3346,8 +3349,8 @@ impl AstNode for AttrInput {
3346 } 3349 }
3347 } 3350 }
3348} 3351}
3349impl From<FnDef> for ExternItem { 3352impl From<Fn> for ExternItem {
3350 fn from(node: FnDef) -> ExternItem { ExternItem::FnDef(node) } 3353 fn from(node: Fn) -> ExternItem { ExternItem::Fn(node) }
3351} 3354}
3352impl From<StaticDef> for ExternItem { 3355impl From<StaticDef> for ExternItem {
3353 fn from(node: StaticDef) -> ExternItem { ExternItem::StaticDef(node) } 3356 fn from(node: StaticDef) -> ExternItem { ExternItem::StaticDef(node) }
@@ -3355,13 +3358,13 @@ impl From<StaticDef> for ExternItem {
3355impl AstNode for ExternItem { 3358impl AstNode for ExternItem {
3356 fn can_cast(kind: SyntaxKind) -> bool { 3359 fn can_cast(kind: SyntaxKind) -> bool {
3357 match kind { 3360 match kind {
3358 FN_DEF | STATIC_DEF => true, 3361 FN | STATIC_DEF => true,
3359 _ => false, 3362 _ => false,
3360 } 3363 }
3361 } 3364 }
3362 fn cast(syntax: SyntaxNode) -> Option<Self> { 3365 fn cast(syntax: SyntaxNode) -> Option<Self> {
3363 let res = match syntax.kind() { 3366 let res = match syntax.kind() {
3364 FN_DEF => ExternItem::FnDef(FnDef { syntax }), 3367 FN => ExternItem::Fn(Fn { syntax }),
3365 STATIC_DEF => ExternItem::StaticDef(StaticDef { syntax }), 3368 STATIC_DEF => ExternItem::StaticDef(StaticDef { syntax }),
3366 _ => return None, 3369 _ => return None,
3367 }; 3370 };
@@ -3369,7 +3372,7 @@ impl AstNode for ExternItem {
3369 } 3372 }
3370 fn syntax(&self) -> &SyntaxNode { 3373 fn syntax(&self) -> &SyntaxNode {
3371 match self { 3374 match self {
3372 ExternItem::FnDef(it) => &it.syntax, 3375 ExternItem::Fn(it) => &it.syntax,
3373 ExternItem::StaticDef(it) => &it.syntax, 3376 ExternItem::StaticDef(it) => &it.syntax,
3374 } 3377 }
3375 } 3378 }
@@ -3417,22 +3420,22 @@ impl std::fmt::Display for TypeRef {
3417 std::fmt::Display::fmt(self.syntax(), f) 3420 std::fmt::Display::fmt(self.syntax(), f)
3418 } 3421 }
3419} 3422}
3420impl std::fmt::Display for FieldDefList { 3423impl std::fmt::Display for Pat {
3421 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3424 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3422 std::fmt::Display::fmt(self.syntax(), f) 3425 std::fmt::Display::fmt(self.syntax(), f)
3423 } 3426 }
3424} 3427}
3425impl std::fmt::Display for Expr { 3428impl std::fmt::Display for FieldDefList {
3426 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3429 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3427 std::fmt::Display::fmt(self.syntax(), f) 3430 std::fmt::Display::fmt(self.syntax(), f)
3428 } 3431 }
3429} 3432}
3430impl std::fmt::Display for AssocItem { 3433impl std::fmt::Display for Expr {
3431 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3434 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3432 std::fmt::Display::fmt(self.syntax(), f) 3435 std::fmt::Display::fmt(self.syntax(), f)
3433 } 3436 }
3434} 3437}
3435impl std::fmt::Display for Pat { 3438impl std::fmt::Display for AssocItem {
3436 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3439 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3437 std::fmt::Display::fmt(self.syntax(), f) 3440 std::fmt::Display::fmt(self.syntax(), f)
3438 } 3441 }
@@ -3487,7 +3490,7 @@ impl std::fmt::Display for ExternCrate {
3487 std::fmt::Display::fmt(self.syntax(), f) 3490 std::fmt::Display::fmt(self.syntax(), f)
3488 } 3491 }
3489} 3492}
3490impl std::fmt::Display for FnDef { 3493impl std::fmt::Display for Fn {
3491 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3494 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3492 std::fmt::Display::fmt(self.syntax(), f) 3495 std::fmt::Display::fmt(self.syntax(), f)
3493 } 3496 }
@@ -3607,6 +3610,16 @@ impl std::fmt::Display for BlockExpr {
3607 std::fmt::Display::fmt(self.syntax(), f) 3610 std::fmt::Display::fmt(self.syntax(), f)
3608 } 3611 }
3609} 3612}
3613impl std::fmt::Display for Param {
3614 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3615 std::fmt::Display::fmt(self.syntax(), f)
3616 }
3617}
3618impl std::fmt::Display for SelfParam {
3619 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3620 std::fmt::Display::fmt(self.syntax(), f)
3621 }
3622}
3610impl std::fmt::Display for RecordFieldDefList { 3623impl std::fmt::Display for RecordFieldDefList {
3611 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3624 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3612 std::fmt::Display::fmt(self.syntax(), f) 3625 std::fmt::Display::fmt(self.syntax(), f)
@@ -4037,16 +4050,6 @@ impl std::fmt::Display for LetStmt {
4037 std::fmt::Display::fmt(self.syntax(), f) 4050 std::fmt::Display::fmt(self.syntax(), f)
4038 } 4051 }
4039} 4052}
4040impl std::fmt::Display for SelfParam {
4041 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4042 std::fmt::Display::fmt(self.syntax(), f)
4043 }
4044}
4045impl std::fmt::Display for Param {
4046 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4047 std::fmt::Display::fmt(self.syntax(), f)
4048 }
4049}
4050impl std::fmt::Display for PathSegment { 4053impl std::fmt::Display for PathSegment {
4051 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 4054 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4052 std::fmt::Display::fmt(self.syntax(), f) 4055 std::fmt::Display::fmt(self.syntax(), f)
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs
index 0ff69bc2d..ef235680f 100644
--- a/crates/ra_syntax/src/ast/make.rs
+++ b/crates/ra_syntax/src/ast/make.rs
@@ -294,7 +294,7 @@ pub fn fn_def(
294 type_params: Option<ast::TypeParamList>, 294 type_params: Option<ast::TypeParamList>,
295 params: ast::ParamList, 295 params: ast::ParamList,
296 body: ast::BlockExpr, 296 body: ast::BlockExpr,
297) -> ast::FnDef { 297) -> ast::Fn {
298 let type_params = 298 let type_params =
299 if let Some(type_params) = type_params { format!("<{}>", type_params) } else { "".into() }; 299 if let Some(type_params) = type_params { format!("<{}>", type_params) } else { "".into() };
300 let visibility = match visibility { 300 let visibility = match visibility {
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs
index 242900643..9fb6b7268 100644
--- a/crates/ra_syntax/src/ast/node_ext.rs
+++ b/crates/ra_syntax/src/ast/node_ext.rs
@@ -474,7 +474,7 @@ impl ast::TokenTree {
474} 474}
475 475
476impl ast::DocCommentsOwner for ast::SourceFile {} 476impl ast::DocCommentsOwner for ast::SourceFile {}
477impl ast::DocCommentsOwner for ast::FnDef {} 477impl ast::DocCommentsOwner for ast::Fn {}
478impl ast::DocCommentsOwner for ast::StructDef {} 478impl ast::DocCommentsOwner for ast::StructDef {}
479impl ast::DocCommentsOwner for ast::UnionDef {} 479impl ast::DocCommentsOwner for ast::UnionDef {}
480impl ast::DocCommentsOwner for ast::RecordFieldDef {} 480impl ast::DocCommentsOwner for ast::RecordFieldDef {}
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs
index 219dd0b07..6203b6206 100644
--- a/crates/ra_syntax/src/lib.rs
+++ b/crates/ra_syntax/src/lib.rs
@@ -255,11 +255,11 @@ fn api_walkthrough() {
255 let mut func = None; 255 let mut func = None;
256 for item in file.items() { 256 for item in file.items() {
257 match item { 257 match item {
258 ast::Item::FnDef(f) => func = Some(f), 258 ast::Item::Fn(f) => func = Some(f),
259 _ => unreachable!(), 259 _ => unreachable!(),
260 } 260 }
261 } 261 }
262 let func: ast::FnDef = func.unwrap(); 262 let func: ast::Fn = func.unwrap();
263 263
264 // Each AST node has a bunch of getters for children. All getters return 264 // Each AST node has a bunch of getters for children. All getters return
265 // `Option`s though, to account for incomplete code. Some getters are common 265 // `Option`s though, to account for incomplete code. Some getters are common
@@ -316,7 +316,7 @@ fn api_walkthrough() {
316 ); 316 );
317 317
318 // As well as some iterator helpers: 318 // As well as some iterator helpers:
319 let f = expr_syntax.ancestors().find_map(ast::FnDef::cast); 319 let f = expr_syntax.ancestors().find_map(ast::Fn::cast);
320 assert_eq!(f, Some(func)); 320 assert_eq!(f, Some(func));
321 assert!(expr_syntax.siblings_with_tokens(Direction::Next).any(|it| it.kind() == T!['}'])); 321 assert!(expr_syntax.siblings_with_tokens(Direction::Next).any(|it| it.kind() == T!['}']));
322 assert_eq!( 322 assert_eq!(
diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs
index c6b30a02a..2a0f95d15 100644
--- a/crates/ra_syntax/src/parsing/text_tree_sink.rs
+++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs
@@ -146,7 +146,7 @@ fn n_attached_trivias<'a>(
146 trivias: impl Iterator<Item = (SyntaxKind, &'a str)>, 146 trivias: impl Iterator<Item = (SyntaxKind, &'a str)>,
147) -> usize { 147) -> usize {
148 match kind { 148 match kind {
149 MACRO_CALL | CONST_DEF | TYPE_ALIAS_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF 149 MACRO_CALL | CONST_DEF | TYPE_ALIAS_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN
150 | TRAIT_DEF | MODULE | RECORD_FIELD_DEF | STATIC_DEF => { 150 | TRAIT_DEF | MODULE | RECORD_FIELD_DEF | STATIC_DEF => {
151 let mut res = 0; 151 let mut res = 0;
152 let mut trivias = trivias.enumerate().peekable(); 152 let mut trivias = trivias.enumerate().peekable();
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs
index fdec48fb0..2714d102a 100644
--- a/crates/ra_syntax/src/validation.rs
+++ b/crates/ra_syntax/src/validation.rs
@@ -4,7 +4,7 @@ mod block;
4 4
5use crate::{ 5use crate::{
6 ast, match_ast, AstNode, SyntaxError, 6 ast, match_ast, AstNode, SyntaxError,
7 SyntaxKind::{BYTE, BYTE_STRING, CHAR, CONST_DEF, FN_DEF, INT_NUMBER, STRING, TYPE_ALIAS_DEF}, 7 SyntaxKind::{BYTE, BYTE_STRING, CHAR, CONST_DEF, FN, INT_NUMBER, STRING, TYPE_ALIAS_DEF},
8 SyntaxNode, SyntaxToken, TextSize, T, 8 SyntaxNode, SyntaxToken, TextSize, T,
9}; 9};
10use rustc_lexer::unescape::{ 10use rustc_lexer::unescape::{
@@ -200,7 +200,7 @@ fn validate_visibility(vis: ast::Visibility, errors: &mut Vec<SyntaxError>) {
200 None => return, 200 None => return,
201 }; 201 };
202 match parent.kind() { 202 match parent.kind() {
203 FN_DEF | CONST_DEF | TYPE_ALIAS_DEF => (), 203 FN | CONST_DEF | TYPE_ALIAS_DEF => (),
204 _ => return, 204 _ => return,
205 } 205 }
206 206
diff --git a/crates/ra_syntax/src/validation/block.rs b/crates/ra_syntax/src/validation/block.rs
index 2c08f7e6e..ad9901468 100644
--- a/crates/ra_syntax/src/validation/block.rs
+++ b/crates/ra_syntax/src/validation/block.rs
@@ -9,7 +9,7 @@ use crate::{
9pub(crate) fn validate_block_expr(block: ast::BlockExpr, errors: &mut Vec<SyntaxError>) { 9pub(crate) fn validate_block_expr(block: ast::BlockExpr, errors: &mut Vec<SyntaxError>) {
10 if let Some(parent) = block.syntax().parent() { 10 if let Some(parent) = block.syntax().parent() {
11 match parent.kind() { 11 match parent.kind() {
12 FN_DEF | EXPR_STMT | BLOCK_EXPR => return, 12 FN | EXPR_STMT | BLOCK_EXPR => return,
13 _ => {} 13 _ => {}
14 } 14 }
15 } 15 }
diff --git a/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast
index 375ed45e0..4845a6563 100644
--- a/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast
+++ b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..31 2 [email protected]
3 [email protected] 3 [email protected]
4 [email protected] "#" 4 [email protected] "#"
5 [email protected] "[" 5 [email protected] "["
diff --git a/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast
index b72c92c33..2ae5bacea 100644
--- a/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast
+++ b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast
@@ -12,7 +12,7 @@ [email protected]
12 [email protected] 12 [email protected]
13 [email protected] "}" 13 [email protected] "}"
14 [email protected] "\n\n" 14 [email protected] "\n\n"
15 FN_DEF@17..27 15 [email protected]
16 [email protected] "fn" 16 [email protected] "fn"
17 [email protected] " " 17 [email protected] " "
18 [email protected] 18 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast
index 33953d8d7..1e9637c26 100644
--- a/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast
+++ b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..12 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -58,7 +58,7 @@ [email protected]
58 [email protected] "\n" 58 [email protected] "\n"
59 [email protected] "}" 59 [email protected] "}"
60 [email protected] "\n\n" 60 [email protected] "\n\n"
61 FN_DEF@82..94 61 [email protected]
62 [email protected] "fn" 62 [email protected] "fn"
63 [email protected] " " 63 [email protected] " "
64 [email protected] 64 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast
index 3bf57eacc..1c3e0f65b 100644
--- a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast
+++ b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..41 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast b/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast
index e1e782f5f..c8bf96550 100644
--- a/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast
+++ b/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..389 2 [email protected]
3 [email protected] 3 [email protected]
4 [email protected] 4 [email protected]
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast
index 9323b7890..1ab045a44 100644
--- a/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast
+++ b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..22 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast
index b18378cff..a3c25b450 100644
--- a/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast
+++ b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..7 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast
index 93434f34f..66157c3dc 100644
--- a/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast
+++ b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..55 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast
index 628315c78..bb4a28f4e 100644
--- a/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast
+++ b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..46 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast
index a87e5061a..ce43ddf45 100644
--- a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast
+++ b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 FN_DEF@20..161 14 [email protected]
15 [email protected] "fn" 15 [email protected] "fn"
16 [email protected] " " 16 [email protected] " "
17 [email protected] 17 [email protected]
@@ -116,7 +116,7 @@ [email protected]
116 [email protected] "\n " 116 [email protected] "\n "
117 [email protected] "}" 117 [email protected] "}"
118 [email protected] "\n\n " 118 [email protected] "\n\n "
119 FN_DEF@167..180 119 [email protected]
120 [email protected] "fn" 120 [email protected] "fn"
121 [email protected] " " 121 [email protected] " "
122 [email protected] 122 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0019_let_recover.rast b/crates/ra_syntax/test_data/parser/err/0019_let_recover.rast
index 4ff27f5c8..f6fa964b7 100644
--- a/crates/ra_syntax/test_data/parser/err/0019_let_recover.rast
+++ b/crates/ra_syntax/test_data/parser/err/0019_let_recover.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..138 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast
index 5f3a31473..6f6feba5a 100644
--- a/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast
+++ b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast
@@ -1,8 +1,8 @@
1[email protected] 1[email protected]
2 FN_DEF@0..2 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] "\n\n" 4 [email protected] "\n\n"
5 FN_DEF@4..15 5 [email protected]
6 [email protected] "fn" 6 [email protected] "fn"
7 [email protected] " " 7 [email protected] " "
8 [email protected] 8 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast
index 1746bd3c1..ba4ce4795 100644
--- a/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast
+++ b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..21 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast
index 28146f44e..866f61113 100644
--- a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast
+++ b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..33 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -40,7 +40,7 @@ [email protected]
40 [email protected] " " 40 [email protected] " "
41 [email protected] "}" 41 [email protected] "}"
42 [email protected] "\n" 42 [email protected] "\n"
43 FN_DEF@34..68 43 [email protected]
44 [email protected] "fn" 44 [email protected] "fn"
45 [email protected] " " 45 [email protected] " "
46 [email protected] 46 [email protected]
@@ -88,7 +88,7 @@ [email protected]
88 [email protected] " " 88 [email protected] " "
89 [email protected] "}" 89 [email protected] "}"
90 [email protected] "\n" 90 [email protected] "\n"
91 FN_DEF@69..111 91 [email protected]
92 [email protected] "fn" 92 [email protected] "fn"
93 [email protected] " " 93 [email protected] " "
94 [email protected] 94 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast
index 9ea9d715e..5ffefd742 100644
--- a/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast
+++ b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..55 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast
index 48610a5eb..1e94e72bc 100644
--- a/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast
+++ b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..53 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -65,7 +65,7 @@ [email protected]
65 [email protected] "{" 65 [email protected] "{"
66 [email protected] "}" 66 [email protected] "}"
67 [email protected] "\n\n" 67 [email protected] "\n\n"
68 FN_DEF@55..239 68 [email protected]
69 [email protected] "fn" 69 [email protected] "fn"
70 [email protected] " " 70 [email protected] " "
71 [email protected] 71 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0025_nope.rast b/crates/ra_syntax/test_data/parser/err/0025_nope.rast
index 88b086daf..4b9bd679e 100644
--- a/crates/ra_syntax/test_data/parser/err/0025_nope.rast
+++ b/crates/ra_syntax/test_data/parser/err/0025_nope.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..574 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast
index 4d6461d1e..53704f640 100644
--- a/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast
+++ b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..29 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0029_field_completion.rast b/crates/ra_syntax/test_data/parser/err/0029_field_completion.rast
index 0da8f59f0..bfcd0149e 100644
--- a/crates/ra_syntax/test_data/parser/err/0029_field_completion.rast
+++ b/crates/ra_syntax/test_data/parser/err/0029_field_completion.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..23 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast
index 515819e42..55ff3943f 100644
--- a/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast
+++ b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..349 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast
index c6859eca8..ec9f556aa 100644
--- a/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast
+++ b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..292 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast
index 53e445459..063532e02 100644
--- a/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast
+++ b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..88 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast b/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast
index 1b2ac5011..303a49576 100644
--- a/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast
+++ b/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..89 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0035_use_recover.rast b/crates/ra_syntax/test_data/parser/err/0035_use_recover.rast
index 0415085b0..2f03709eb 100644
--- a/crates/ra_syntax/test_data/parser/err/0035_use_recover.rast
+++ b/crates/ra_syntax/test_data/parser/err/0035_use_recover.rast
@@ -34,7 +34,7 @@ [email protected]
34 [email protected] 34 [email protected]
35 [email protected] "use" 35 [email protected] "use"
36 [email protected] "\n" 36 [email protected] "\n"
37 FN_DEF@38..47 37 [email protected]
38 [email protected] "fn" 38 [email protected] "fn"
39 [email protected] " " 39 [email protected] " "
40 [email protected] 40 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast
index bc446e3df..f180616f1 100644
--- a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast
+++ b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast
@@ -17,7 +17,7 @@ [email protected]
17 [email protected] 17 [email protected]
18 [email protected] "{" 18 [email protected] "{"
19 [email protected] "\n " 19 [email protected] "\n "
20 FN_DEF@20..31 20 [email protected]
21 [email protected] "fn" 21 [email protected] "fn"
22 [email protected] " " 22 [email protected] " "
23 [email protected] 23 [email protected]
@@ -30,7 +30,7 @@ [email protected]
30 [email protected] "{" 30 [email protected] "{"
31 [email protected] "}" 31 [email protected] "}"
32 [email protected] "\n " 32 [email protected] "\n "
33 FN_DEF@36..51 33 [email protected]
34 [email protected] 34 [email protected]
35 [email protected] "pub" 35 [email protected] "pub"
36 [email protected] " " 36 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast b/crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast
index 21db9ee85..bed7ad6c3 100644
--- a/crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast
+++ b/crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..32 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast b/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast
index ec950381b..a98c31b0c 100644
--- a/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast
+++ b/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..82 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast
index cb90f28bc..5f59c3bc2 100644
--- a/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast
+++ b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast
@@ -136,7 +136,7 @@ [email protected]
136 [email protected] ")" 136 [email protected] ")"
137 [email protected] ";" 137 [email protected] ";"
138 [email protected] "\n" 138 [email protected] "\n"
139 FN_DEF@150..238 139 [email protected]
140 [email protected] "fn" 140 [email protected] "fn"
141 [email protected] " " 141 [email protected] " "
142 [email protected] 142 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast
index e46456384..df29017e7 100644
--- a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast
+++ b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..82 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast b/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast
index f1e78f388..93c429e12 100644
--- a/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast
+++ b/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast
@@ -1,4 +1,4 @@
1FN_DEF@0..11 1[email protected]
2 [email protected] "fn" 2 [email protected] "fn"
3 [email protected] " " 3 [email protected] " "
4 [email protected] 4 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast
index 75668c818..8b0a888fd 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..29 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast
index c789e8d82..cc0f8bcaf 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..10 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -19,7 +19,7 @@ [email protected]
19 [email protected] " " 19 [email protected] " "
20 [email protected] "}" 20 [email protected] "}"
21 [email protected] " " 21 [email protected] " "
22 FN_DEF@22..32 22 [email protected]
23 [email protected] "fn" 23 [email protected] "fn"
24 [email protected] " " 24 [email protected] " "
25 [email protected] 25 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast
index cd24313d4..3f3a7f1b9 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..29 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast
index c5fa7a404..63a10127d 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..20 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast
index 4e3fa704e..8fd8d5e59 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..47 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast
index e1abc5633..fa14e1e6d 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..46 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast
index 53f7ebaf9..d2a18330f 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast
@@ -2,7 +2,7 @@ [email protected]
2 [email protected] 2 [email protected]
3 [email protected] "unsafe" 3 [email protected] "unsafe"
4 [email protected] " " 4 [email protected] " "
5 FN_DEF@7..24 5 [email protected]
6 [email protected] "async" 6 [email protected] "async"
7 [email protected] " " 7 [email protected] " "
8 [email protected] "fn" 8 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast
index 5501dc5a6..b31195281 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast
@@ -35,7 +35,7 @@ [email protected]
35 [email protected] 35 [email protected]
36 [email protected] "default" 36 [email protected] "default"
37 [email protected] " " 37 [email protected] " "
38 FN_DEF@48..59 38 [email protected]
39 [email protected] "fn" 39 [email protected] "fn"
40 [email protected] " " 40 [email protected] " "
41 [email protected] 41 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast
index a9de44b57..6753c3fe7 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..44 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast
index f422acdda..7847ba65a 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast
@@ -41,7 +41,7 @@ [email protected]
41 [email protected] "i32" 41 [email protected] "i32"
42 [email protected] ";" 42 [email protected] ";"
43 [email protected] "\n " 43 [email protected] "\n "
44 FN_DEF@50..61 44 [email protected]
45 [email protected] "fn" 45 [email protected] "fn"
46 [email protected] " " 46 [email protected] " "
47 [email protected] 47 [email protected]
@@ -54,7 +54,7 @@ [email protected]
54 [email protected] "{" 54 [email protected] "{"
55 [email protected] "}" 55 [email protected] "}"
56 [email protected] "\n " 56 [email protected] "\n "
57 FN_DEF@66..80 57 [email protected]
58 [email protected] "fn" 58 [email protected] "fn"
59 [email protected] " " 59 [email protected] " "
60 [email protected] 60 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast
index cd0892451..9cae1e8cc 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..53 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast b/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast
index 6c8c1e24b..1b56e20d5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..27 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast
index 0cd1dffc9..87c170707 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 FN_DEF@13..26 14 [email protected]
15 [email protected] "fn" 15 [email protected] "fn"
16 [email protected] " " 16 [email protected] " "
17 [email protected] 17 [email protected]
@@ -26,7 +26,7 @@ [email protected]
26 [email protected] "{" 26 [email protected] "{"
27 [email protected] "}" 27 [email protected] "}"
28 [email protected] "\n " 28 [email protected] "\n "
29 FN_DEF@31..46 29 [email protected]
30 [email protected] "fn" 30 [email protected] "fn"
31 [email protected] " " 31 [email protected] " "
32 [email protected] 32 [email protected]
@@ -43,7 +43,7 @@ [email protected]
43 [email protected] "{" 43 [email protected] "{"
44 [email protected] "}" 44 [email protected] "}"
45 [email protected] "\n " 45 [email protected] "\n "
46 FN_DEF@51..69 46 [email protected]
47 [email protected] "fn" 47 [email protected] "fn"
48 [email protected] " " 48 [email protected] " "
49 [email protected] 49 [email protected]
@@ -62,7 +62,7 @@ [email protected]
62 [email protected] "{" 62 [email protected] "{"
63 [email protected] "}" 63 [email protected] "}"
64 [email protected] "\n " 64 [email protected] "\n "
65 FN_DEF@74..103 65 [email protected]
66 [email protected] "fn" 66 [email protected] "fn"
67 [email protected] " " 67 [email protected] " "
68 [email protected] 68 [email protected]
@@ -95,7 +95,7 @@ [email protected]
95 [email protected] "{" 95 [email protected] "{"
96 [email protected] "}" 96 [email protected] "}"
97 [email protected] "\n " 97 [email protected] "\n "
98 FN_DEF@108..125 98 [email protected]
99 [email protected] "fn" 99 [email protected] "fn"
100 [email protected] " " 100 [email protected] " "
101 [email protected] 101 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast
index 10eb31d68..3ce2acfae 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..102 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast
index 425e5196c..f62826fd5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..25 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast
index d823c08fc..66a609346 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..47 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast
index 422912e3c..104e153ce 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..68 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast
index 79148e953..e75180900 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 FN_DEF@13..33 14 [email protected]
15 [email protected] "fn" 15 [email protected] "fn"
16 [email protected] " " 16 [email protected] " "
17 [email protected] 17 [email protected]
@@ -35,7 +35,7 @@ [email protected]
35 [email protected] "{" 35 [email protected] "{"
36 [email protected] "}" 36 [email protected] "}"
37 [email protected] "\n " 37 [email protected] "\n "
38 FN_DEF@38..66 38 [email protected]
39 [email protected] "fn" 39 [email protected] "fn"
40 [email protected] " " 40 [email protected] " "
41 [email protected] 41 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast
index 10d6b2fde..7db38ea4d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..43 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast
index 31b5b6616..daa55ec6c 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast
@@ -45,7 +45,7 @@ [email protected]
45 [email protected] "92" 45 [email protected] "92"
46 [email protected] ";" 46 [email protected] ";"
47 [email protected] "\n " 47 [email protected] "\n "
48 FN_DEF@54..65 48 [email protected]
49 [email protected] "fn" 49 [email protected] "fn"
50 [email protected] " " 50 [email protected] " "
51 [email protected] 51 [email protected]
@@ -58,7 +58,7 @@ [email protected]
58 [email protected] "{" 58 [email protected] "{"
59 [email protected] "}" 59 [email protected] "}"
60 [email protected] "\n " 60 [email protected] "\n "
61 FN_DEF@70..86 61 [email protected]
62 [email protected] "fn" 62 [email protected] "fn"
63 [email protected] " " 63 [email protected] " "
64 [email protected] 64 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast
index 7eb27d5e1..dea0c73f7 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..38 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast b/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast
index b4598768e..e5f550347 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..96 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast
index b824c10a8..9e76d881e 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..51 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast
index fabb09937..e096b3a1f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..88 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast
index 3aed26732..381284dc5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..37 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -41,7 +41,7 @@ [email protected]
41 [email protected] " " 41 [email protected] " "
42 [email protected] "}" 42 [email protected] "}"
43 [email protected] "\n" 43 [email protected] "\n"
44 FN_DEF@38..196 44 [email protected]
45 [email protected] "fn" 45 [email protected] "fn"
46 [email protected] " " 46 [email protected] " "
47 [email protected] 47 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast
index 899b63aac..ffe1a3a01 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..92 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast
index e064aafaf..f905def6f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..101 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast
index cf5825593..293b1d64c 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..29 2 [email protected]
3 [email protected] "unsafe" 3 [email protected] "unsafe"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast
index fbd90bc0f..8f6cd2e2f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast
@@ -32,7 +32,7 @@ [email protected]
32 [email protected] "Output" 32 [email protected] "Output"
33 [email protected] ";" 33 [email protected] ";"
34 [email protected] "\n" 34 [email protected] "\n"
35 FN_DEF@27..70 35 [email protected]
36 [email protected] "fn" 36 [email protected] "fn"
37 [email protected] " " 37 [email protected] " "
38 [email protected] 38 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast
index a767f145d..64e705fb3 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..20 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast
index aa582516a..47cbe7c1f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..19 2 [email protected]
3 [email protected] 3 [email protected]
4 [email protected] "crate" 4 [email protected] "crate"
5 [email protected] " " 5 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast
index 0c1c6e877..40875ae1e 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..117 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast b/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast
index c23b3b67c..1fd3cd0e7 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..20 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] " " 13 [email protected] " "
14 FN_DEF@9..18 14 [email protected]
15 [email protected] "fn" 15 [email protected] "fn"
16 [email protected] " " 16 [email protected] " "
17 [email protected] 17 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast b/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast
index 9ca2165ba..fbf2e7c67 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..34 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast b/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast
index b209f67f8..37757ccd4 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..26 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -38,7 +38,7 @@ [email protected]
38 [email protected] "{" 38 [email protected] "{"
39 [email protected] "}" 39 [email protected] "}"
40 [email protected] "\n" 40 [email protected] "\n"
41 FN_DEF@27..57 41 [email protected]
42 [email protected] "fn" 42 [email protected] "fn"
43 [email protected] " " 43 [email protected] " "
44 [email protected] 44 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast
index 5f1429102..02c57079f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast
@@ -8,7 +8,7 @@ [email protected]
8 [email protected] 8 [email protected]
9 [email protected] "{" 9 [email protected] "{"
10 [email protected] " " 10 [email protected] " "
11 FN_DEF@10..19 11 [email protected]
12 [email protected] "fn" 12 [email protected] "fn"
13 [email protected] " " 13 [email protected] " "
14 [email protected] 14 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast
index 70232a3b2..2bfb52453 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..90 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast b/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast
index 03c52525e..68bb43852 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..112 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast b/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast
index 24f89b83f..28129c50c 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..115 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast
index bb43d1eaf..97548a5ee 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..17 2 [email protected]
3 [email protected] "const" 3 [email protected] "const"
4 [email protected] " " 4 [email protected] " "
5 [email protected] "fn" 5 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast
index 8bd94a868..3e72f9671 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..111 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast b/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast
index 9210f155c..fa659c19b 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..82 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast
index 850465d82..b0aa73b7d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..111 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast
index 02656df31..f6417ab13 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..11 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast
index 445d8d309..587160003 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..136 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast
index 177bb5514..d2279877b 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..166 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast b/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast
index f8ff7079b..4c1165dc8 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..45 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast
index 07b3d1435..d6926425c 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..96 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast
index 665f716a8..437d7ac04 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..39 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast b/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast
index 3fd3a4391..3ca70f021 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..83 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast
index 97c6e6a9d..5cefc5076 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..9 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -12,7 +12,7 @@ [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "}" 13 [email protected] "}"
14 [email protected] "\n" 14 [email protected] "\n"
15 FN_DEF@10..31 15 [email protected]
16 [email protected] "fn" 16 [email protected] "fn"
17 [email protected] " " 17 [email protected] " "
18 [email protected] 18 [email protected]
@@ -38,7 +38,7 @@ [email protected]
38 [email protected] " " 38 [email protected] " "
39 [email protected] "}" 39 [email protected] "}"
40 [email protected] "\n" 40 [email protected] "\n"
41 FN_DEF@32..48 41 [email protected]
42 [email protected] "fn" 42 [email protected] "fn"
43 [email protected] " " 43 [email protected] " "
44 [email protected] 44 [email protected]
@@ -62,7 +62,7 @@ [email protected]
62 [email protected] " " 62 [email protected] " "
63 [email protected] "}" 63 [email protected] "}"
64 [email protected] "\n" 64 [email protected] "\n"
65 FN_DEF@49..64 65 [email protected]
66 [email protected] "fn" 66 [email protected] "fn"
67 [email protected] " " 67 [email protected] " "
68 [email protected] 68 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast b/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast
index e2c1a507d..cfa4c05f5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..28 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast
index 4f3a8ed24..33e6fb93f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..20 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast
index 462d1a8bb..3c80846db 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..88 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast
index 58bdf7e34..1563b1988 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..199 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast b/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast
index 9fcb7899e..ded36949a 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..188 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast
index a42abc189..70e05a859 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..11 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -12,7 +12,7 @@ [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "}" 13 [email protected] "}"
14 [email protected] "\n" 14 [email protected] "\n"
15 FN_DEF@12..29 15 [email protected]
16 [email protected] "fn" 16 [email protected] "fn"
17 [email protected] " " 17 [email protected] " "
18 [email protected] 18 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast b/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast
index 7e71d7373..34f520994 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..87 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast
index 48aaf1004..405b6a259 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..18 2 [email protected]
3 [email protected] 3 [email protected]
4 [email protected] "extern" 4 [email protected] "extern"
5 [email protected] " " 5 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast
index aed81f9b0..82f03f9c1 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..25 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast
index 67d9595d3..25706d2a4 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..25 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast
index 031e74652..cb5316a0d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..166 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast
index 816e49310..32a77ba49 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..24 2 [email protected]
3 [email protected] "const" 3 [email protected] "const"
4 [email protected] " " 4 [email protected] " "
5 [email protected] "unsafe" 5 [email protected] "unsafe"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast
index d48ef865c..1627556c8 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..9 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -12,7 +12,7 @@ [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "}" 13 [email protected] "}"
14 [email protected] "\n" 14 [email protected] "\n"
15 FN_DEF@10..25 15 [email protected]
16 [email protected] "fn" 16 [email protected] "fn"
17 [email protected] " " 17 [email protected] " "
18 [email protected] 18 [email protected]
@@ -36,7 +36,7 @@ [email protected]
36 [email protected] "{" 36 [email protected] "{"
37 [email protected] "}" 37 [email protected] "}"
38 [email protected] "\n" 38 [email protected] "\n"
39 FN_DEF@26..43 39 [email protected]
40 [email protected] "fn" 40 [email protected] "fn"
41 [email protected] " " 41 [email protected] " "
42 [email protected] 42 [email protected]
@@ -62,7 +62,7 @@ [email protected]
62 [email protected] "{" 62 [email protected] "{"
63 [email protected] "}" 63 [email protected] "}"
64 [email protected] "\n" 64 [email protected] "\n"
65 FN_DEF@44..66 65 [email protected]
66 [email protected] "fn" 66 [email protected] "fn"
67 [email protected] " " 67 [email protected] " "
68 [email protected] 68 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast
index e4455cd3e..766de4efe 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..32 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast
index 8a8743060..73c94e5d4 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..18 2 [email protected]
3 [email protected] "unsafe" 3 [email protected] "unsafe"
4 [email protected] " " 4 [email protected] " "
5 [email protected] "fn" 5 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast
index 9f966ff8a..fe1c290c3 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..118 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast
index 9b3bef04e..c4c0a0568 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..54 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast
index e64717152..51a6c5170 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..133 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast
index 98963dc62..b2961b0ff 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..48 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast
index ea603e2c9..ca7e4a5c3 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..39 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast b/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast
index 30ff96a7c..a6a169f1b 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..73 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast
index b58f40ac1..432318da0 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..93 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast
index b67714c17..3cd554d45 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..145 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast
index 5de480da9..d761c1c68 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..49 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast b/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast
index e152c6b6c..aaaf803b7 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..57 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast
index b283ab804..4b5f9cdc9 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..138 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast
index 9d5470914..54cc3be3a 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..258 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast
index ada2fc54e..f4008cfdc 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..63 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast
index b3a33c14d..f155743cf 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast
@@ -8,7 +8,7 @@ [email protected]
8 [email protected] 8 [email protected]
9 [email protected] "{" 9 [email protected] "{"
10 [email protected] " " 10 [email protected] " "
11 FN_DEF@13..54 11 [email protected]
12 [email protected] "fn" 12 [email protected] "fn"
13 [email protected] " " 13 [email protected] " "
14 [email protected] 14 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast
index 6178dfe59..a7df188bd 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..17 2 [email protected]
3 [email protected] "async" 3 [email protected] "async"
4 [email protected] " " 4 [email protected] " "
5 [email protected] "fn" 5 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast b/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast
index ced59b7c1..aa4d7a784 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..26 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast
index 97611f7f3..20979cef3 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..45 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast
index 09221fc54..0342e64f3 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..81 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast
index 93cc41533..3b46e5b47 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..46 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast
index 0901f2348..98a20f36d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..24 2 [email protected]
3 [email protected] "async" 3 [email protected] "async"
4 [email protected] " " 4 [email protected] " "
5 [email protected] "unsafe" 5 [email protected] "unsafe"
@@ -16,7 +16,7 @@ [email protected]
16 [email protected] "{" 16 [email protected] "{"
17 [email protected] "}" 17 [email protected] "}"
18 [email protected] "\n" 18 [email protected] "\n"
19 FN_DEF@25..49 19 [email protected]
20 [email protected] "const" 20 [email protected] "const"
21 [email protected] " " 21 [email protected] " "
22 [email protected] "unsafe" 22 [email protected] "unsafe"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast
index 28291afc2..e283966ca 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..32 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast
index bb94a05c6..931e81f27 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..134 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast
index 8f2f144c7..0fe3bf582 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..32 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast
index 87ac42748..48f483813 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..105 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast
index 3772cb64b..9fc724f3f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast
@@ -36,7 +36,7 @@ [email protected]
36 [email protected] "Bar" 36 [email protected] "Bar"
37 [email protected] ";" 37 [email protected] ";"
38 [email protected] "\n " 38 [email protected] "\n "
39 FN_DEF@47..66 39 [email protected]
40 [email protected] "default" 40 [email protected] "default"
41 [email protected] " " 41 [email protected] " "
42 [email protected] "fn" 42 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast
index b330a0932..ceae8a4ec 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..110 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -33,7 +33,7 @@ [email protected]
33 [email protected] "}" 33 [email protected] "}"
34 [email protected] ";" 34 [email protected] ";"
35 [email protected] "\n " 35 [email protected] "\n "
36 FN_DEF@81..90 36 [email protected]
37 [email protected] "fn" 37 [email protected] "fn"
38 [email protected] " " 38 [email protected] " "
39 [email protected] 39 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast
index 8e8d9e992..923effe38 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..66 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast b/crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast
index c457851c9..1ad03e005 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..58 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast
index ea325831e..a03139ab5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..51 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast
index 9135de9df..6403ff8d5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..25 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast b/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast
index 14610a0a2..36fd2997b 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..27 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast b/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast
index e6be8b7e4..d11019076 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..50 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast
index 57fba5fd5..09fd9e9b8 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..117 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast
index 8d8b9597b..8d0f1ead5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..554 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast
index 7c092d518..b41ef4098 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..62 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast b/crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast
index 8382a4f96..2d0c83458 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..42 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast
index f43dfbe63..2905c5f1a 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..33 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast b/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast
index ecac05950..c63a55a56 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..62 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast
index 092833417..3b8dfefc6 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..29 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast b/crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast
index 88d512f1a..4d4c41f1a 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..129 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast b/crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast
index bd9e8d40f..8ae24b9c1 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..27 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast
index 08333a325..9c071ec2e 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..33 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast b/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast
index 5f09e4f4a..fb46d4ce4 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..26 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast
index 9efebd8b8..9e9a5f9c5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..22 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast
index 4991f2c36..ca9a1183d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..21 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast
index c0b8c0300..680f35445 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast
@@ -19,7 +19,7 @@ [email protected]
19 [email protected] 19 [email protected]
20 [email protected] "{" 20 [email protected] "{"
21 [email protected] "\n " 21 [email protected] "\n "
22 FN_DEF@21..47 22 [email protected]
23 [email protected] "default" 23 [email protected] "default"
24 [email protected] " " 24 [email protected] " "
25 [email protected] "unsafe" 25 [email protected] "unsafe"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast
index 868899275..f5e20b93d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..32 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast b/crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast
index 0ec237f8e..a7a2b11a7 100644
--- a/crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..12 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast
index 37b452ec4..ea26f1440 100644
--- a/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast
@@ -26,7 +26,7 @@ [email protected]
26 [email protected] 26 [email protected]
27 [email protected] "{" 27 [email protected] "{"
28 [email protected] "\n " 28 [email protected] "\n "
29 FN_DEF@31..47 29 [email protected]
30 [email protected] "fn" 30 [email protected] "fn"
31 [email protected] " " 31 [email protected] " "
32 [email protected] 32 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast b/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast
index 0b9bc58e8..478fdba75 100644
--- a/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..34 2 [email protected]
3 [email protected] 3 [email protected]
4 [email protected] "#" 4 [email protected] "#"
5 [email protected] "[" 5 [email protected] "["
diff --git a/crates/ra_syntax/test_data/parser/ok/0012_visibility.rast b/crates/ra_syntax/test_data/parser/ok/0012_visibility.rast
index 980b34049..83a93b5a9 100644
--- a/crates/ra_syntax/test_data/parser/ok/0012_visibility.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0012_visibility.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..9 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -12,7 +12,7 @@ [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "}" 13 [email protected] "}"
14 [email protected] "\n" 14 [email protected] "\n"
15 FN_DEF@10..23 15 [email protected]
16 [email protected] 16 [email protected]
17 [email protected] "pub" 17 [email protected] "pub"
18 [email protected] " " 18 [email protected] " "
@@ -28,7 +28,7 @@ [email protected]
28 [email protected] "{" 28 [email protected] "{"
29 [email protected] "}" 29 [email protected] "}"
30 [email protected] "\n" 30 [email protected] "\n"
31 FN_DEF@24..44 31 [email protected]
32 [email protected] 32 [email protected]
33 [email protected] "pub" 33 [email protected] "pub"
34 [email protected] "(" 34 [email protected] "("
@@ -47,7 +47,7 @@ [email protected]
47 [email protected] "{" 47 [email protected] "{"
48 [email protected] "}" 48 [email protected] "}"
49 [email protected] "\n" 49 [email protected] "\n"
50 FN_DEF@45..65 50 [email protected]
51 [email protected] 51 [email protected]
52 [email protected] "pub" 52 [email protected] "pub"
53 [email protected] "(" 53 [email protected] "("
@@ -66,7 +66,7 @@ [email protected]
66 [email protected] "{" 66 [email protected] "{"
67 [email protected] "}" 67 [email protected] "}"
68 [email protected] "\n" 68 [email protected] "\n"
69 FN_DEF@66..97 69 [email protected]
70 [email protected] 70 [email protected]
71 [email protected] "pub" 71 [email protected] "pub"
72 [email protected] "(" 72 [email protected] "("
diff --git a/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast b/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast
index 964cbf5dd..a3e091ad3 100644
--- a/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..22 2 [email protected]
3 [email protected] 3 [email protected]
4 [email protected] "#" 4 [email protected] "#"
5 [email protected] "[" 5 [email protected] "["
diff --git a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast
index 873791f50..5524efaaf 100644
--- a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..19 2 [email protected]
3 [email protected] 3 [email protected]
4 [email protected] "extern" 4 [email protected] "extern"
5 [email protected] " " 5 [email protected] " "
@@ -16,7 +16,7 @@ [email protected]
16 [email protected] "\n" 16 [email protected] "\n"
17 [email protected] "}" 17 [email protected] "}"
18 [email protected] "\n\n" 18 [email protected] "\n\n"
19 FN_DEF@21..44 19 [email protected]
20 [email protected] 20 [email protected]
21 [email protected] "extern" 21 [email protected] "extern"
22 [email protected] " " 22 [email protected] " "
@@ -35,7 +35,7 @@ [email protected]
35 [email protected] "\n" 35 [email protected] "\n"
36 [email protected] "}" 36 [email protected] "}"
37 [email protected] "\n\n" 37 [email protected] "\n\n"
38 FN_DEF@46..70 38 [email protected]
39 [email protected] 39 [email protected]
40 [email protected] "extern" 40 [email protected] "extern"
41 [email protected] " " 41 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rast b/crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rast
index 5701f566e..bb6527b48 100644
--- a/crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0025_extern_fn_in_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..34 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 FN_DEF@16..32 14 [email protected]
15 [email protected] 15 [email protected]
16 [email protected] "extern" 16 [email protected] "extern"
17 [email protected] " " 17 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rast b/crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rast
index b029d8692..5bcf54deb 100644
--- a/crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0026_const_fn_in_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..33 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 FN_DEF@16..31 14 [email protected]
15 [email protected] "const" 15 [email protected] "const"
16 [email protected] " " 16 [email protected] " "
17 [email protected] "fn" 17 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rast b/crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rast
index 299bbd136..a7cc12295 100644
--- a/crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0027_unsafe_fn_in_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..52 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 FN_DEF@16..32 14 [email protected]
15 [email protected] "unsafe" 15 [email protected] "unsafe"
16 [email protected] " " 16 [email protected] " "
17 [email protected] "fn" 17 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rast b/crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rast
index de3c4b786..efe018484 100644
--- a/crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0028_operator_binding_power.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..247 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0029_range_forms.rast b/crates/ra_syntax/test_data/parser/ok/0029_range_forms.rast
index dc47d68a6..47e46f009 100644
--- a/crates/ra_syntax/test_data/parser/ok/0029_range_forms.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0029_range_forms.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..152 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rast b/crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rast
index 86c3b46c4..93f766149 100644
--- a/crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0030_string_suffixes.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..111 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0030_traits.rast b/crates/ra_syntax/test_data/parser/ok/0030_traits.rast
index 63693de4f..4bcf07ffb 100644
--- a/crates/ra_syntax/test_data/parser/ok/0030_traits.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0030_traits.rast
@@ -8,7 +8,7 @@ [email protected]
8 [email protected] 8 [email protected]
9 [email protected] "{" 9 [email protected] "{"
10 [email protected] "\n " 10 [email protected] "\n "
11 FN_DEF@21..34 11 [email protected]
12 [email protected] "fn" 12 [email protected] "fn"
13 [email protected] " " 13 [email protected] " "
14 [email protected] 14 [email protected]
@@ -29,7 +29,7 @@ [email protected]
29 [email protected] 29 [email protected]
30 [email protected] "{" 30 [email protected] "{"
31 [email protected] "\n " 31 [email protected] "\n "
32 FN_DEF@64..93 32 [email protected]
33 [email protected] "fn" 33 [email protected] "fn"
34 [email protected] " " 34 [email protected] " "
35 [email protected] 35 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0031_extern.rast b/crates/ra_syntax/test_data/parser/ok/0031_extern.rast
index ea285f52f..0509f7504 100644
--- a/crates/ra_syntax/test_data/parser/ok/0031_extern.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0031_extern.rast
@@ -6,7 +6,7 @@ [email protected]
6 [email protected] 6 [email protected]
7 [email protected] "{" 7 [email protected] "{"
8 [email protected] "\n " 8 [email protected] "\n "
9 FN_DEF@13..87 9 [email protected]
10 [email protected] 10 [email protected]
11 [email protected] "pub" 11 [email protected] "pub"
12 [email protected] " " 12 [email protected] " "
@@ -69,7 +69,7 @@ [email protected]
69 [email protected] "c_int" 69 [email protected] "c_int"
70 [email protected] ";" 70 [email protected] ";"
71 [email protected] "\n " 71 [email protected] "\n "
72 FN_DEF@92..167 72 [email protected]
73 [email protected] 73 [email protected]
74 [email protected] "pub" 74 [email protected] "pub"
75 [email protected] " " 75 [email protected] " "
@@ -134,7 +134,7 @@ [email protected]
134 [email protected] "c_int" 134 [email protected] "c_int"
135 [email protected] ";" 135 [email protected] ";"
136 [email protected] "\n " 136 [email protected] "\n "
137 FN_DEF@172..276 137 [email protected]
138 [email protected] 138 [email protected]
139 [email protected] "pub" 139 [email protected] "pub"
140 [email protected] " " 140 [email protected] " "
@@ -199,7 +199,7 @@ [email protected]
199 [email protected] "c_int" 199 [email protected] "c_int"
200 [email protected] ";" 200 [email protected] ";"
201 [email protected] "\n " 201 [email protected] "\n "
202 FN_DEF@281..341 202 [email protected]
203 [email protected] 203 [email protected]
204 [email protected] "pub" 204 [email protected] "pub"
205 [email protected] " " 205 [email protected] " "
@@ -248,7 +248,7 @@ [email protected]
248 [email protected] "c_int" 248 [email protected] "c_int"
249 [email protected] ";" 249 [email protected] ";"
250 [email protected] "\n " 250 [email protected] "\n "
251 FN_DEF@346..469 251 [email protected]
252 [email protected] 252 [email protected]
253 [email protected] "pub" 253 [email protected] "pub"
254 [email protected] " " 254 [email protected] " "
@@ -317,7 +317,7 @@ [email protected]
317 [email protected] "c_int" 317 [email protected] "c_int"
318 [email protected] ";" 318 [email protected] ";"
319 [email protected] "\n " 319 [email protected] "\n "
320 FN_DEF@474..691 320 [email protected]
321 [email protected] 321 [email protected]
322 [email protected] "pub" 322 [email protected] "pub"
323 [email protected] " " 323 [email protected] " "
@@ -416,7 +416,7 @@ [email protected]
416 [email protected] "c_int" 416 [email protected] "c_int"
417 [email protected] ";" 417 [email protected] ";"
418 [email protected] "\n " 418 [email protected] "\n "
419 FN_DEF@696..864 419 [email protected]
420 [email protected] 420 [email protected]
421 [email protected] "pub" 421 [email protected] "pub"
422 [email protected] " " 422 [email protected] " "
@@ -510,7 +510,7 @@ [email protected]
510 [email protected] "c_int" 510 [email protected] "c_int"
511 [email protected] ";" 511 [email protected] ";"
512 [email protected] "\n " 512 [email protected] "\n "
513 FN_DEF@869..992 513 [email protected]
514 [email protected] 514 [email protected]
515 [email protected] "pub" 515 [email protected] "pub"
516 [email protected] " " 516 [email protected] " "
@@ -579,7 +579,7 @@ [email protected]
579 [email protected] "c_int" 579 [email protected] "c_int"
580 [email protected] ";" 580 [email protected] ";"
581 [email protected] "\n " 581 [email protected] "\n "
582 FN_DEF@997..1173 582 [email protected]
583 [email protected] 583 [email protected]
584 [email protected] "pub" 584 [email protected] "pub"
585 [email protected] " " 585 [email protected] " "
@@ -690,7 +690,7 @@ [email protected]
690 [email protected] "ssize_t" 690 [email protected] "ssize_t"
691 [email protected] ";" 691 [email protected] ";"
692 [email protected] "\n " 692 [email protected] "\n "
693 FN_DEF@1178..1289 693 [email protected]
694 [email protected] 694 [email protected]
695 [email protected] "pub" 695 [email protected] "pub"
696 [email protected] " " 696 [email protected] " "
@@ -771,7 +771,7 @@ [email protected]
771 [email protected] "ssize_t" 771 [email protected] "ssize_t"
772 [email protected] ";" 772 [email protected] ";"
773 [email protected] "\n " 773 [email protected] "\n "
774 FN_DEF@1294..1481 774 [email protected]
775 [email protected] 775 [email protected]
776 [email protected] "pub" 776 [email protected] "pub"
777 [email protected] " " 777 [email protected] " "
@@ -888,7 +888,7 @@ [email protected]
888 [email protected] "ssize_t" 888 [email protected] "ssize_t"
889 [email protected] ";" 889 [email protected] ";"
890 [email protected] "\n " 890 [email protected] "\n "
891 FN_DEF@1486..1595 891 [email protected]
892 [email protected] 892 [email protected]
893 [email protected] "pub" 893 [email protected] "pub"
894 [email protected] " " 894 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/ok/0032_where_for.rast b/crates/ra_syntax/test_data/parser/ok/0032_where_for.rast
index 8d76c4e0b..1b2325a2d 100644
--- a/crates/ra_syntax/test_data/parser/ok/0032_where_for.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0032_where_for.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..115 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0033_label_break.rast b/crates/ra_syntax/test_data/parser/ok/0033_label_break.rast
index 13b730ded..b3f29638c 100644
--- a/crates/ra_syntax/test_data/parser/ok/0033_label_break.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0033_label_break.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..505 2 [email protected]
3 [email protected] "// format with label ..." 3 [email protected] "// format with label ..."
4 [email protected] "\n" 4 [email protected] "\n"
5 [email protected] "fn" 5 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rast b/crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rast
index 21874ae3a..5ad8c570d 100644
--- a/crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0034_crate_path_in_call.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..61 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast
index bbdf896d1..2e36b54bc 100644
--- a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast
@@ -120,7 +120,7 @@ [email protected]
120 [email protected] "\n\n" 120 [email protected] "\n\n"
121 [email protected] "// Just a grab bag of ..." 121 [email protected] "// Just a grab bag of ..."
122 [email protected] "\n\n" 122 [email protected] "\n\n"
123 FN_DEF@520..572 123 [email protected]
124 [email protected] "fn" 124 [email protected] "fn"
125 [email protected] " " 125 [email protected] " "
126 [email protected] 126 [email protected]
@@ -166,7 +166,7 @@ [email protected]
166 [email protected] " " 166 [email protected] " "
167 [email protected] "}" 167 [email protected] "}"
168 [email protected] "\n\n" 168 [email protected] "\n\n"
169 FN_DEF@574..624 169 [email protected]
170 [email protected] "fn" 170 [email protected] "fn"
171 [email protected] " " 171 [email protected] " "
172 [email protected] 172 [email protected]
@@ -178,7 +178,7 @@ [email protected]
178 [email protected] 178 [email protected]
179 [email protected] "{" 179 [email protected] "{"
180 [email protected] "\n " 180 [email protected] "\n "
181 FN_DEF@591..607 181 [email protected]
182 [email protected] "fn" 182 [email protected] "fn"
183 [email protected] " " 183 [email protected] " "
184 [email protected] 184 [email protected]
@@ -217,7 +217,7 @@ [email protected]
217 [email protected] "\n" 217 [email protected] "\n"
218 [email protected] "}" 218 [email protected] "}"
219 [email protected] "\n\n" 219 [email protected] "\n\n"
220 FN_DEF@626..816 220 [email protected]
221 [email protected] "fn" 221 [email protected] "fn"
222 [email protected] " " 222 [email protected] " "
223 [email protected] 223 [email protected]
@@ -229,7 +229,7 @@ [email protected]
229 [email protected] 229 [email protected]
230 [email protected] "{" 230 [email protected] "{"
231 [email protected] "\n " 231 [email protected] "\n "
232 FN_DEF@642..720 232 [email protected]
233 [email protected] "fn" 233 [email protected] "fn"
234 [email protected] " " 234 [email protected] " "
235 [email protected] 235 [email protected]
@@ -407,7 +407,7 @@ [email protected]
407 [email protected] "\n" 407 [email protected] "\n"
408 [email protected] "}" 408 [email protected] "}"
409 [email protected] "\n\n" 409 [email protected] "\n\n"
410 FN_DEF@818..1322 410 [email protected]
411 [email protected] "fn" 411 [email protected] "fn"
412 [email protected] " " 412 [email protected] " "
413 [email protected] 413 [email protected]
@@ -572,7 +572,7 @@ [email protected]
572 [email protected] "\n" 572 [email protected] "\n"
573 [email protected] "}" 573 [email protected] "}"
574 [email protected] "\n\n" 574 [email protected] "\n\n"
575 FN_DEF@1324..1539 575 [email protected]
576 [email protected] "fn" 576 [email protected] "fn"
577 [email protected] " " 577 [email protected] " "
578 [email protected] 578 [email protected]
@@ -809,7 +809,7 @@ [email protected]
809 [email protected] "\n" 809 [email protected] "\n"
810 [email protected] "}" 810 [email protected] "}"
811 [email protected] "\n\n" 811 [email protected] "\n\n"
812 FN_DEF@1541..1741 812 [email protected]
813 [email protected] "fn" 813 [email protected] "fn"
814 [email protected] " " 814 [email protected] " "
815 [email protected] 815 [email protected]
@@ -830,7 +830,7 @@ [email protected]
830 [email protected] 830 [email protected]
831 [email protected] "{" 831 [email protected] "{"
832 [email protected] "\n " 832 [email protected] "\n "
833 FN_DEF@1575..1598 833 [email protected]
834 [email protected] "fn" 834 [email protected] "fn"
835 [email protected] " " 835 [email protected] " "
836 [email protected] 836 [email protected]
@@ -988,7 +988,7 @@ [email protected]
988 [email protected] "\n" 988 [email protected] "\n"
989 [email protected] "}" 989 [email protected] "}"
990 [email protected] "\n\n" 990 [email protected] "\n\n"
991 FN_DEF@1743..1904 991 [email protected]
992 [email protected] "fn" 992 [email protected] "fn"
993 [email protected] " " 993 [email protected] " "
994 [email protected] 994 [email protected]
@@ -1131,7 +1131,7 @@ [email protected]
1131 [email protected] "\n" 1131 [email protected] "\n"
1132 [email protected] "}" 1132 [email protected] "}"
1133 [email protected] "\n\n" 1133 [email protected] "\n\n"
1134 FN_DEF@1906..1960 1134 [email protected]
1135 [email protected] "fn" 1135 [email protected] "fn"
1136 [email protected] " " 1136 [email protected] " "
1137 [email protected] 1137 [email protected]
@@ -1166,7 +1166,7 @@ [email protected]
1166 [email protected] " " 1166 [email protected] " "
1167 [email protected] "}" 1167 [email protected] "}"
1168 [email protected] "\n\n" 1168 [email protected] "\n\n"
1169 FN_DEF@1962..2198 1169 [email protected]
1170 [email protected] "fn" 1170 [email protected] "fn"
1171 [email protected] " " 1171 [email protected] " "
1172 [email protected] 1172 [email protected]
@@ -1284,7 +1284,7 @@ [email protected]
1284 [email protected] "\n" 1284 [email protected] "\n"
1285 [email protected] "}" 1285 [email protected] "}"
1286 [email protected] "\n\n" 1286 [email protected] "\n\n"
1287 FN_DEF@2200..2693 1287 [email protected]
1288 [email protected] "fn" 1288 [email protected] "fn"
1289 [email protected] " " 1289 [email protected] " "
1290 [email protected] 1290 [email protected]
@@ -1468,7 +1468,7 @@ [email protected]
1468 [email protected] "\n" 1468 [email protected] "\n"
1469 [email protected] "}" 1469 [email protected] "}"
1470 [email protected] "\n\n" 1470 [email protected] "\n\n"
1471 FN_DEF@2695..2832 1471 [email protected]
1472 [email protected] "fn" 1472 [email protected] "fn"
1473 [email protected] " " 1473 [email protected] " "
1474 [email protected] 1474 [email protected]
@@ -1548,7 +1548,7 @@ [email protected]
1548 [email protected] "\n" 1548 [email protected] "\n"
1549 [email protected] "}" 1549 [email protected] "}"
1550 [email protected] "\n\n" 1550 [email protected] "\n\n"
1551 FN_DEF@2834..2906 1551 [email protected]
1552 [email protected] "fn" 1552 [email protected] "fn"
1553 [email protected] " " 1553 [email protected] " "
1554 [email protected] 1554 [email protected]
@@ -1599,7 +1599,7 @@ [email protected]
1599 [email protected] "\n" 1599 [email protected] "\n"
1600 [email protected] "}" 1600 [email protected] "}"
1601 [email protected] "\n\n" 1601 [email protected] "\n\n"
1602 FN_DEF@2908..3042 1602 [email protected]
1603 [email protected] "fn" 1603 [email protected] "fn"
1604 [email protected] " " 1604 [email protected] " "
1605 [email protected] 1605 [email protected]
@@ -1722,7 +1722,7 @@ [email protected]
1722 [email protected] "\n" 1722 [email protected] "\n"
1723 [email protected] "}" 1723 [email protected] "}"
1724 [email protected] "\n\n" 1724 [email protected] "\n\n"
1725 FN_DEF@3044..3514 1725 [email protected]
1726 [email protected] "fn" 1726 [email protected] "fn"
1727 [email protected] " " 1727 [email protected] " "
1728 [email protected] 1728 [email protected]
@@ -2056,7 +2056,7 @@ [email protected]
2056 [email protected] "\n" 2056 [email protected] "\n"
2057 [email protected] "}" 2057 [email protected] "}"
2058 [email protected] "\n\n" 2058 [email protected] "\n\n"
2059 FN_DEF@3516..3552 2059 [email protected]
2060 [email protected] "fn" 2060 [email protected] "fn"
2061 [email protected] " " 2061 [email protected] " "
2062 [email protected] 2062 [email protected]
@@ -2090,7 +2090,7 @@ [email protected]
2090 [email protected] "\n" 2090 [email protected] "\n"
2091 [email protected] "}" 2091 [email protected] "}"
2092 [email protected] "\n\n" 2092 [email protected] "\n\n"
2093 FN_DEF@3554..3812 2093 [email protected]
2094 [email protected] 2094 [email protected]
2095 [email protected] "pub" 2095 [email protected] "pub"
2096 [email protected] " " 2096 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rast b/crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rast
index a64a82e94..a5f09e364 100644
--- a/crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0036_fully_qualified.rast
@@ -1,7 +1,7 @@
1[email protected] 1[email protected]
2 [email protected] "// https://github.com ..." 2 [email protected] "// https://github.com ..."
3 [email protected] "\n\n" 3 [email protected] "\n\n"
4 FN_DEF@62..156 4 [email protected]
5 [email protected] 5 [email protected]
6 [email protected] "pub" 6 [email protected] "pub"
7 [email protected] " " 7 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rast b/crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rast
index 7fd414090..22168eaf1 100644
--- a/crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0038_where_pred_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..34 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rast b/crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rast
index 17be2c238..68a366354 100644
--- a/crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0039_raw_fn_item.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..14 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rast b/crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rast
index acf32a852..92ede8ccb 100644
--- a/crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0041_raw_keywords.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..59 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast
index 573edc081..4f0c68822 100644
--- a/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast
@@ -20,7 +20,7 @@ [email protected]
20 [email protected] 20 [email protected]
21 [email protected] "{" 21 [email protected] "{"
22 [email protected] "\n " 22 [email protected] "\n "
23 FN_DEF@90..139 23 [email protected]
24 [email protected] "fn" 24 [email protected] "fn"
25 [email protected] " " 25 [email protected] " "
26 [email protected] 26 [email protected]
@@ -55,7 +55,7 @@ [email protected]
55 [email protected] "\n" 55 [email protected] "\n"
56 [email protected] "}" 56 [email protected] "}"
57 [email protected] "\n\n" 57 [email protected] "\n\n"
58 FN_DEF@143..161 58 [email protected]
59 [email protected] "fn" 59 [email protected] "fn"
60 [email protected] " " 60 [email protected] " "
61 [email protected] 61 [email protected]
@@ -78,7 +78,7 @@ [email protected]
78 [email protected] "{" 78 [email protected] "{"
79 [email protected] "}" 79 [email protected] "}"
80 [email protected] "\n\n" 80 [email protected] "\n\n"
81 FN_DEF@163..198 81 [email protected]
82 [email protected] "fn" 82 [email protected] "fn"
83 [email protected] " " 83 [email protected] " "
84 [email protected] 84 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast
index 900eeb445..22eb22e3c 100644
--- a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast
@@ -30,7 +30,7 @@ [email protected]
30 [email protected] " " 30 [email protected] " "
31 [email protected] "}" 31 [email protected] "}"
32 [email protected] "\n\n" 32 [email protected] "\n\n"
33 FN_DEF@92..159 33 [email protected]
34 [email protected] "fn" 34 [email protected] "fn"
35 [email protected] " " 35 [email protected] " "
36 [email protected] 36 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast b/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast
index 6d941487b..c9e6d88eb 100644
--- a/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..165 2 [email protected]
3 [email protected] "// https://github.com ..." 3 [email protected] "// https://github.com ..."
4 [email protected] "\n" 4 [email protected] "\n"
5 [email protected] "fn" 5 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rast b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rast
index 69aa0ba4d..5ebc53618 100644
--- a/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..461 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -101,7 +101,7 @@ [email protected]
101 [email protected] 101 [email protected]
102 [email protected] "{" 102 [email protected] "{"
103 [email protected] "\n " 103 [email protected] "\n "
104 FN_DEF@544..683 104 [email protected]
105 [email protected] "fn" 105 [email protected] "fn"
106 [email protected] " " 106 [email protected] " "
107 [email protected] 107 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast
index 38e44e48a..29a5d48e6 100644
--- a/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast
@@ -1,7 +1,7 @@
1[email protected] 1[email protected]
2 [email protected] "// https://github.com ..." 2 [email protected] "// https://github.com ..."
3 [email protected] "\n\n" 3 [email protected] "\n\n"
4 FN_DEF@62..341 4 [email protected]
5 [email protected] "fn" 5 [email protected] "fn"
6 [email protected] " " 6 [email protected] " "
7 [email protected] 7 [email protected]
@@ -288,7 +288,7 @@ [email protected]
288 [email protected] "\n" 288 [email protected] "\n"
289 [email protected] "}" 289 [email protected] "}"
290 [email protected] "\n\n" 290 [email protected] "\n\n"
291 FN_DEF@369..394 291 [email protected]
292 [email protected] "fn" 292 [email protected] "fn"
293 [email protected] " " 293 [email protected] " "
294 [email protected] 294 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rast b/crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rast
index 28233c5d0..662576e5f 100644
--- a/crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0048_compound_assignment.rast
@@ -1,7 +1,7 @@
1[email protected] 1[email protected]
2 [email protected] "// https://github.com ..." 2 [email protected] "// https://github.com ..."
3 [email protected] "\n\n" 3 [email protected] "\n\n"
4 FN_DEF@60..256 4 [email protected]
5 [email protected] "fn" 5 [email protected] "fn"
6 [email protected] " " 6 [email protected] " "
7 [email protected] 7 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0049_async_block.rast b/crates/ra_syntax/test_data/parser/ok/0049_async_block.rast
index 0569488f8..57ecad3cf 100644
--- a/crates/ra_syntax/test_data/parser/ok/0049_async_block.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0049_async_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..45 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rast b/crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rast
index 7847da085..798e81ca6 100644
--- a/crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0050_async_block_as_argument.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..52 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -52,7 +52,7 @@ [email protected]
52 [email protected] "{" 52 [email protected] "{"
53 [email protected] "}" 53 [email protected] "}"
54 [email protected] "\n\n" 54 [email protected] "\n\n"
55 FN_DEF@54..94 55 [email protected]
56 [email protected] "fn" 56 [email protected] "fn"
57 [email protected] " " 57 [email protected] " "
58 [email protected] 58 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast b/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast
index 919c690de..9a173b002 100644
--- a/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..37 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -41,7 +41,7 @@ [email protected]
41 [email protected] "{" 41 [email protected] "{"
42 [email protected] "}" 42 [email protected] "}"
43 [email protected] "\n" 43 [email protected] "\n"
44 FN_DEF@38..62 44 [email protected]
45 [email protected] "fn" 45 [email protected] "fn"
46 [email protected] " " 46 [email protected] " "
47 [email protected] 47 [email protected]
@@ -83,7 +83,7 @@ [email protected]
83 [email protected] 83 [email protected]
84 [email protected] "{" 84 [email protected] "{"
85 [email protected] " " 85 [email protected] " "
86 FN_DEF@77..126 86 [email protected]
87 [email protected] "fn" 87 [email protected] "fn"
88 [email protected] " " 88 [email protected] " "
89 [email protected] 89 [email protected]
@@ -132,7 +132,7 @@ [email protected]
132 [email protected] " " 132 [email protected] " "
133 [email protected] "}" 133 [email protected] "}"
134 [email protected] "\n\n" 134 [email protected] "\n\n"
135 FN_DEF@130..172 135 [email protected]
136 [email protected] "fn" 136 [email protected] "fn"
137 [email protected] " " 137 [email protected] " "
138 [email protected] 138 [email protected]
@@ -195,7 +195,7 @@ [email protected]
195 [email protected] 195 [email protected]
196 [email protected] "{" 196 [email protected] "{"
197 [email protected] "\n " 197 [email protected] "\n "
198 FN_DEF@190..234 198 [email protected]
199 [email protected] "fn" 199 [email protected] "fn"
200 [email protected] " " 200 [email protected] " "
201 [email protected] 201 [email protected]
@@ -263,7 +263,7 @@ [email protected]
263 [email protected] 263 [email protected]
264 [email protected] "{" 264 [email protected] "{"
265 [email protected] "\n " 265 [email protected] "\n "
266 FN_DEF@252..277 266 [email protected]
267 [email protected] "fn" 267 [email protected] "fn"
268 [email protected] " " 268 [email protected] " "
269 [email protected] 269 [email protected]
@@ -287,7 +287,7 @@ [email protected]
287 [email protected] "{" 287 [email protected] "{"
288 [email protected] "}" 288 [email protected] "}"
289 [email protected] "\n " 289 [email protected] "\n "
290 FN_DEF@283..305 290 [email protected]
291 [email protected] "fn" 291 [email protected] "fn"
292 [email protected] " " 292 [email protected] " "
293 [email protected] 293 [email protected]
@@ -311,7 +311,7 @@ [email protected]
311 [email protected] "{" 311 [email protected] "{"
312 [email protected] "}" 312 [email protected] "}"
313 [email protected] "\n " 313 [email protected] "\n "
314 FN_DEF@311..334 314 [email protected]
315 [email protected] "fn" 315 [email protected] "fn"
316 [email protected] " " 316 [email protected] " "
317 [email protected] 317 [email protected]
@@ -336,7 +336,7 @@ [email protected]
336 [email protected] "{" 336 [email protected] "{"
337 [email protected] "}" 337 [email protected] "}"
338 [email protected] "\n " 338 [email protected] "\n "
339 FN_DEF@340..371 339 [email protected]
340 [email protected] "fn" 340 [email protected] "fn"
341 [email protected] " " 341 [email protected] " "
342 [email protected] 342 [email protected]
@@ -368,7 +368,7 @@ [email protected]
368 [email protected] "{" 368 [email protected] "{"
369 [email protected] "}" 369 [email protected] "}"
370 [email protected] "\n " 370 [email protected] "\n "
371 FN_DEF@377..407 371 [email protected]
372 [email protected] "fn" 372 [email protected] "fn"
373 [email protected] " " 373 [email protected] " "
374 [email protected] 374 [email protected]
@@ -400,7 +400,7 @@ [email protected]
400 [email protected] "{" 400 [email protected] "{"
401 [email protected] "}" 401 [email protected] "}"
402 [email protected] "\n " 402 [email protected] "\n "
403 FN_DEF@413..447 403 [email protected]
404 [email protected] "fn" 404 [email protected] "fn"
405 [email protected] " " 405 [email protected] " "
406 [email protected] 406 [email protected]
@@ -434,7 +434,7 @@ [email protected]
434 [email protected] "{" 434 [email protected] "{"
435 [email protected] "}" 435 [email protected] "}"
436 [email protected] "\n " 436 [email protected] "\n "
437 FN_DEF@453..480 437 [email protected]
438 [email protected] "fn" 438 [email protected] "fn"
439 [email protected] " " 439 [email protected] " "
440 [email protected] 440 [email protected]
@@ -465,7 +465,7 @@ [email protected]
465 [email protected] "{" 465 [email protected] "{"
466 [email protected] "}" 466 [email protected] "}"
467 [email protected] "\n " 467 [email protected] "\n "
468 FN_DEF@486..517 468 [email protected]
469 [email protected] "fn" 469 [email protected] "fn"
470 [email protected] " " 470 [email protected] " "
471 [email protected] 471 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0052_for_range_block.rast b/crates/ra_syntax/test_data/parser/ok/0052_for_range_block.rast
index 65cfa7bc5..a30000398 100644
--- a/crates/ra_syntax/test_data/parser/ok/0052_for_range_block.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0052_for_range_block.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..79 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast b/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast
index d6aec7ab9..e3997ac5b 100644
--- a/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..26 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -35,7 +35,7 @@ [email protected]
35 [email protected] "{" 35 [email protected] "{"
36 [email protected] "}" 36 [email protected] "}"
37 [email protected] "\n\n" 37 [email protected] "\n\n"
38 FN_DEF@28..56 38 [email protected]
39 [email protected] "fn" 39 [email protected] "fn"
40 [email protected] " " 40 [email protected] " "
41 [email protected] 41 [email protected]
@@ -77,7 +77,7 @@ [email protected]
77 [email protected] "{" 77 [email protected] "{"
78 [email protected] "}" 78 [email protected] "}"
79 [email protected] "\n\n" 79 [email protected] "\n\n"
80 FN_DEF@58..87 80 [email protected]
81 [email protected] "fn" 81 [email protected] "fn"
82 [email protected] " " 82 [email protected] " "
83 [email protected] 83 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast b/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast
index 9e0cec35f..1c893180c 100644
--- a/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast
@@ -12,7 +12,7 @@ [email protected]
12 [email protected] ")" 12 [email protected] ")"
13 [email protected] ";" 13 [email protected] ";"
14 [email protected] "\n\n" 14 [email protected] "\n\n"
15 FN_DEF@14..48 15 [email protected]
16 [email protected] "fn" 16 [email protected] "fn"
17 [email protected] " " 17 [email protected] " "
18 [email protected] 18 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0056_neq_in_type.rast b/crates/ra_syntax/test_data/parser/ok/0056_neq_in_type.rast
index 7fa3033ac..3ef916e55 100644
--- a/crates/ra_syntax/test_data/parser/ok/0056_neq_in_type.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0056_neq_in_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..70 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0057_loop_in_call.rast b/crates/ra_syntax/test_data/parser/ok/0057_loop_in_call.rast
index d93968016..53410a1ee 100644
--- a/crates/ra_syntax/test_data/parser/ok/0057_loop_in_call.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0057_loop_in_call.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..17 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -23,7 +23,7 @@ [email protected]
23 [email protected] "{" 23 [email protected] "{"
24 [email protected] "}" 24 [email protected] "}"
25 [email protected] "\n\n" 25 [email protected] "\n\n"
26 FN_DEF@19..50 26 [email protected]
27 [email protected] "fn" 27 [email protected] "fn"
28 [email protected] " " 28 [email protected] " "
29 [email protected] 29 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0058_unary_expr_precedence.rast b/crates/ra_syntax/test_data/parser/ok/0058_unary_expr_precedence.rast
index b5c72ee36..a1dfd58f2 100644
--- a/crates/ra_syntax/test_data/parser/ok/0058_unary_expr_precedence.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0058_unary_expr_precedence.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..78 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rast b/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rast
index ddcb139c1..767b516a2 100644
--- a/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0059_loops_in_parens.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..104 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0060_as_range.rast b/crates/ra_syntax/test_data/parser/ok/0060_as_range.rast
index 098152fc3..1fd1a2888 100644
--- a/crates/ra_syntax/test_data/parser/ok/0060_as_range.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0060_as_range.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..55 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0061_match_full_range.rast b/crates/ra_syntax/test_data/parser/ok/0061_match_full_range.rast
index c6e982976..ba49c115b 100644
--- a/crates/ra_syntax/test_data/parser/ok/0061_match_full_range.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0061_match_full_range.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..34 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rast b/crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rast
index bf791ee2b..0c22c31a4 100644
--- a/crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0062_macro_2.0.rast
@@ -51,7 +51,7 @@ [email protected]
51 [email protected] "\n" 51 [email protected] "\n"
52 [email protected] "}" 52 [email protected] "}"
53 [email protected] "\n\n" 53 [email protected] "\n\n"
54 FN_DEF@95..348 54 [email protected]
55 [email protected] 55 [email protected]
56 [email protected] "#" 56 [email protected] "#"
57 [email protected] "[" 57 [email protected] "["
diff --git a/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast
index 40619b46e..a87bbf4eb 100644
--- a/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast
@@ -8,7 +8,7 @@ [email protected]
8 [email protected] 8 [email protected]
9 [email protected] "{" 9 [email protected] "{"
10 [email protected] "\n " 10 [email protected] "\n "
11 FN_DEF@14..46 11 [email protected]
12 [email protected] "fn" 12 [email protected] "fn"
13 [email protected] " " 13 [email protected] " "
14 [email protected] 14 [email protected]
@@ -50,7 +50,7 @@ [email protected]
50 [email protected] "{" 50 [email protected] "{"
51 [email protected] "}" 51 [email protected] "}"
52 [email protected] "\n " 52 [email protected] "\n "
53 FN_DEF@51..74 53 [email protected]
54 [email protected] "fn" 54 [email protected] "fn"
55 [email protected] " " 55 [email protected] " "
56 [email protected] 56 [email protected]
@@ -92,7 +92,7 @@ [email protected]
92 [email protected] "{" 92 [email protected] "{"
93 [email protected] "}" 93 [email protected] "}"
94 [email protected] "\n " 94 [email protected] "\n "
95 FN_DEF@79..108 95 [email protected]
96 [email protected] "fn" 96 [email protected] "fn"
97 [email protected] " " 97 [email protected] " "
98 [email protected] 98 [email protected]
@@ -123,7 +123,7 @@ [email protected]
123 [email protected] "{" 123 [email protected] "{"
124 [email protected] "}" 124 [email protected] "}"
125 [email protected] "\n " 125 [email protected] "\n "
126 FN_DEF@113..135 126 [email protected]
127 [email protected] "fn" 127 [email protected] "fn"
128 [email protected] " " 128 [email protected] " "
129 [email protected] 129 [email protected]
@@ -155,7 +155,7 @@ [email protected]
155 [email protected] "{" 155 [email protected] "{"
156 [email protected] "}" 156 [email protected] "}"
157 [email protected] "\n " 157 [email protected] "\n "
158 FN_DEF@140..167 158 [email protected]
159 [email protected] "fn" 159 [email protected] "fn"
160 [email protected] " " 160 [email protected] " "
161 [email protected] 161 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast b/crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast
index 5a9f07c89..7adedb02e 100644
--- a/crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0063_variadic_fun.rast
@@ -8,7 +8,7 @@ [email protected]
8 [email protected] 8 [email protected]
9 [email protected] "{" 9 [email protected] "{"
10 [email protected] "\n " 10 [email protected] "\n "
11 FN_DEF@17..40 11 [email protected]
12 [email protected] "fn" 12 [email protected] "fn"
13 [email protected] " " 13 [email protected] " "
14 [email protected] 14 [email protected]
@@ -37,7 +37,7 @@ [email protected]
37 [email protected] ")" 37 [email protected] ")"
38 [email protected] ";" 38 [email protected] ";"
39 [email protected] "\n " 39 [email protected] "\n "
40 FN_DEF@45..70 40 [email protected]
41 [email protected] "fn" 41 [email protected] "fn"
42 [email protected] " " 42 [email protected] " "
43 [email protected] 43 [email protected]
@@ -69,7 +69,7 @@ [email protected]
69 [email protected] ")" 69 [email protected] ")"
70 [email protected] ";" 70 [email protected] ";"
71 [email protected] "\n " 71 [email protected] "\n "
72 FN_DEF@75..123 72 [email protected]
73 [email protected] "fn" 73 [email protected] "fn"
74 [email protected] " " 74 [email protected] " "
75 [email protected] 75 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast
index 7b026e33b..ef0eca47c 100644
--- a/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 FN_DEF@13..45 14 [email protected]
15 [email protected] "fn" 15 [email protected] "fn"
16 [email protected] " " 16 [email protected] " "
17 [email protected] 17 [email protected]
@@ -53,7 +53,7 @@ [email protected]
53 [email protected] "{" 53 [email protected] "{"
54 [email protected] "}" 54 [email protected] "}"
55 [email protected] "\n " 55 [email protected] "\n "
56 FN_DEF@50..73 56 [email protected]
57 [email protected] "fn" 57 [email protected] "fn"
58 [email protected] " " 58 [email protected] " "
59 [email protected] 59 [email protected]
@@ -95,7 +95,7 @@ [email protected]
95 [email protected] "{" 95 [email protected] "{"
96 [email protected] "}" 96 [email protected] "}"
97 [email protected] "\n " 97 [email protected] "\n "
98 FN_DEF@78..107 98 [email protected]
99 [email protected] "fn" 99 [email protected] "fn"
100 [email protected] " " 100 [email protected] " "
101 [email protected] 101 [email protected]
@@ -126,7 +126,7 @@ [email protected]
126 [email protected] "{" 126 [email protected] "{"
127 [email protected] "}" 127 [email protected] "}"
128 [email protected] "\n " 128 [email protected] "\n "
129 FN_DEF@112..134 129 [email protected]
130 [email protected] "fn" 130 [email protected] "fn"
131 [email protected] " " 131 [email protected] " "
132 [email protected] 132 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0065_comment_newline.rast b/crates/ra_syntax/test_data/parser/ok/0065_comment_newline.rast
index d1fffdd63..29bd38c05 100644
--- a/crates/ra_syntax/test_data/parser/ok/0065_comment_newline.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0065_comment_newline.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..25 2 [email protected]
3 [email protected] "/// Example" 3 [email protected] "/// Example"
4 [email protected] "\n\n" 4 [email protected] "\n\n"
5 [email protected] "fn" 5 [email protected] "fn"
diff --git a/crates/ra_syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast b/crates/ra_syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast
index eb2f8eb3c..7996dc121 100644
--- a/crates/ra_syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0065_plus_after_fn_trait_bound.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..39 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast b/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast
index 503585103..e4c2578f6 100644
--- a/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0067_where_for_pred.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 FN_DEF@0..55 2 [email protected]
3 [email protected] "fn" 3 [email protected] "fn"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -59,7 +59,7 @@ [email protected]
59 [email protected] "\n" 59 [email protected] "\n"
60 [email protected] "}" 60 [email protected] "}"
61 [email protected] "\n" 61 [email protected] "\n"
62 FN_DEF@56..107 62 [email protected]
63 [email protected] "fn" 63 [email protected] "fn"
64 [email protected] " " 64 [email protected] " "
65 [email protected] 65 [email protected]
@@ -110,7 +110,7 @@ [email protected]
110 [email protected] "\n" 110 [email protected] "\n"
111 [email protected] "}" 111 [email protected] "}"
112 [email protected] "\n" 112 [email protected] "\n"
113 FN_DEF@108..170 113 [email protected]
114 [email protected] "fn" 114 [email protected] "fn"
115 [email protected] " " 115 [email protected] " "
116 [email protected] 116 [email protected]
@@ -177,7 +177,7 @@ [email protected]
177 [email protected] "\n" 177 [email protected] "\n"
178 [email protected] "}" 178 [email protected] "}"
179 [email protected] "\n" 179 [email protected] "\n"
180 FN_DEF@171..223 180 [email protected]
181 [email protected] "fn" 181 [email protected] "fn"
182 [email protected] " " 182 [email protected] " "
183 [email protected] 183 [email protected]
@@ -231,7 +231,7 @@ [email protected]
231 [email protected] "\n" 231 [email protected] "\n"
232 [email protected] "}" 232 [email protected] "}"
233 [email protected] "\n" 233 [email protected] "\n"
234 FN_DEF@224..300 234 [email protected]
235 [email protected] "fn" 235 [email protected] "fn"
236 [email protected] " " 236 [email protected] " "
237 [email protected] 237 [email protected]
@@ -313,7 +313,7 @@ [email protected]
313 [email protected] "\n" 313 [email protected] "\n"
314 [email protected] "}" 314 [email protected] "}"
315 [email protected] "\n" 315 [email protected] "\n"
316 FN_DEF@301..373 316 [email protected]
317 [email protected] "fn" 317 [email protected] "fn"
318 [email protected] " " 318 [email protected] " "
319 [email protected] 319 [email protected]
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 87a1367ac..3a0780eb5 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -1095,7 +1095,7 @@ pub(crate) fn handle_call_hierarchy_prepare(
1095 let RangeInfo { range: _, info: navs } = nav_info; 1095 let RangeInfo { range: _, info: navs } = nav_info;
1096 let res = navs 1096 let res = navs
1097 .into_iter() 1097 .into_iter()
1098 .filter(|it| it.kind == SyntaxKind::FN_DEF) 1098 .filter(|it| it.kind == SyntaxKind::FN)
1099 .map(|it| to_proto::call_hierarchy_item(&snap, it)) 1099 .map(|it| to_proto::call_hierarchy_item(&snap, it))
1100 .collect::<Result<Vec<_>>>()?; 1100 .collect::<Result<Vec<_>>>()?;
1101 1101
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index c6935c029..f86e55d39 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -31,7 +31,7 @@ pub(crate) fn range(line_index: &LineIndex, range: TextRange) -> lsp_types::Rang
31 31
32pub(crate) fn symbol_kind(syntax_kind: SyntaxKind) -> lsp_types::SymbolKind { 32pub(crate) fn symbol_kind(syntax_kind: SyntaxKind) -> lsp_types::SymbolKind {
33 match syntax_kind { 33 match syntax_kind {
34 SyntaxKind::FN_DEF => lsp_types::SymbolKind::Function, 34 SyntaxKind::FN => lsp_types::SymbolKind::Function,
35 SyntaxKind::STRUCT_DEF => lsp_types::SymbolKind::Struct, 35 SyntaxKind::STRUCT_DEF => lsp_types::SymbolKind::Struct,
36 SyntaxKind::ENUM_DEF => lsp_types::SymbolKind::Enum, 36 SyntaxKind::ENUM_DEF => lsp_types::SymbolKind::Enum,
37 SyntaxKind::ENUM_VARIANT => lsp_types::SymbolKind::EnumMember, 37 SyntaxKind::ENUM_VARIANT => lsp_types::SymbolKind::EnumMember,