Skip to content

Rollup of 8 pull requests - #65482

Closed
Centril wants to merge 37 commits into
rust-lang:masterfrom
Centril:rollup-kqdfguc
Closed

Rollup of 8 pull requests#65482
Centril wants to merge 37 commits into
rust-lang:masterfrom
Centril:rollup-kqdfguc

Conversation

@Centril

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

SimonSapinand others added 30 commits October 6, 2019 23:48
Requesting a zero-size allocation is not allowed,
return a dangling pointer instead.
CC rust-lang#63291 (comment)
ONCE_INIT is deprecated, and so suggesting it as not only being on par with, but before `Once::new` is a bad idea.
Prefer statx on linux if available
This PR make `metadata`-related functions try to invoke `statx` first on Linux if available,
making `std::fs::Metadata::created` work on Linux with `statx` supported.
It follows the discussion in rust-lang#61386 , and will fixrust-lang#59743
The implementation of this PR is simply converting `struct statx` into `struct stat64` with
extra fields for `btime` if `statx` succeeds, since other fields are not currently used.
---
I also did a separated benchmark for `fs::metadata`, `stat64`, `statx`, and `statx` with conversion to `stat64`.
It shows that `statx` with conversion is even more faster than pure `statx`.
I think it's due to `sizeof stat64 == 114` but `sizeof statx == 256`.
Anyway, the bare implementation of `statx` with conversion is only about 0.2% slower than the original impl (`stat64`-family).
With heap-allocation counted (~8.5% of total cost), the difference between `stat` and `statx` (with or without conversion) is just nothing.
Therefore, I think it is not urgent to use bare `struct statx` as underlying representation now.
There is no need to break `std::os::linux::fs::MetadataExt::as_raw_stat` (rust-lang#61386 (comment))
[Separated bare benchmarks](https://gist.github.com/oxalica/c4073ecb202c599fe41b7f15f86dc79c):
```
metadata_ok time: [529.41 ns 529.77 ns 530.19 ns]
metadata_err time: [538.71 ns 539.39 ns 540.35 ns]
stat64_ok time: [484.32 ns 484.53 ns 484.75 ns]
stat64_err time: [481.77 ns 482.00 ns 482.24 ns]
statx_ok time: [488.07 ns 488.35 ns 488.62 ns]
statx_err time: [487.74 ns 488.00 ns 488.27 ns]
statx_cvt_ok time: [485.05 ns 485.28 ns 485.53 ns]
statx_cvt_err time: [485.23 ns 485.45 ns 485.67 ns]
```
r? @alexcrichton
Fix zero-size uninitialized boxes
Requesting a zero-size allocation is not allowed, return a dangling pointer instead.
CC rust-lang#63291 (comment)
InterpCx: make memory field public
I made this field private forever ago because I thought sealing things might be nice. But with the `memory_mut` getter it doesn't actually seal anything, and it's not like we need to invalidate caches on writes to memory or so. And moreover, having to use the getters leads to some annoying borrow checking interactions.
So, let's just make it public (again).
r? @oli-obk
…-E0575, r=kinnison
Add long error explanation for E0575
Part of rust-lang#61137.
Don't recommend ONCE_INIT in std::sync::Once
ONCE_INIT is deprecated, and so suggesting it as not only being on par with, but before `Once::new` is a bad idea.
Move syntax::ext to a syntax_expand and refactor some attribute logic
Part of rust-lang#65324.
r? @petrochenkov
add example for type_name
So users of this function could at least expect what its output for current compiler version.
fmt::Write is about string slices, not byte slices
No idea why the docs talk about bytes, maybe a copy-paste error?
@Centril

Copy link
Copy Markdown
ContributorAuthor

@bors r+ p=8 rollup=never

@bors

bors commented Oct 16, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 940ae78 has been approved by Centril

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 16, 2019
@CentrilCentril closed this Oct 16, 2019
@Centril
Centril deleted the rollup-kqdfguc branch October 16, 2019 23:34
@rust-highfive

Copy link
Copy Markdown
Contributor

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-10-16T23:18:09.4264019Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-16T23:18:09.4438237Z ##[command]git config gc.auto 0
2019-10-16T23:18:09.4508929Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-16T23:18:10.1692244Z ##[command]git config --get-all http.proxy
2019-10-16T23:18:10.1696604Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/65482/merge:refs/remotes/pull/65482/merge
---
2019-10-16T23:25:11.0236940Z Compiling serde_json v1.0.40
2019-10-16T23:25:12.9318082Z Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-10-16T23:25:25.0789755Z Finished release [optimized] target(s) in 1m 34s
2019-10-16T23:25:25.0882079Z tidy check
2019-10-16T23:25:25.2212416Z tidy error: /checkout/src/liballoc/tests/boxed.rs: too many trailing newlines (2)
2019-10-16T23:25:27.1533214Z some tidy checks failed
2019-10-16T23:25:27.1534153Z Found 482 error codes
2019-10-16T23:25:27.1534400Z Found 0 error codes with no tests
2019-10-16T23:25:27.1534642Z Done!
2019-10-16T23:25:27.1534642Z Done!
2019-10-16T23:25:27.1538610Z 2019-10-16T23:25:27.1538914Z 2019-10-16T23:25:27.1540455Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-10-16T23:25:27.1541454Z 2019-10-16T23:25:27.1541661Z 2019-10-16T23:25:27.1551314Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-10-16T23:25:27.1551744Z Build completed unsuccessfully in 0:01:38
2019-10-16T23:25:27.1551744Z Build completed unsuccessfully in 0:01:38
2019-10-16T23:25:27.1597808Z == clock drift check ==
2019-10-16T23:25:27.1629841Z local time: Wed Oct 16 23:25:27 UTC 2019
2019-10-16T23:25:27.2643019Z network time: Wed, 16 Oct 2019 23:25:27 GMT
2019-10-16T23:25:27.2644147Z == end clock drift check ==
2019-10-16T23:25:28.7305622Z ##[error]Bash exited with code '1'.
2019-10-16T23:25:28.7342043Z ##[section]Starting: Checkout
2019-10-16T23:25:28.7343695Z ==============================================================================
2019-10-16T23:25:28.7343769Z Task : Get sources
2019-10-16T23:25:28.7343836Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@CentrilCentril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@Centril@bors@rust-highfive@SimonSapin@RalfJung@oxalica@Kampfkarren@GuillaumeGomez@tesuji