mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #39453 - nrc:save-path, r=nikomatsakis
save-analysis: be more paranoid about generated paths fixes https://github.com/rust-lang-nursery/rls/issues/160
This commit is contained in:
@@ -430,6 +430,9 @@ pub fn get_trait_ref_data(&self,
|
||||
-> Option<TypeRefData> {
|
||||
self.lookup_ref_id(trait_ref.ref_id).and_then(|def_id| {
|
||||
let span = trait_ref.path.span;
|
||||
if generated_code(span) {
|
||||
return None;
|
||||
}
|
||||
let sub_span = self.span_utils.sub_span_for_type_name(span).or(Some(span));
|
||||
filter!(self.span_utils, sub_span, span, None);
|
||||
Some(TypeRefData {
|
||||
|
||||
@@ -1691,6 +1691,7 @@ pub fn parse_path(&mut self, mode: PathStyle) -> PResult<'a, ast::Path> {
|
||||
}
|
||||
|
||||
// Assemble the span.
|
||||
// FIXME(#39450) This is bogus if part of the path is macro generated.
|
||||
let span = mk_sp(lo, self.prev_span.hi);
|
||||
|
||||
// Assemble the result.
|
||||
|
||||
Reference in New Issue
Block a user