Function clippy_lints::utils::snippet
[−]
[src]
pub fn snippet<'a, 'b, T: LintContext<'b>>(
cx: &T,
span: Span,
default: &'a str
) -> Cow<'a, str>
Convert a span to a code snippet if available, otherwise use default.
Example
ⓘThis example is not tested
snippet(cx, expr.span, "..")