Skip to content

Commit 840b110

Browse files
authored
Merge pull request #254 from dtolnay/builddate
Normalize compiler build date note
2 parents 52caff6 + 7126507 commit 840b110

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/normalize.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,12 @@ impl<'a> Filter<'a> {
336336
return None;
337337
}
338338

339+
if trim_start.starts_with("= note: this compiler was built on 2")
340+
&& trim_start.ends_with("; consider upgrading it if it is out of date")
341+
{
342+
return None;
343+
}
344+
339345
if self.normalization >= StripCouldNotCompile {
340346
if line.starts_with("error: Could not compile `") {
341347
return None;

src/tests/gated-feature.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
test_normalize! {"
2+
error[E0658]: `#[used(linker)]` is currently unstable
3+
--> tests/ui/used-linker.rs:6:5
4+
|
5+
6 | #![used(linker)]
6+
| ^^^^^^^^^^^^^^^^
7+
|
8+
= note: see issue #93798 <https://github.com/rust-lang/rust/issues/93798> for more information
9+
= help: add `#![feature(used_with_arg)]` to the crate attributes to enable
10+
= note: this compiler was built on 2024-01-13; consider upgrading it if it is out of date
11+
" "
12+
error[E0658]: `#[used(linker)]` is currently unstable
13+
--> tests/ui/used-linker.rs:6:5
14+
|
15+
6 | #![used(linker)]
16+
| ^^^^^^^^^^^^^^^^
17+
|
18+
= note: see issue #93798 <https://github.com/rust-lang/rust/issues/93798> for more information
19+
= help: add `#![feature(used_with_arg)]` to the crate attributes to enable
20+
"}

0 commit comments

Comments
 (0)