Skip to content

Commit a2eb43b

Browse files
authoredFeb 4, 2017
Rollup merge of rust-lang#39453 - nrc:save-path, r=nikomatsakis
save-analysis: be more paranoid about generated paths fixes rust-lang/rls#160
2 parents 2505fd3 + 395f23c commit a2eb43b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
 

‎src/librustc_save_analysis/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,9 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
430430
-> Option<TypeRefData> {
431431
self.lookup_ref_id(trait_ref.ref_id).and_then(|def_id| {
432432
let span = trait_ref.path.span;
433+
if generated_code(span) {
434+
return None;
435+
}
433436
let sub_span = self.span_utils.sub_span_for_type_name(span).or(Some(span));
434437
filter!(self.span_utils, sub_span, span, None);
435438
Some(TypeRefData {

‎src/libsyntax/parse/parser.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,7 @@ impl<'a> Parser<'a> {
16911691
}
16921692

16931693
// Assemble the span.
1694+
// FIXME(#39450) This is bogus if part of the path is macro generated.
16941695
let span = mk_sp(lo, self.prev_span.hi);
16951696

16961697
// Assemble the result.

0 commit comments

Comments
 (0)