-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 11 pull requests #82235
Rollup of 11 pull requests #82235
Commits on Dec 12, 2020
-
Add 'consider using' message to overflowing_literals
Ironically, the overflowing_literals handler for binary or hex already had this message! You would think it would be the other way around :)
Configuration menu - View commit details
-
Copy full SHA for d00ca11 - Browse repository at this point
Copy the full SHA d00ca11View commit details
Commits on Feb 14, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a9b16c6 - Browse repository at this point
Copy the full SHA a9b16c6View commit details -
Don't fail to remove files if they are missing
In the backend we may want to remove certain temporary files, but in certain other situations these files might not be produced in the first place. We don't exactly care about that, and the intent is really that these files are gone after a certain point in the backend. Here we unify the backend file removing calls to use `ensure_removed` which will attempt to delete a file, but will not fail if it does not exist (anymore). The tradeoff to this approach is, of course, that we may miss instances were we are attempting to remove files at wrong paths due to some bug – compilation would silently succeed but the temporary files would remain there somewhere.
Configuration menu - View commit details
-
Copy full SHA for fa3621b - Browse repository at this point
Copy the full SHA fa3621bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 845c14d - Browse repository at this point
Copy the full SHA 845c14dView commit details
Commits on Feb 15, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a491f51 - Browse repository at this point
Copy the full SHA a491f51View commit details -
Configuration menu - View commit details
-
Copy full SHA for f856224 - Browse repository at this point
Copy the full SHA f856224View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4b2faf - Browse repository at this point
Copy the full SHA a4b2fafView commit details -
Co-authored-by: Mara <m-ou.se@m-ou.se>
Configuration menu - View commit details
-
Copy full SHA for 17e238d - Browse repository at this point
Copy the full SHA 17e238dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d2ba68b - Browse repository at this point
Copy the full SHA d2ba68bView commit details
Commits on Feb 16, 2021
-
Document that
assert!
format arguments are evaluated lazilyIt can be useful to do some computation in `assert!` format arguments, in order to get better error messages. For example: ```rust assert!( some_condition, "The state is invalid. Details: {}", expensive_call_to_get_debugging_info(), ); ``` It seems like `assert!` only evaluates the format arguments if the assertion fails, which is useful but doesn't appear to be documented anywhere. This PR documents the behavior and adds some tests.
Configuration menu - View commit details
-
Copy full SHA for cb653b1 - Browse repository at this point
Copy the full SHA cb653b1View commit details -
Replace File::create and write_all with fs::write
Also don't convert to u8 buffers and back when we are only creating strings.
Configuration menu - View commit details
-
Copy full SHA for e527def - Browse repository at this point
Copy the full SHA e527defView commit details -
Configuration menu - View commit details
-
Copy full SHA for a98b22c - Browse repository at this point
Copy the full SHA a98b22cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61bb183 - Browse repository at this point
Copy the full SHA 61bb183View commit details
Commits on Feb 17, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 15197cb - Browse repository at this point
Copy the full SHA 15197cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5715f79 - Browse repository at this point
Copy the full SHA 5715f79View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee0e841 - Browse repository at this point
Copy the full SHA ee0e841View commit details -
Configuration menu - View commit details
-
Copy full SHA for c80b737 - Browse repository at this point
Copy the full SHA c80b737View commit details -
Rollup merge of rust-lang#79981 - camelid:overflowing_literals-infere…
…nce-error, r=lcnr Add 'consider using' message to overflowing_literals Fixes rust-lang#79744. Ironically, the `overflowing_literals` handler for binary or hex already had this message! You would think it would be the other way around :) cc ```@scottmcm```
Configuration menu - View commit details
-
Copy full SHA for ec00784 - Browse repository at this point
Copy the full SHA ec00784View commit details -
Rollup merge of rust-lang#82094 - gilescope:to_digit_speedup2, r=m-ou-se
To digit simplification I found out the other day that all the ascii digits have the first four bits as one would hope them to. (Eg. char `2` ends `0b0010`). There are two bits to indicate it's in the digit range ( `0b0011_0000`). If it is a true digit then all the higher bits aside from these two will be 0 (as ascii is the lowest part of the unicode u32 spectrum). So XORing with `0b11_0000` should mean we either get the number 0-9 or alternativly we get a larger number in the u32 space. If we get something that's not 0-9 then it will be discarded as it will be greater than the radix. The code seems so fast though that there's quite a lot of noise in the benchmarks so it's not that easy to prove conclusively that it's faster as well as less instructions. The non-fast path I was toying with as well wondering if we could do this as then we'd only have one return and less instructions still: ``` match self { 'a'..='z' => self as u32 - 'a' as u32 + 10, 'A'..='Z' => self as u32 - 'A' as u32 + 10, _ => { radix = 10; self as u32 ^ ASCII_DIGIT_MASK}, } ``` Here's the [godbolt](https://godbolt.org/z/883c9n). ( H/T to ``@byteshadow`` for pointing out xor was what I needed)
Configuration menu - View commit details
-
Copy full SHA for 253631d - Browse repository at this point
Copy the full SHA 253631dView commit details -
Rollup merge of rust-lang#82105 - nagisa:nagisa/ensure-removed, r=pet…
…rochenkov Don't fail to remove files if they are missing In the backend we may want to remove certain temporary files, but in certain other situations these files might not be produced in the first place. We don't exactly care about that, and the intent is really that these files are gone after a certain point in the backend. Here we unify the backend file removing calls to use `ensure_removed` which will attempt to delete a file, but will not fail if it does not exist (anymore). The tradeoff to this approach is, of course, that we may miss instances were we are attempting to remove files at wrong paths due to some bug – compilation would silently succeed but the temporary files would remain there somewhere.
Configuration menu - View commit details
-
Copy full SHA for 7292d5f - Browse repository at this point
Copy the full SHA 7292d5fView commit details -
Rollup merge of rust-lang#82136 - edward-shen:mismatched-subst-and-hi…
…r, r=lcnr Fix ICE: Use delay_span_bug for mismatched subst/hir arg Fixes rust-lang#82126.
Configuration menu - View commit details
-
Copy full SHA for 13730e9 - Browse repository at this point
Copy the full SHA 13730e9View commit details -
Rollup merge of rust-lang#82169 - not-an-aardvark:assert-lazy-format-…
…expressions, r=sfackler Document that `assert!` format arguments are evaluated lazily It can be useful to do some computation in `assert!` format arguments, in order to get better error messages. For example: ```rust assert!( some_condition, "The state is invalid. Details: {}", expensive_call_to_get_debugging_info(), ); ``` It seems like `assert!` only evaluates the format arguments if the assertion fails, which is useful but doesn't appear to be documented anywhere. This PR documents the behavior and adds some tests.
Configuration menu - View commit details
-
Copy full SHA for 16481a2 - Browse repository at this point
Copy the full SHA 16481a2View commit details -
Rollup merge of rust-lang#82174 - est31:master, r=oli-obk
Replace File::create and write_all with fs::write Also don't convert to u8 buffers and back when we are only creating strings.
Configuration menu - View commit details
-
Copy full SHA for d382771 - Browse repository at this point
Copy the full SHA d382771View commit details -
Rollup merge of rust-lang#82196 - Manishearth:display-caveat, r=m-ou-se
Add caveat to Path::display() about lossiness It's worth calling out that this API may do a lossy display. r? ```@m-ou-se```
Configuration menu - View commit details
-
Copy full SHA for 8e6bc14 - Browse repository at this point
Copy the full SHA 8e6bc14View commit details -
Rollup merge of rust-lang#82198 - SkiFire13:optimize-iter-is-sorted, …
…r=sfackler Use internal iteration in Iterator::is_sorted_by
Configuration menu - View commit details
-
Copy full SHA for f46bd72 - Browse repository at this point
Copy the full SHA f46bd72View commit details -
Rollup merge of rust-lang#82204 - ehuss:update-books, r=ehuss
Update books ## nomicon 1 commits in bbf06ad39d1f45654047e9596b750cc6e6d1b693..adca786547d08fe676b2fc7a6f08c2ed5280ca38 2021-01-22 07:07:31 -0800 to 2021-02-16 16:34:20 +0900 - Merge pull request rust-lang/nomicon#254 from mdaverde/ml/adds-compiler-err-lifetimes ## reference 9 commits in f02b09eb6e8af340ad1256a54adb7aae2ff3163e..361367c126290ac17cb4089f8d38fd8b2ac43f98 2021-01-22 01:53:02 -0800 to 2021-02-15 09:58:13 -0800 - Define turbofish in the glossary (rust-lang/reference#964) - Remove enum variant expr (rust-lang/reference#963) - One sentence is one line src/expressions/* (rust-lang/reference#962) - Referencify bool type (rust-lang/reference#940) - Fix typo in type cast expression table (rust-lang/reference#959) - Define rust (rust-lang/reference#953) - Remove "Memory Ownership" chapter (rust-lang/reference#952) - Added setting nightly as a requirement for running tests (rust-lang/reference#955) - Refactored build steps for better readability (rust-lang/reference#936) ## book 13 commits in e724bd826580ff95df48a8533af7dec1080693d4..db5e8a5105aa22979490dce30e33b68d8645761d 2021-01-20 08:19:49 -0600 to 2021-02-12 16:58:20 -0500 - Update to Rust 1.50 - Fix issue rust-lang/book#2574 - Improve the explanation about the behaviour of `read_line`. (rust-lang/book#2575) - closures: replace "is called" with "is defined" (rust-lang/book#2556) - Minor clarification: types -> values in ch16-04 (rust-lang/book#2587) - fixed hidden code listing (rust-lang/book#2610) - Merge remote-tracking branch 'origin/pr/2604' - (rust-lang/book#2601) - Merge remote-tracking branch 'origin/pr/2589' - Fix text wrapping - Some small rewordings I noticed while rereading just now - (rust-lang/book#2592) - Removed 'of' between type alias in Ch 19-04. (rust-lang/book#2581) - Merge remote-tracking branch 'origin/pr/2554' ## rust-by-example 2 commits in f633769acef68574427a6fae6c06f13bc2199573..551cc4bc8394feccea6acd21f86d9a4e1d2271a0 2021-01-13 20:58:25 -0300 to 2021-02-03 17:12:37 -0300 - remove // (rust-lang/rust-by-example#1409) - Update arc.md (rust-lang/rust-by-example#1406) ## edition-guide 3 commits in b91a9a881ee007c12e74e844460ec407cf07a50f..1da3c411f17adb1ba5de1683bb6acee83362b54a 2020-11-02 11:02:03 -0600 to 2021-02-16 16:46:40 -0800 - Update link for no_std. (rust-lang/edition-guide#231) - Add git link to the source. (rust-lang/edition-guide#228) - Update musl libc link (rust-lang/edition-guide#230) ## embedded-book 1 commits in ceec19e873be87c6ee5666b030c6bb612f889a96..4cf7981696a85c3e633076c6401611bd3f6346c4 2021-01-03 13:13:10 +0000 to 2021-02-11 10:55:22 +0000 - Fix installing dateutil since it is now a dependency of the GHP import script (rust-embedded/book#282)
Configuration menu - View commit details
-
Copy full SHA for 086342c - Browse repository at this point
Copy the full SHA 086342cView commit details -
Rollup merge of rust-lang#82207 - ehuss:rustdoc-2021, r=jyn514
rustdoc: treat edition 2021 as unstable This ensures that `--edition=2021` requires `-Z unstable-options` in rustdoc.
Configuration menu - View commit details
-
Copy full SHA for f97e112 - Browse repository at this point
Copy the full SHA f97e112View commit details -
Rollup merge of rust-lang#82231 - jesusprubio:add-long-explanation-e0…
…543, r=GuillaumeGomez Add long explanation for E0543 Helps with rust-lang#61137
Configuration menu - View commit details
-
Copy full SHA for 03477e9 - Browse repository at this point
Copy the full SHA 03477e9View commit details