-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 12 pull requests #51214
Rollup of 12 pull requests #51214
Commits on May 24, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 96ce56d - Browse repository at this point
Copy the full SHA 96ce56dView commit details
Commits on May 28, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 202cbaf - Browse repository at this point
Copy the full SHA 202cbafView commit details -
Configuration menu - View commit details
-
Copy full SHA for b54fb5e - Browse repository at this point
Copy the full SHA b54fb5eView commit details
Commits on May 29, 2018
-
Fixes rust-lang#35729 According to recommendations in rust-lang#35729 (comment)
Configuration menu - View commit details
-
Copy full SHA for 125b32c - Browse repository at this point
Copy the full SHA 125b32cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 068fc44 - Browse repository at this point
Copy the full SHA 068fc44View commit details -
Move slice::exact_chunks directly above exact_chunks_mut for more con…
…sistent docs order See rust-lang#47115 (comment)
Configuration menu - View commit details
-
Copy full SHA for 5b1be00 - Browse repository at this point
Copy the full SHA 5b1be00View commit details -
Replace
if
withif and only if
in the definition dox ofSync
The old text was: "The precise definition is: a type T is Sync if &T is Send." Since we've also got ``` impl<'a, T> Send for &'a T where T: Sync + ?Sized, ``` I purpose we can change the `if` to `if and only if` to make it more precise.
Configuration menu - View commit details
-
Copy full SHA for 0d821db - Browse repository at this point
Copy the full SHA 0d821dbView commit details -
Link the docs of panic!() and compile_error!()
Fixes rust-lang#47275. These two macros are similar, but different, and could do with documentation links to each other.
Configuration menu - View commit details
-
Copy full SHA for 11c39ac - Browse repository at this point
Copy the full SHA 11c39acView commit details -
Add sentence to compile_error!() docs
It now details why using compile_error!() is different from just not having the final macro_rules!() branch.
Configuration menu - View commit details
-
Copy full SHA for 1d7a0df - Browse repository at this point
Copy the full SHA 1d7a0dfView commit details -
Mention spec and indented blocks in doctest docs
This commit adds a new section to the Documentation Test docs, which briefly mentions indented code blocks, and links to the CommonMark specification for both. I’m not sure about saying "fenced code blocks the more popular choice in the Rust community” because it seems like I’m speaking for everyone, but I can’t think of a better way to phrase it!
Configuration menu - View commit details
-
Copy full SHA for 9fcc61b - Browse repository at this point
Copy the full SHA 9fcc61bView commit details -
typeck: Do not pass the field check on field error
If a struct pattern has a field error return an error.
Configuration menu - View commit details
-
Copy full SHA for 18ff09d - Browse repository at this point
Copy the full SHA 18ff09dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f8a7b9 - Browse repository at this point
Copy the full SHA 8f8a7b9View commit details -
It turns out that the diagnostics generated from NLL for these cases …
…are now exactly the same as that produced by AST borrowck. Bravo!
Configuration menu - View commit details
-
Copy full SHA for 5a0bf09 - Browse repository at this point
Copy the full SHA 5a0bf09View commit details
Commits on May 30, 2018
-
Remove
ObligationForest::cache_list
.It's never used in a meaningful way.
Configuration menu - View commit details
-
Copy full SHA for 07b9d17 - Browse repository at this point
Copy the full SHA 07b9d17View commit details -
fs: copy: Use File::set_permissions instead of fs::set_permissions
We already got the open file descriptor at this point. Don't make the kernel resolve the path again.
Configuration menu - View commit details
-
Copy full SHA for 9b6940d - Browse repository at this point
Copy the full SHA 9b6940dView commit details -
Revert "Make implentation methods for SliceIndex #[doc(hidden)]"
This reverts commit 068fc44.
Configuration menu - View commit details
-
Copy full SHA for 7181337 - Browse repository at this point
Copy the full SHA 7181337View commit details -
Configuration menu - View commit details
-
Copy full SHA for b43f76e - Browse repository at this point
Copy the full SHA b43f76eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c5ee3b6 - Browse repository at this point
Copy the full SHA c5ee3b6View commit details -
Rollup merge of rust-lang#51050 - symphorien:fstatat, r=kennytm
std::fs::DirEntry.metadata(): use fstatat instead of lstat when possible When reading a directory with `read_dir`, querying metadata for a resulting `DirEntry` is done by building the whole path and then `lstat`ing it, which requires the kernel to resolve the whole path. Instead, one can use the file descriptor to the enumerated directory and use `fstatat`. This make the resolving step unnecessary. This PR implements using `fstatat` on linux, android and emscripten. ## Compatibility across targets `fstatat` is POSIX. * Linux >= 2.6.19 according to https://linux.die.net/man/2/fstatat * android according to https://android.googlesource.com/platform/bionic/+/master/libc/libc.map.txt#392 * emscripten according to https://github.com/kripken/emscripten/blob/7f89560101843198787530731f40a65288f6f15f/system/include/libc/sys/stat.h#L76 The man page says "A similar system call exists on Solaris." but I haven't found it. ## Compatibility with old platforms This was introduced with glibc 2.4 according to the man page. The only information I could find about the minimal version of glibc rust must support is this discussion https://internals.rust-lang.org/t/bumping-glibc-requirements-for-the-rust-toolchain/5111/10 The conclusion, if I understand correctly, is that currently rust supports glibc >= 2.3.4 but the "real" requirement is Centos 5 with glibc 2.5. This PR would make the minimal version 2.4, so this should be fine. ## Benefit I did the following silly benchmark: ```rust use std::io; use std::fs; use std::os::linux::fs::MetadataExt; use std::time::Instant; fn main() -> Result<(), io::Error> { let mut n = 0; let mut size = 0; let start = Instant::now(); for entry in fs::read_dir("/nix/store/.links")? { let entry = entry?; let stat = entry.metadata()?; size += stat.st_size(); n+=1; } println!("{} files, size {}, time {:?}", n, size, Instant::now().duration_since(start)); Ok(()) } ``` On warm cache, with current rust nightly: ``` 1014099 files, size 76895290022, time Duration { secs: 2, nanos: 65832118 } ``` (between 2.1 and 2.9 seconds usually) With this PR: ``` 1014099 files, size 76895290022, time Duration { secs: 1, nanos: 581662953 } ``` (1.5 to 1.6 seconds usually). approximately 40% faster :) On cold cache there is not much to gain because path lookup (which we spare) would have been a cache hit: Before ``` 1014099 files, size 76895290022, time Duration { secs: 391, nanos: 739874992 } ``` After ``` 1014099 files, size 76895290022, time Duration { secs: 388, nanos: 431567396 } ``` ## Testing The tests were run on linux `x86_64` ``` python x.py test src/tools/tidy ./x.py test src/libstd ``` and the above benchmark. I did not test any other target.
Configuration menu - View commit details
-
Copy full SHA for 6019e19 - Browse repository at this point
Copy the full SHA 6019e19View commit details -
Rollup merge of rust-lang#51123 - akoserwal:master, r=Mark-Simulacrum
Update build instructions It get stuck at the cloning step. `./x.py build ` Updating only changed submodules Updating submodule src/llvm Submodule 'src/llvm' (https://github.com/rust-lang/llvm.git) registered for path 'src/llvm' Cloning into '/home/username/rust/src/llvm'...
Configuration menu - View commit details
-
Copy full SHA for a1cd4bd - Browse repository at this point
Copy the full SHA a1cd4bdView commit details -
Rollup merge of rust-lang#51127 - frewsxcv:frewsxcv-discriminant, r=G…
…uillaumeGomez Add doc link from discriminant struct to function. None
Configuration menu - View commit details
-
Copy full SHA for b7c3ff7 - Browse repository at this point
Copy the full SHA b7c3ff7View commit details -
Rollup merge of rust-lang#51146 - dlrobertson:fix_51102, r=estebank
typeck: Do not pass the field check on field error If a struct pattern has a field error return an error. Fixes: rust-lang#51102
Configuration menu - View commit details
-
Copy full SHA for 0b7c748 - Browse repository at this point
Copy the full SHA 0b7c748View commit details -
Rollup merge of rust-lang#51147 - tmccombs:sliceindex, r=SimonSapin
Stabilize SliceIndex trait. CC rust-lang#35729 According to recommendations in rust-lang#35729 (comment)
Configuration menu - View commit details
-
Copy full SHA for 5e00f3f - Browse repository at this point
Copy the full SHA 5e00f3fView commit details -
Rollup merge of rust-lang#51151 - sdroege:exact-chunks-docs-order, r=…
…dtolnay Move slice::exact_chunks directly above exact_chunks_mut for more con… …sistent docs order See rust-lang#47115 (comment)
Configuration menu - View commit details
-
Copy full SHA for cc3f603 - Browse repository at this point
Copy the full SHA cc3f603View commit details -
Rollup merge of rust-lang#51153 - ogham:panic-and-compile_error-docs,…
… r=GuillaumeGomez Link panic and compile_error docs This adds documentation links between `panic!()` and `compile_error!()` as per rust-lang#47275, which points out that they’re similar. It also adds a sentence to the `compile_error()` docs I thought could be added.
Configuration menu - View commit details
-
Copy full SHA for ad4afd2 - Browse repository at this point
Copy the full SHA ad4afd2View commit details -
Rollup merge of rust-lang#51158 - ogham:patch-1, r=steveklabnik
Mention spec and indented blocks in doctest docs Fixes rust-lang#49717. This commit adds a new section to the Documentation Test docs, which briefly mentions indented code blocks, and links to the CommonMark specification for both. I’m not sure about saying "fenced code blocks the more popular choice in the Rust community” because it seems like I’m speaking for everyone, but I can’t think of a better way to phrase it!
Configuration menu - View commit details
-
Copy full SHA for 8c806c3 - Browse repository at this point
Copy the full SHA 8c806c3View commit details -
Rollup merge of rust-lang#51186 - pnkfelix:remove-unneccessary-nll-st…
…derr-files, r=oli-obk Remove two redundant .nll.stderr files It turns out that the diagnostics generated from NLL for these cases are now exactly the same as that produced by AST borrowck, and thus we can just fallback on those `.stderr` files that already exist for AST-borrowck. Bravo! (it is a good idea to remove these files, because it slightly reduces the amount of time humans will spend reviewing the .nll.stderr fileset...) ((it *might* be worthwhile trying to change the `compiletest` code to even issue a warning when two such files have equivalent contents... but I am not going so far as to try to implement that right now...))
Configuration menu - View commit details
-
Copy full SHA for 874b623 - Browse repository at this point
Copy the full SHA 874b623View commit details -
Rollup merge of rust-lang#51203 - nnethercote:obligations-2, r=michae…
…lwoerister Two minor `obligation_forest` tweaks. Pretty minimal improvements, but improvements nonetheless.
Configuration menu - View commit details
-
Copy full SHA for 7bf60b7 - Browse repository at this point
Copy the full SHA 7bf60b7View commit details -
Rollup merge of rust-lang#51213 - nicokoch:copy_permissions, r=cramertj
fs: copy: Use File::set_permissions instead of fs::set_permissions We already got the open file descriptor at this point. Don't make the kernel resolve the path again.
Configuration menu - View commit details
-
Copy full SHA for c296b6b - Browse repository at this point
Copy the full SHA c296b6bView commit details -
Rollup merge of rust-lang#51152 - crlf0710:patch-1, r=kennytm
The old text was: "The precise definition is: a type `T` is `Sync` if `&T` is Send." Since we've also got ``` impl<'a, T> Send for &'a T where T: Sync + ?Sized, ``` I purpose we can change the `if` to `if and only if` to make it more precise.
Configuration menu - View commit details
-
Copy full SHA for b7b7b25 - Browse repository at this point
Copy the full SHA b7b7b25View commit details