Skip to content

Commit

Permalink
Merge pull request #254 from dtolnay/builddate
Browse files Browse the repository at this point in the history
Normalize compiler build date note
  • Loading branch information
dtolnay committed Jan 14, 2024
2 parents 52caff6 + 7126507 commit 840b110
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/normalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ impl<'a> Filter<'a> {
return None;
}

if trim_start.starts_with("= note: this compiler was built on 2")
&& trim_start.ends_with("; consider upgrading it if it is out of date")
{
return None;
}

if self.normalization >= StripCouldNotCompile {
if line.starts_with("error: Could not compile `") {
return None;
Expand Down
20 changes: 20 additions & 0 deletions src/tests/gated-feature.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
test_normalize! {"
error[E0658]: `#[used(linker)]` is currently unstable
--> tests/ui/used-linker.rs:6:5
|
6 | #![used(linker)]
| ^^^^^^^^^^^^^^^^
|
= note: see issue #93798 <https://github.com/rust-lang/rust/issues/93798> for more information
= help: add `#![feature(used_with_arg)]` to the crate attributes to enable
= note: this compiler was built on 2024-01-13; consider upgrading it if it is out of date
" "
error[E0658]: `#[used(linker)]` is currently unstable
--> tests/ui/used-linker.rs:6:5
|
6 | #![used(linker)]
| ^^^^^^^^^^^^^^^^
|
= note: see issue #93798 <https://github.com/rust-lang/rust/issues/93798> for more information
= help: add `#![feature(used_with_arg)]` to the crate attributes to enable
"}

0 comments on commit 840b110

Please sign in to comment.