Function clippy::utils::snippet
[−]
[src]
pub fn snippet<'a, T: LintContext>(cx: &T, span: Span, default: &'a str) -> Cow<'a, str>
convert a span to a code snippet if available, otherwise use default, e.g.
snippet(cx, expr.span, "..")