diff options
| author | Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer <github35764891676564198441@oli-obk.de> | 2018-11-22 15:08:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-22 15:08:13 +0100 |
| commit | ff7da3264e0b848cf728f0f20a44cd1c3172ec89 (patch) | |
| tree | 619979ab33ae98b89cbb81960f7c84b6ccfc76aa | |
| parent | 2f6881c62325c34115502b8901bf3ef0931b23cd (diff) | |
| parent | c4b08a5b0cb4eeac8f95b46a25819d1d09e84c28 (diff) | |
| download | rust-ff7da3264e0b848cf728f0f20a44cd1c3172ec89.tar.gz rust-ff7da3264e0b848cf728f0f20a44cd1c3172ec89.zip | |
Merge pull request #3447 from phansch/small_rename
s/file_map/source_map
| -rw-r--r-- | clippy_lints/src/utils/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 6e81f3d0199..457aa3f8500 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -413,9 +413,9 @@ pub fn snippet_block<'a, 'b, T: LintContext<'b>>(cx: &T, span: Span, default: &' /// Returns a new Span that covers the full last line of the given Span pub fn last_line_of_span<'a, T: LintContext<'a>>(cx: &T, span: Span) -> Span { - let file_map_and_line = cx.sess().source_map().lookup_line(span.lo()).unwrap(); - let line_no = file_map_and_line.line; - let line_start = &file_map_and_line.sf.lines[line_no]; + let source_map_and_line = cx.sess().source_map().lookup_line(span.lo()).unwrap(); + let line_no = source_map_and_line.line; + let line_start = &source_map_and_line.sf.lines[line_no]; Span::new(*line_start, span.hi(), span.ctxt()) } |
