Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fd76552
std: use an event flag based thread parker on SOLID
joboet May 18, 2022
3b6ae15
std: fix deadlock in `Parker`
joboet May 19, 2022
b9660de
std: solve priority issue for Parker
joboet Jun 4, 2022
5823d7b
Partial stabilization of "nonzero_unchecked_ops".
iago-lito May 30, 2022
69e8e7e
Stabilize NonZero* checked operations constness.
iago-lito Jun 9, 2022
caff723
std: relax memory orderings in `Parker`
joboet Jun 7, 2022
b8efb5f
lint: fix condition in diagnostic lints
davidtwco Jun 22, 2022
2d02416
Rename/restructure memory ordering intrinsics.
m-ou-se Jun 22, 2022
9468f5d
various: add `rustc_lint_diagnostics` to diag fns
davidtwco Jun 22, 2022
7bfe26f
privacy: port "field is private" diag
davidtwco Jun 22, 2022
0d14cb2
privacy: port "item is private" diag
davidtwco Jun 22, 2022
b571813
privacy: port unnamed "item is private" diag
davidtwco Jun 22, 2022
faa68ae
privacy: port "in public interface" diag
davidtwco Jun 22, 2022
73a8d42
privacy: deny diagnostic migration lints
davidtwco Jun 22, 2022
cc4f804
Move help popup into a pocket menu as well
GuillaumeGomez Jun 20, 2022
3eb9e1a
Add/update GUI tests for help pocket menu
GuillaumeGomez Jun 20, 2022
e4b2b41
Merge all popover hide functions into one
GuillaumeGomez Jun 22, 2022
99bc979
macros: use typed identifiers in diag derive
davidtwco Jun 23, 2022
abd3467
macros: use typed identifiers in subdiag derive
davidtwco Jun 23, 2022
dc90d1d
errors: remove diagnostic message ctors
davidtwco Jun 23, 2022
7475867
[rustc_parse] Forbid lets in certain places
c410-f3r Jun 25, 2022
dc2cc10
make const_err show up in future breakage reports
RalfJung Jun 4, 2022
af58692
bless remaining tests
RalfJung Jun 4, 2022
24b66da
Support setting file accessed/modified timestamps
joshtriplett Jun 19, 2022
e2b5729
Add alias `File::set_modified` as shorthand
joshtriplett Jun 20, 2022
3899914
bless after rebase
RalfJung Jun 25, 2022
1d32fed
Return an error if trying to set a file timestamp to 0 on Windows
joshtriplett Jun 25, 2022
2339bb2
Update `since` to 1.64 (since we're after 1.63)
scottmcm Jun 26, 2022
17bab98
Rollup merge of #97140 - joboet:solid_parker, r=m-ou-se
Dylan-DPC Jun 26, 2022
0399909
Rollup merge of #97295 - c410-f3r:yet-another-let-chain, r=compiler-e…
Dylan-DPC Jun 26, 2022
683631a
Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko
Dylan-DPC Jun 26, 2022
3c0da41
Rollup merge of #97743 - RalfJung:const-err-future-breakage, r=estebank
Dylan-DPC Jun 26, 2022
a9a2d60
Rollup merge of #97908 - iago-lito:stabilize_nonzero_checked_ops_cons…
Dylan-DPC Jun 26, 2022
14f8259
Rollup merge of #98246 - joshtriplett:times, r=m-ou-se
Dylan-DPC Jun 26, 2022
f082a16
Rollup merge of #98297 - GuillaumeGomez:help-pocket-menu, r=notriddle
Dylan-DPC Jun 26, 2022
cc793cd
Rollup merge of #98420 - davidtwco:translation-lint-fixes-and-more-mi…
Dylan-DPC Jun 26, 2022
24cde0d
Rollup merge of #98428 - davidtwco:translation-derive-typed-identifie…
Dylan-DPC Jun 26, 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
Add alias File::set_modified as shorthand
  • Loading branch information
joshtriplett committed Jun 25, 2022
commit e2b5729fdd089389e679cc76853988fd8167d62f
9 changes: 9 additions & 0 deletions library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,15 @@ impl File {
pub fn set_times(&self, times: FileTimes) -> io::Result<()> {
self.inner.set_times(times.0)
}

/// Changes the modification time of the underlying file.
///
/// This is an alias for `set_times(FileTimes::new().set_modified(time))`.
#[unstable(feature = "file_set_times", issue = "98245")]
#[inline]
pub fn set_modified(&self, time: SystemTime) -> io::Result<()> {
self.set_times(FileTimes::new().set_modified(time))
}
}

// In addition to the `impl`s here, `File` also has `impl`s for
Expand Down