45 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 45 matches · showing 5 view file →
465 && let Some(pos) = args.iter().position(|arg| arg.hir_id == expr.hir_id)
466 {
467 // The move occurred as one of the arguments to a function call. Is that
468 // argument generic? `def_id` can't be a closure here, so using `fn_sig` is fine
469 let arg_param = if self.infcx.tcx.def_kind(def_id).is_fn_like()
· · ·
479
480 // If the moved value is a mut reference, it is used in a
481 // generic function and it's type is a generic param, it can be
482 // reborrowed to avoid moving.
483 // for example:
· · ·
515 && let Some(arg) = fn_decl.inputs.get(pos + offset)
516 {
517 // If we can't suggest borrowing in the call, but the function definition
518 // is local, instead offer changing the function to borrow that argument.
519 let mut span: MultiSpan = arg.span.into();
· · ·
518 // is local, instead offer changing the function to borrow that argument.
519 let mut span: MultiSpan = arg.span.into();
520 span.push_span_label(
· · ·
523 );
524 let descr = match node.fn_kind() {
525 Some(hir::intravisit::FnKind::ItemFn(..)) | None => "function",
526 Some(hir::intravisit::FnKind::Method(..)) => "method",
527 Some(hir::intravisit::FnKind::Closure) => "closure",
+ 40 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.