-
Notifications
You must be signed in to change notification settings - Fork 13k
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 6 pull requests #103083
Rollup of 6 pull requests #103083
Conversation
by the end of the condition's execution
and cleanup lifetime rib walking loops
12 commits in b8f30cb23c4e5f20854a4f683325782b7cff9837..b332991a57c9d055f1864de1eed93e2178d49440 2022-10-10 19:16:06 +0000 to 2022-10-13 22:05:28 +0000 - Differentiate the warning when an alias (built-in or user-defined) shadows an external subcommand (rust-lang/cargo#11170) - chore: Update tests for latest clap (rust-lang/cargo#11235) - feat(publish): Support 'publish.timeout' config behind '-Zpublish-timeout' (rust-lang/cargo#11230) - Add missing edition (rust-lang/cargo#11231) - doc(profiles): add module level doc (rust-lang/cargo#11219) - refactor(publish): Clarify which SourceId is being used (rust-lang/cargo#11216) - Add new SourceKind::SparseRegistry to differentiate sparse registries (rust-lang/cargo#11209) - Fix deadlock when build scripts are waiting for input on stdin (rust-lang/cargo#11205) - refactor: New variant `FeaturesFor::ArtifactDep` (rust-lang/cargo#11184) - Fix rustdoc warning about unclosed HTML tag (rust-lang/cargo#11221) - refactor(tests): Prepare for wait-for-publish test changes (rust-lang/cargo#11210) - Add configuration option for controlling crates.io protocol (rust-lang/cargo#11215)
Use semaphores for thread parking on Apple platforms Currently we use a mutex-condvar pair for thread parking on Apple systems. Unfortunately, `pthread_cond_timedwait` uses the real-time clock for measuring time, which causes problems when the system time changes. The parking implementation in this PR uses a semaphore instead, which measures monotonic time by default, avoiding these issues. As a further benefit, this has the potential to improve performance a bit, since `unpark` does not need to wait for a lock to be released. Since the Mach semaphores are poorly documented (I could not find availability or stability guarantees for instance), this uses a [dispatch semaphore](https://developer.apple.com/documentation/dispatch/dispatch_semaphore?language=objc) instead. While it adds a layer of indirection (it uses Mach semaphores internally), the overhead is probably negligible. Tested on macOS 12.5. r? ``````@thomcc``````
resolve: Some cleanup, asserts and tests for lifetime ribs Follow up to rust-lang#98279 and friends. r? ``@cjgillot``
…s, r=Manishearth Add missing checks for `doc(cfg_hide(...))` Part of rust-lang#43781. The `doc(cfg_hide(...))` attribute can only be used at the crate level and takes a list of attributes as argument. r? ```@Manishearth```
…r=eholk Drop temporaries created in a condition, even if it's a let chain Fixes rust-lang#100513. During the lowering from AST to HIR we wrap expressions acting as conditions in a `DropTemps` expression so that any temporaries created in the condition are dropped after the condition is executed. Effectively this means we transform ```rust if Some(1).is_some() { .. } ``` into (roughly) ```rust if { let _t = Some(1).is_some(); _t } { .. } ``` so that if we create any temporaries, they're lifted into the new scope surrounding the condition, so for example something along the lines of ```rust if { let temp = Some(1); let _t = temp.is_some(); _t }. ``` Before this PR, if the condition contained any let expressions we would not introduce that new scope, instead leaving the condition alone. This meant that in a let-chain like ```rust if get_drop("first").is_some() && let None = get_drop("last") { println!("second"); } else { .. } ``` the temporary created for `get_drop("first")` would be lifted into the _surrounding block_, which caused it to be dropped after the execution of the entire `if` expression. After this PR, we wrap everything but the `let` expression in terminating scopes. The upside to this solution is that it's minimally invasive, but the downside is that in the worst case, an expression with `let` exprs interspersed like ```rust if get_drop("first").is_some() && let Some(_a) = get_drop("fifth") && get_drop("second").is_some() && let Some(_b) = get_drop("fourth") { .. } ``` gets _multiple_ new scopes, roughly ```rust if { let _t = get_drop("first").is_some(); _t } && let Some(_a) = get_drop("fifth") && { let _t = get_drop("second").is_some(); _t } && let Some(_b) = get_drop("fourth") { .. } ``` so instead of all of the temporaries being dropped at the end of the entire condition, they will be dropped right after they're evaluated (before the subsequent `let` expr). So while I'd say the drop behavior around let-chains is _less_ surprising after this PR, it still might not exactly match what people might expect. For tests, I've just extended the drop order tests added in rust-lang#100526. I'm not sure if that's the best way to go about it, though, so suggestions are welcome.
Fix `suggest_floating_point_literal` ICE Fixes rust-lang#102989
Update cargo 12 commits in b8f30cb23c4e5f20854a4f683325782b7cff9837..b332991a57c9d055f1864de1eed93e2178d49440 2022-10-10 19:16:06 +0000 to 2022-10-13 22:05:28 +0000 - Differentiate the warning when an alias (built-in or user-defined) shadows an external subcommand (rust-lang/cargo#11170) - chore: Update tests for latest clap (rust-lang/cargo#11235) - feat(publish): Support 'publish.timeout' config behind '-Zpublish-timeout' (rust-lang/cargo#11230) - Add missing edition (rust-lang/cargo#11231) - doc(profiles): add module level doc (rust-lang/cargo#11219) - refactor(publish): Clarify which SourceId is being used (rust-lang/cargo#11216) - Add new SourceKind::SparseRegistry to differentiate sparse registries (rust-lang/cargo#11209) - Fix deadlock when build scripts are waiting for input on stdin (rust-lang/cargo#11205) - refactor: New variant `FeaturesFor::ArtifactDep` (rust-lang/cargo#11184) - Fix rustdoc warning about unclosed HTML tag (rust-lang/cargo#11221) - refactor(tests): Prepare for wait-for-publish test changes (rust-lang/cargo#11210) - Add configuration option for controlling crates.io protocol (rust-lang/cargo#11215)
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: b15e2c129e In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (c93ef33): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
1 similar comment
Finished benchmarking commit (c93ef33): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Successful merges:
doc(cfg_hide(...))
#102954 (Add missing checks fordoc(cfg_hide(...))
)suggest_floating_point_literal
ICE #103003 (Fixsuggest_floating_point_literal
ICE)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup