44 matches across 1 files for func main path:compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
snippet_mode: auto · sorted by relevance
compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs RUST 44 matches · showing 5 view file →
462 && let Some(pos) = args.iter().position(|arg| arg.hir_id == expr.hir_id)
463 {
464 // The move occurred as one of the arguments to a function call. Is that
465 // argument generic? `def_id` can't be a closure here, so using `fn_sig` is fine
466 let arg_param = if self.infcx.tcx.def_kind(def_id).is_fn_like()
· · ·
476
477 // If the moved value is a mut reference, it is used in a
478 // generic function and it's type is a generic param, it can be
479 // reborrowed to avoid moving.
480 // for example:
· · ·
512 && let Some(arg) = fn_decl.inputs.get(pos + offset)
513 {
514 // If we can't suggest borrowing in the call, but the function definition
515 // is local, instead offer changing the function to borrow that argument.
516 let mut span: MultiSpan = arg.span.into();
· · ·
515 // is local, instead offer changing the function to borrow that argument.
516 let mut span: MultiSpan = arg.span.into();
517 span.push_span_label(
· · ·
520 );
521 let descr = match node.fn_kind() {
522 Some(hir::intravisit::FnKind::ItemFn(..)) | None => "function",
523 Some(hir::intravisit::FnKind::Method(..)) => "method",
524 Some(hir::intravisit::FnKind::Closure) => "closure",
+ 39 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.