Skip to content

(arg) - Rust

argument positions in call sites and function parameters

clojure
(arg pos? val?)

Where:

  1. pos: position in the list (1-based) *
  2. val: value at that position *

Examples

Find calls that pass None as a fallback value.

clojure
(call _ (arg 2 (id None)))

Selects in lines { 1 } but not in { 2 }:

rust
cache.get(key, None);
cache.get(key, Some(value));

Find handlers whose first parameter is ctx.

clojure
(fun _ (arg 1 (id ctx)))

Selects in lines { 1 } but not in { 2 }:

rust
fn handle(ctx: &Context, req: Request) {}
fn render(req: Request) {}

Arguments

pos

  1. Number
  2. Numeric Range

Does NOT support: CompositionFree-form SelectionRefinementReplacement

val

Copyright © 2022-present Semantic Works, Inc.