Skip to content
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 4 pull requests #71565

Closed
wants to merge 18 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

oli-obk and others added 18 commits April 14, 2020 18:07
There is no `Arc::map` equivalent to `LockGuard::map`
...instead of a `LockGuard` which means the lock is held for longer than
necessary.
Co-Authored-By: Ralf Jung <post@ralfj.de>
make Map::def_kind take LocalDefId

Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>

crates are DefKind::Mod
Add all remaining `DefKind`s.

r? @eddyb or @Centril

~~I'm not sure if this is what you were thinking of. There are also a few places where I'm not sure what the correct choice is because I don't fully understand the meaning of some variants.~~

~~In general, it feels a bit odd to add some of these as `DefKind`s (e.g. `Arm`) because they don't feel like definitions. Are there things that it makes sense not to add?~~
[breaking change] Disallow statics initializing themselves

fixes rust-lang#71078

Self-initialization is unsound because it breaks privacy assumptions that unsafe code can make. In

```rust
pub mod foo {
    #[derive(Debug, Copy, Clone)]
    pub struct Foo {
        x: (),
    }
}

pub static FOO: foo::Foo = FOO;
```

unsafe could could expect that ony functions inside the `foo` module were able to create a value of type `Foo`.
…he-arc, r=nikomatsakis

Don't hold the predecessor cache lock longer than necessary

rust-lang#71044 returns a `LockGuard` with the predecessor cache to callers of `Body::predecessors`. As a result, the lock around the predecessor cache could be held for an arbitrarily long time. This PR uses reference counting for ownership of the predecessor cache, meaning the lock is only ever held within `PredecessorCache::compute`. Checking this API for potential sources of deadlock is much easier now, since we no longer have to consider its consumers, only its internals.

This required removing `predecessors_for`, since there is no equivalent to `LockGuard::map` for `Arc` and `Rc`. I believe this could be emulated with `owning_ref::{Arc,Rc}Ref`, but I don't think it's necessary. Also, we continue to return an opaque type from `Body::predecessors` with the lifetime of the `Body`, not `'static`.

This depends on rust-lang#71044. Only the last two commits are new.

r? @nikomatsakis
Replace thread_local with generator resume arguments in box_region.

Fixes rust-lang#68922.

Continuation of rust-lang#70622. Added a short doc, hope it makes sense.

r? @jonas-schievink
@Dylan-DPC-zz Dylan-DPC-zz reopened this Apr 25, 2020
@Dylan-DPC-zz Dylan-DPC-zz deleted the rollup-2e52c2g branch April 25, 2020 23:00
@rust-highfive
Copy link
Collaborator

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.
2020-04-25T23:00:44.3608695Z ========================== Starting Command Output ===========================
2020-04-25T23:00:44.3611377Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/be3f2fba-e57f-4229-9de8-2d3b042480db.sh
2020-04-25T23:00:44.3611634Z 
2020-04-25T23:00:44.3614667Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-25T23:00:44.3632341Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71565/merge to s
2020-04-25T23:00:44.3635204Z Task         : Get sources
2020-04-25T23:00:44.3635464Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-25T23:00:44.3635731Z Version      : 1.0.0
2020-04-25T23:00:44.3635907Z Author       : Microsoft
---
2020-04-25T23:00:45.3534270Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-25T23:00:45.3539694Z ##[command]git config gc.auto 0
2020-04-25T23:00:45.3543214Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-25T23:00:45.3546398Z ##[command]git config --get-all http.proxy
2020-04-25T23:00:45.3552302Z ##[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/71565/merge:refs/remotes/pull/71565/merge
2020-04-25T23:00:45.8340524Z fatal: couldn't find remote ref refs/pull/71565/merge
2020-04-25T23:00:45.9394485Z ##[warning]Git fetch failed with exit code 128, back off 1.612 seconds before retry.
2020-04-25T23:00:47.4800188Z ##[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/71565/merge:refs/remotes/pull/71565/merge
2020-04-25T23:00:47.9085666Z fatal: couldn't find remote ref refs/pull/71565/merge
2020-04-25T23:00:48.9076711Z ##[warning]Git fetch failed with exit code 128, back off 3.443 seconds before retry.
2020-04-25T23:00:51.3777106Z ##[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/71565/merge:refs/remotes/pull/71565/merge
2020-04-25T23:00:51.9426743Z fatal: couldn't find remote ref refs/pull/71565/merge
2020-04-25T23:00:52.0230675Z ##[error]Git fetch failed with exit code: 128
2020-04-25T23:00:52.0254887Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71565/merge to s
2020-04-25T23:00:52.0637378Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71565/merge to s
2020-04-25T23:00:52.0643624Z Task         : Get sources
2020-04-25T23:00:52.0643947Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-25T23:00:52.0644250Z Version      : 1.0.0
2020-04-25T23:00:52.0644460Z Author       : Microsoft
2020-04-25T23:00:52.0644460Z Author       : Microsoft
2020-04-25T23:00:52.0644773Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-25T23:00:52.0645146Z ==============================================================================
2020-04-25T23:00:52.3777132Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71565/merge to s
2020-04-25T23:00:52.3874321Z Cleaning up task key
2020-04-25T23:00:52.3875811Z Start cleaning up orphan processes.
2020-04-25T23:00:52.4021045Z ##[section]Finishing: Finalize Job
2020-04-25T23:00:52.4063276Z ##[section]Finishing: Linux x86_64-gnu-llvm-8

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 @rust-lang/infra. (Feature Requests)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants