Skip to content
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

Rollup of 9 pull requests #82538

Closed
wants to merge 28 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fece59b
Change `find_anon_type` method to function
0yoyoyo Feb 21, 2021
17176cc
Add indication of anonymous lifetime position
0yoyoyo Feb 21, 2021
ce1a521
Apply tidy check
0yoyoyo Feb 21, 2021
b9449a3
Add option enabling MIR inlining independently of mir-opt-level
tmiasko Feb 21, 2021
5c546be
Use optional values for inlining thresholds
tmiasko Feb 21, 2021
5f7d663
:arrow_up: rust-analyzer
lnicola Feb 22, 2021
75d1e30
Update test cases
0yoyoyo Feb 22, 2021
24c23f5
Test hexagon-enum only when llvm target is present
nagisa Feb 22, 2021
c02d210
Add tests
petrochenkov Feb 22, 2021
fc9d578
expand: Preserve order of inert attributes during expansion
petrochenkov Feb 22, 2021
e8dcc02
Add a `size()` function to WASI's `MetadataExt`.
sunfishcode Feb 22, 2021
132ec26
Enable API documentation for `std::os::wasi`.
sunfishcode Feb 22, 2021
9ce567e
Cast `libc::STDIN_FILENO` to `RawFd`.
sunfishcode Feb 24, 2021
0208fca
Use `super::` to refer to WASI-specific names.
sunfishcode Feb 24, 2021
e66e263
Make the main `wasi` module `cfg(not(doc))`.
sunfishcode Feb 24, 2021
94e75ac
Mention "wasi" in the comment about "main modules".
sunfishcode Feb 24, 2021
7d5242a
x.py fmt
sunfishcode Feb 24, 2021
356beb3
clarifies error when finding mismatched returned types for async func…
nellshamrell Feb 15, 2021
1d24f07
Detect match statement intended to be tail expression
estebank Jan 28, 2021
86fb983
Rollup merge of #81458 - estebank:match-stmt-remove-semi, r=oli-obk
Dylan-DPC Feb 26, 2021
aad8917
Rollup merge of #82165 - nellshamrell:nell/fix-80658-B, r=estebank
Dylan-DPC Feb 26, 2021
83e8390
Rollup merge of #82370 - 0yoyoyo:update-issue-81650-point-anonymous-l…
Dylan-DPC Feb 26, 2021
71d77bd
Rollup merge of #82376 - tmiasko:inline-options, r=oli-obk
Dylan-DPC Feb 26, 2021
98058d3
Rollup merge of #82394 - lnicola:rust-analyzer-2021-02-22, r=jonas-sc…
Dylan-DPC Feb 26, 2021
1b88025
Rollup merge of #82404 - nagisa:nagisa/hexagon-enums-llvm-comps, r=pe…
Dylan-DPC Feb 26, 2021
2023352
Rollup merge of #82419 - petrochenkov:inertord, r=Aaron1011
Dylan-DPC Feb 26, 2021
86357b0
Rollup merge of #82420 - sunfishcode:wasi-docs, r=alexcrichton
Dylan-DPC Feb 26, 2021
171ee33
Rollup merge of #82421 - sunfishcode:wasi-metadata-size, r=alexcrichton
Dylan-DPC Feb 26, 2021
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 a size() function to WASI's MetadataExt.
WASI's `filestat` type includes a size field, so expose it in
`MetadataExt` via a `size()` function, similar to the corresponding Unix
function.
sunfishcode committed Feb 22, 2021
commit e8dcc02dc5bb8ee26c22d67efa4ede281927e5cb
5 changes: 5 additions & 0 deletions library/std/src/sys/wasi/ext/fs.rs
Original file line number Diff line number Diff line change
@@ -397,6 +397,8 @@ pub trait MetadataExt {
fn ino(&self) -> u64;
/// Returns the `st_nlink` field of the internal `filestat_t`
fn nlink(&self) -> u64;
/// Returns the `st_size` field of the internal `filestat_t`
fn size(&self) -> u64;
/// Returns the `st_atim` field of the internal `filestat_t`
fn atim(&self) -> u64;
/// Returns the `st_mtim` field of the internal `filestat_t`
@@ -415,6 +417,9 @@ impl MetadataExt for fs::Metadata {
fn nlink(&self) -> u64 {
self.as_inner().as_wasi().nlink
}
fn size(&self) -> u64 {
self.as_inner().as_wasi().size
}
fn atim(&self) -> u64 {
self.as_inner().as_wasi().atim
}