-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 10 pull requests #68011
Rollup of 10 pull requests #68011
Commits on Jan 2, 2020
-
Remove wrong advice about spin locks from
spin_loop_hint
docsUsing a pure spin lock for a critical section in a preemptable thread is always wrong, however short the critical section may be. The thread might be preempted, which will cause all other threads to hammer busily at the core for the whole quant. Moreover, if threads have different priorities, this might lead to a priority inversion problem and a deadlock. More generally, a spinlock is not more efficient than a well-written mutex, which typically does several spin iterations at the start anyway. The advise about UP vs SMP is also irrelevant in the context of preemptive threads.
Configuration menu - View commit details
-
Copy full SHA for 4d04b0b - Browse repository at this point
Copy the full SHA 4d04b0bView commit details
Commits on Jan 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 91334e0 - Browse repository at this point
Copy the full SHA 91334e0View commit details
Commits on Jan 4, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 27ea4c8 - Browse repository at this point
Copy the full SHA 27ea4c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for e01e8b9 - Browse repository at this point
Copy the full SHA e01e8b9View commit details -
Distinguish between private items and hidden items in rustdoc
I believe rustdoc should not be conflating private items (visibility lower than `pub`) and hidden items (attribute `doc(hidden)`). This matters now that Cargo is passing --document-private-items by default for bin crates. In bin crates that rely on macros, intentionally hidden implementation details of the macros can overwhelm the actual useful internal API that one would want to document. This PR restores the strip-hidden pass when documenting private items, and introduces a separate unstable --document-hidden-items option to skip the strip-hidden pass. The two options are orthogonal to one another.
Configuration menu - View commit details
-
Copy full SHA for 90adafb - Browse repository at this point
Copy the full SHA 90adafbView commit details
Commits on Jan 5, 2020
-
Option's panics are all #[track_caller].
Also includes a simple test with a custom panic hook to ensure we don't regress.
Configuration menu - View commit details
-
Copy full SHA for 2e9d573 - Browse repository at this point
Copy the full SHA 2e9d573View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a6af7e - Browse repository at this point
Copy the full SHA 7a6af7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b97ee0f - Browse repository at this point
Copy the full SHA b97ee0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b25eeef - Browse repository at this point
Copy the full SHA b25eeefView commit details
Commits on Jan 6, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 012127b - Browse repository at this point
Copy the full SHA 012127bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 86b9d49 - Browse repository at this point
Copy the full SHA 86b9d49View commit details
Commits on Jan 7, 2020
-
Configuration menu - View commit details
-
Copy full SHA for cec957e - Browse repository at this point
Copy the full SHA cec957eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3acd346 - Browse repository at this point
Copy the full SHA 3acd346View commit details -
Remove insignificant notes from CStr documentation
These notes are about a distinction that is not going to be observable in the API. Whether or not the UTF-8 check knows the string length ahead of time, these methods require linear time.
Configuration menu - View commit details
-
Copy full SHA for 48add54 - Browse repository at this point
Copy the full SHA 48add54View commit details
Commits on Jan 8, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f5baa03 - Browse repository at this point
Copy the full SHA f5baa03View commit details -
Configuration menu - View commit details
-
Copy full SHA for 588296a - Browse repository at this point
Copy the full SHA 588296aView commit details -
Move
is_min_const_fn
query to librustc_mir.The only two uses of the associated methods are in librustc_mir and librustdoc. Please tell me if there is a better choice.
Configuration menu - View commit details
-
Copy full SHA for c1c09be - Browse repository at this point
Copy the full SHA c1c09beView commit details -
Configuration menu - View commit details
-
Copy full SHA for aabc736 - Browse repository at this point
Copy the full SHA aabc736View commit details -
Rollup merge of rust-lang#67774 - oxalica:more-statx, r=alexcrichton
Try statx for all linux-gnu target. After rust-lang/libc#1577, which is contained in `libc` 0.2.66, provides `SYS_statx` for all Linux platform, so we can try to use `statx` for ~all Linux target~ all linux-gnu targets. Unfortunately, `struct statx` and `fn statx` is not a part of public interface of musl (currently), ~we still need to invoke it through `syscall`~ we does **not** support statx for musl or other libc impls currently. Previous PR: rust-lang#65094 cc @alexcrichton
Configuration menu - View commit details
-
Copy full SHA for 9f8f97b - Browse repository at this point
Copy the full SHA 9f8f97bView commit details -
Rollup merge of rust-lang#67781 - cjgillot:passes-const, r=oli-obk
Move `is_min_const_fn` query to librustc_mir. The only two uses of the associated methods are in `librustc_mir` and `librustdoc`. Please tell me if there is a better choice. cc rust-lang#65031
Configuration menu - View commit details
-
Copy full SHA for b85b1dd - Browse repository at this point
Copy the full SHA b85b1ddView commit details -
Rollup merge of rust-lang#67798 - matklad:spin-thouse-docs, r=Amanieu
Remove wrong advice about spin locks from `spin_loop_hint` docs Using a pure spin lock for a critical section in a preemptable thread is always wrong, however short the critical section may be. The thread might be preempted, which will cause all other threads to hammer busily at the core for the whole quant. Moreover, if threads have different priorities, this might lead to a priority inversion problem and a deadlock. More generally, a spinlock is not more efficient than a well-written mutex, which typically does several spin iterations at the start anyway. The advise about UP vs SMP is also irrelevant in the context of preemptive threads. See also accompanying piece: https://matklad.github.io/2020/01/02/spinlocs-considered-harmful.html And another, independent piece: https://probablydance.com/2019/12/30/measuring-mutexes-spinlocks-and-how-bad-the-linux-scheduler-really-is EDIT: obligatory disclosure that I am not an expert in these things, and might be terribly wrong :)
Configuration menu - View commit details
-
Copy full SHA for 256f401 - Browse repository at this point
Copy the full SHA 256f401View commit details -
Rollup merge of rust-lang#67849 - cjkenn:check-sorted-words, r=estebank
Add a check for swapped words when we can't find an identifier Fixes rust-lang#66968 Couple things here: 1. The matches take the precedence of case insensitive match, then levenshtein match, then swapped words match. Doing this allows us to not even check for swapped words unless the other checks return `None`. 2. I've assumed that the swapped words check is not held to the limits of the max levenshtein distance threshold (ie. we want to try and find a match even if the levenshtein distance is very high). This means that we cannot perform this check in the `fold` that occurs after the `filter_map` call, because the candidate will be filtered out. So, I've split this into two separate `fold` calls, and had to collect the original iterator into a vec so it can be copied (I don't think we want to change the function signature to take a vec or require the `Copy` trait). An alternative implemenation may be to remove the `filter_map`, `fold` over the entire iterator, and do a check against `max_dist` inside the relevant cases there. r? @estebank
Configuration menu - View commit details
-
Copy full SHA for 429a7e7 - Browse repository at this point
Copy the full SHA 429a7e7View commit details -
Rollup merge of rust-lang#67875 - dtolnay:hidden, r=GuillaumeGomez
Distinguish between private items and hidden items in rustdoc I believe rustdoc should not be conflating private items (visibility lower than `pub`) and hidden items (attribute `doc(hidden)`). This matters now that Cargo is passing --document-private-items by default for bin crates. In bin crates that rely on macros, intentionally hidden implementation details of the macros can overwhelm the actual useful internal API that one would want to document. This PR restores the strip-hidden pass when documenting private items, and introduces a separate unstable --document-hidden-items option to skip the strip-hidden pass. The two options are orthogonal to one another. Fixes rust-lang#67851. Closes rust-lang#60884.
Configuration menu - View commit details
-
Copy full SHA for 03fe834 - Browse repository at this point
Copy the full SHA 03fe834View commit details -
Rollup merge of rust-lang#67887 - anp:tracked-std-panics, r=nagisa
`Option::{expect,unwrap}` and `Result::{expect, expect_err, unwrap, unwrap_err}` have `#[track_caller]` The annotated functions now produce panic messages pointing to the location where they were called, rather than `core`'s internals.
Configuration menu - View commit details
-
Copy full SHA for 1c9b803 - Browse repository at this point
Copy the full SHA 1c9b803View commit details -
Rollup merge of rust-lang#67955 - ollie27:rustdoc_cfg_dupes, r=Guilla…
…umeGomez rustdoc: Remove more `#[doc(cfg(..))]` duplicates This is a follow up to rust-lang#66959. r? @GuillaumeGomez
Configuration menu - View commit details
-
Copy full SHA for 1f94425 - Browse repository at this point
Copy the full SHA 1f94425View commit details -
Rollup merge of rust-lang#67977 - Wind-River:master_2020, r=alexcrichton
Updates for VxWorks r? @alexcrichton
Configuration menu - View commit details
-
Copy full SHA for b687461 - Browse repository at this point
Copy the full SHA b687461View commit details -
Rollup merge of rust-lang#67985 - dtolnay:cstr, r=Mark-Simulacrum
Remove insignificant notes from CStr documentation The to_str and to_string_lossy methods contain a note about the behavior possibly changing in the future. But those notes are referring to a distinction that is not observable in the API. Whether or not the UTF-8 check knows the string length ahead of time, these methods require linear time.
Configuration menu - View commit details
-
Copy full SHA for 98a5c7d - Browse repository at this point
Copy the full SHA 98a5c7dView commit details -
Rollup merge of rust-lang#68003 - pietroalbini:yet-another-toolstate-…
…fix, r=Mark-Simulacrum ci: fix wrong shared.sh import for publish_toolstate r? @Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for 844530e - Browse repository at this point
Copy the full SHA 844530eView commit details