From da4cbac965c068983b4195e9c3607e72fd0bebb9 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Wed, 15 Mar 2017 08:49:34 +0000 Subject: [PATCH] Don't follow include! expansion to origin (#149) --- src/components/cargo/diagnostic_parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/cargo/diagnostic_parser.ts b/src/components/cargo/diagnostic_parser.ts index 681e45c..5351316 100644 --- a/src/components/cargo/diagnostic_parser.ts +++ b/src/components/cargo/diagnostic_parser.ts @@ -98,7 +98,7 @@ export class DiagnosticParser { } // Following macro expansion to get correct file name and range. - while (primarySpan.expansion && primarySpan.expansion.span) { + while (primarySpan.expansion && primarySpan.expansion.span && primarySpan.expansion.macro_decl_name !== 'include!') { primarySpan = primarySpan.expansion.span; }