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 6 pull requests #63043

Merged
merged 27 commits into from
Jul 27, 2019
Merged

Rollup of 6 pull requests #63043

merged 27 commits into from
Jul 27, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jul 27, 2019

Successful merges:

Failed merges:

r? @ghost

Aaron1011 and others added 27 commits July 7, 2019 17:22
Fixes rust-lang#61863

We now allow uses of 'existential type's that aren't defining uses -
that is, uses which don't constrain the underlying concrete type.

To make this work correctly, we also modify eq_opaque_type_and_type to
not try to apply additional constraints to an opaque type. If we have
code like this:

```
existential type Foo;
fn foo1() -> Foo { ... }
fn foo2() -> Foo { foo1() }
```

then 'foo2' doesn't end up constraining 'Foo', which means that
'foo2' will end up using the type 'Foo' internally - that is, an actual
'TyKind::Opaque'. We don't want to equate this to the underlying
concrete type - we just need to enforce the basic equality constraint
between the two types (here, the return type of 'foo1' and the return
type of 'foo2')
Previously, types like (Foo, u8) would not be handled correctly
(where Foo is an 'existential type')
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
This commit adds a reproduction of the error reported in servo which
demonstrates the current, incorrect behaviour.

Co-authored-by: Rémy Rakić <[email protected]>
The Dumper no longer has anything to do specifically with JSON, it
merely represents processing into an `Analysis` output.
This commit implements a hacky fix for detecting when a span is pointing
at a macro call site so that bare trait lints are not made incorrectly.
…oli-obk

Fix cycle error with existential types

Fixes rust-lang#61863

We now allow uses of `existential type`'s that aren't defining uses - that is, uses which don't constrain the underlying concrete type.

To make this work correctly, we also modify `eq_opaque_type_and_type` to not try to apply additional constraints to an opaque type. If we have code like this:

```rust
existential type Foo;
fn foo1() -> Foo { ... }
fn foo2() -> Foo { foo1() }
```

then `foo2` doesn't end up constraining `Foo`, which means that `foo2` will end up using the type `Foo` internally - that is, an actual `TyKind::Opaque`. We don't want to equate this to the underlying concrete type - we just need to enforce the basic equality constraint between the two types (here, the return type of `foo1` and the return type of `foo2`)
… r=Xanewok

Cleanup save-analysis JsonDumper
Don't access a static just for its size and alignment

cc @RalfJung

fixes rust-lang#62189
add `repr(transparent)` to `IoSliceMut` where missing

tried using `IoSliceMut` in FFI, got `improper_ctypes` warning.

according to the docs: `IoSliceMut` is  "guaranteed to be ABI compatible with the `iovec` type" so it should be usable in FFI.
`IoSlice` is also `repr(transparent)` for every platform where these types contain `iovec`-like types.
vxworks also has `IoSliceMut` as transparent so its not even consistently one or the other.

no comment about this next to the types or in the PR that introduced the types, so assuming this was just missed.

r? @sfackler
…gestion, r=estebank

Stop bare trait lint applying to macro call sites

Fixes rust-lang#61963. Apologies for the delay with in fixing this. If anyone has a better idea how to detect this macro call site case, I'd be happy to fix this in a more robust, less hacky way.

r? @estebank
Add lib section to rustc_lexer's Cargo.toml

This is required to fix the rustc-ap-syntax build error in the recent version. The error could also be fixed on the [rustc-auto-publish](https://github.com/alexcrichton/rustc-auto-publish) side by manually adding `[lib]` section if one does not exist. The latter approach, however, may have a surprising side effect, so I am opting for a simpler solution for now.

r? @alexcrichton
@Centril
Copy link
Contributor Author

Centril commented Jul 27, 2019

@bors r+ p=6 rollup=never

@bors
Copy link
Contributor

bors commented Jul 27, 2019

📌 Commit 51769b3 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 27, 2019
@bors
Copy link
Contributor

bors commented Jul 27, 2019

⌛ Testing commit 51769b3 with merge a5e7bb3...

bors added a commit that referenced this pull request Jul 27, 2019
Rollup of 6 pull requests

Successful merges:

 - #62423 (Fix cycle error with existential types)
 - #62979 (Cleanup save-analysis JsonDumper)
 - #62982 (Don't access a static just for its size and alignment)
 - #63013 (add `repr(transparent)` to `IoSliceMut` where missing)
 - #63014 (Stop bare trait lint applying to macro call sites)
 - #63036 (Add lib section to rustc_lexer's Cargo.toml)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Jul 27, 2019

☀️ Test successful - checks-azure
Approved by: Centril
Pushing a5e7bb3 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants