86 matches across 1 files for func main path:src/tools/rust-analyzer/crates/ide/src/goto_definition.rs
snippet_mode: grep · sorted by relevance
src/tools/rust-analyzer/crates/ide/src/goto_definition.rs RUST 86 matches · showing 5 view file →
179 sema: &Semantics<'_, RootDatabase>,
180 node: &SyntaxNode,
181) -> Option<hir::Function> {
182 let node = ast::TryExpr::cast(node.clone())?;
183 let try_expr_ty = sema.type_of_expr(&node.expr()?)?.adjusted();
· · ·
205
206 let from_trait = fd.core_convert_From()?;
207 let from_fn = from_trait.function(sema.db, sym::from)?;
208 sema.resolve_trait_impl_method(
209 returned_err_ty.clone(),
· · ·
221 let method_call = ast::MethodCallExpr::cast(original_token.parent()?.parent()?)?;
222 let callable = sema.resolve_method_call_as_callable(&method_call)?;
223 let CallableKind::Function(f) = callable.kind() else { return None };
224 let assoc = f.as_assoc_item(sema.db)?;
225
· · ·
233 {
234 let t = fd.core_convert_FromStr()?;
235 let t_f = t.function(sema.db, &sym::from_str)?;
236 return sema
237 .resolve_trait_impl_method(
· · ·
249 let f = if fn_name == sym::into && fd.core_convert_Into() == Some(t) {
250 let dual = fd.core_convert_From()?;
251 let dual_f = dual.function(sema.db, &sym::from)?;
252 sema.resolve_trait_impl_method(
253 return_type.clone(),
+ 81 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.