Skip to content

Rollup of 10 pull requests #94225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Feb 22, 2022
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5cc292e
rustc_const_eval: adopt let else in more places
est31 Feb 18, 2022
297364e
Some improvements to the async docs
Feb 19, 2022
f233323
Gracefully handle non-UTF-8 string slices when pretty printing
tmiasko Feb 19, 2022
72a7e73
Update pin_static_ref stabilization version.
ehuss Feb 20, 2022
c358ffe
Implement LowerHex on Scalar to clean up their display in rustdoc
GuillaumeGomez Feb 20, 2022
b45cb09
Use Metadata::modified instead of FileTime::from_last_modification_ti…
bjorn3 Feb 20, 2022
1e3609b
CTFE engine: Scalar: expose size-generic to_(u)int methods
RalfJung Feb 21, 2022
413f3f7
Fix typo
est31 Feb 21, 2022
76ea566
Better error if the user tries to do assignment ... else
est31 Feb 21, 2022
239f33e
add comment
lcnr Feb 21, 2022
15e95c0
rename function
lcnr Feb 21, 2022
ec0a0ca
don't check for the leak_check twice
lcnr Feb 21, 2022
6a1f5ea
obligation forest docs
lcnr Feb 21, 2022
910d46f
Correctly handle miniz_oxide extern crate declaration
GuillaumeGomez Feb 21, 2022
12705b4
Rollup merge of #91192 - r00ster91:futuredocs, r=GuillaumeGomez
matthiaskrgr Feb 21, 2022
ea7f7f7
Rollup merge of #94143 - est31:let_else_const_eval, r=lcnr
matthiaskrgr Feb 21, 2022
da25e1e
Rollup merge of #94156 - tmiasko:pp-str, r=petrochenkov
matthiaskrgr Feb 21, 2022
74cb6b7
Rollup merge of #94186 - ehuss:pin-stable-1.61, r=m-ou-se
matthiaskrgr Feb 21, 2022
f639ba6
Rollup merge of #94189 - GuillaumeGomez:scalar-lower-hex, r=RalfJung
matthiaskrgr Feb 21, 2022
3095743
Rollup merge of #94190 - bjorn3:less_filetime, r=Mark-Simulacrum
matthiaskrgr Feb 21, 2022
f3a1a8c
Rollup merge of #94203 - RalfJung:to_sized_int, r=oli-obk
matthiaskrgr Feb 21, 2022
d3649f8
Rollup merge of #94211 - est31:let_else_destructuring_error, r=matthe…
matthiaskrgr Feb 21, 2022
9157775
Rollup merge of #94215 - lcnr:leak-check, r=jackh726
matthiaskrgr Feb 21, 2022
ed35309
Rollup merge of #94220 - GuillaumeGomez:miniz-oxide-decl, r=Amanieu
matthiaskrgr Feb 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use Metadata::modified instead of FileTime::from_last_modification_ti…
…me in run_cargo

Metadata::modified works in all platforms supported by the filetime
crate. This changes brings rustbuild a tiny bit closer towards dropping
the filetime dependency.
  • Loading branch information
bjorn3 committed Feb 20, 2022
commit b45cb09d3068f45d5b752ba46034c8dbc92138eb
6 changes: 3 additions & 3 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use std::process::{exit, Command, Stdio};
use std::str;

use build_helper::{output, t, up_to_date};
use filetime::FileTime;
use serde::Deserialize;

use crate::builder::Cargo;
Expand Down Expand Up @@ -1334,8 +1333,9 @@ pub fn run_cargo(
.map(|s| s.starts_with('-') && s.ends_with(&extension[..]))
.unwrap_or(false)
});
let max = candidates
.max_by_key(|&&(_, _, ref metadata)| FileTime::from_last_modification_time(metadata));
let max = candidates.max_by_key(|&&(_, _, ref metadata)| {
metadata.modified().expect("mtime should be available on all relevant OSes")
});
let path_to_add = match max {
Some(triple) => triple.0.to_str().unwrap(),
None => panic!("no output generated for {:?} {:?}", prefix, extension),
Expand Down