Skip to content

Commit 612b923

Browse files
committed
Rust: Undo hiding some warnings in the extraction consistency check query.
1 parent 63d8bb7 commit 612b923

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

rust/ql/consistency-queries/ExtractionConsistency.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@ query predicate extractionError(ExtractionError ee) {
1212
}
1313

1414
query predicate extractionWarning(ExtractionWarning ew) {
15-
(not exists(ew.getLocation()) or ew.getLocation().fromSource()) and
16-
// macro expansion failures are expected for macros like compile_error! and panic!
17-
not ew.getMessage().matches("macro expansion failed for%")
15+
(not exists(ew.getLocation()) or ew.getLocation().fromSource())
1816
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extractionWarning
2+
| macro_expansion.rs:56:9:56:31 | macro expansion failed for 'concat' |

rust/ql/test/query-tests/diagnostics/CONSISTENCY/ExtractionConsistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ extractionWarning
55
| does_not_compile.rs:2:21:2:20 | expected SEMICOLON |
66
| does_not_compile.rs:2:26:2:25 | expected SEMICOLON |
77
| error.rs:2:5:2:17 | An error! |
8+
| my_macro.rs:17:9:17:27 | macro expansion failed for 'myUndefinedMacro' |

0 commit comments

Comments
 (0)