34// Assist: inline_into_callers
35//
36▶// Inline a function or method body into all of its callers where possible, creating a `let` statement per parameter
37// unless the parameter can be inlined. The parameter will be inlined either if it the supplied argument is a simple local
38// or if the parameter is only accessed inside the function body once.
· · ·
38▶// or if the parameter is only accessed inside the function body once.
39// If all calls can be inlined the function will be removed.
40//
· · ·
39▶// If all calls can be inlined the function will be removed.
40//
41// ```
· · ·
74 let vfs_def_file = ctx.vfs_file_id();
75 let name = ctx.find_node_at_offset::<ast::Name>()?;
76▶ let ast_func = name.syntax().parent().and_then(ast::Fn::cast)?;
77 let func_body = ast_func.body()?;
78 let param_list = ast_func.param_list()?;
· · ·
77▶ let func_body = ast_func.body()?;
78 let param_list = ast_func.param_list()?;
79
+ 90 more matches in this file