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

Conversation

@Centril
Copy link
Member

commented Jul 27, 2019

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

Aaron1011 and others added 27 commits Jul 5, 2019
Fix cycle error with existential types
Fixes #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')
Fix bug when opaque type was nested in another type.
Previously, types like (Foo, u8) would not be handled correctly
(where Foo is an 'existential type')
s/consts/`const` items/
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
tests: Add minimal reproduction of #61963.
This commit adds a reproduction of the error reported in servo which
demonstrates the current, incorrect behaviour.

Co-authored-by: Rémy Rakić <remy.rakic@gmail.com>
Rename JsonDumper to Dumper
The Dumper no longer has anything to do specifically with JSON, it
merely represents processing into an `Analysis` output.
Update src/librustc_mir/interpret/memory.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
Update src/librustc_mir/interpret/memory.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
lowering: Omit bare trait lint on macro call sites
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.
Rollup merge of #62423 - Aaron1011:fix/existential-cycle, r=oli-obk
Fix cycle error with existential types

Fixes #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`)
Rollup merge of #62982 - oli-obk:static_cycle, r=RalfJung
Don't access a static just for its size and alignment

cc @RalfJung

fixes #62189
Rollup merge of #63013 - nivkner:ffi-safe-slice, r=sfackler
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
Rollup merge of #63014 - davidtwco:rustfix-incorrect-dyn-suggestion, …
…r=estebank

Stop bare trait lint applying to macro call sites

Fixes #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
Rollup merge of #63036 - topecongiro:add-lib-section, r=matklad
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

This comment has been minimized.

Copy link
Member Author

commented Jul 27, 2019

@bors r+ p=6 rollup=never

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 27, 2019

📌 Commit 51769b3 has been approved by Centril

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 27, 2019

⌛️ Testing commit 51769b3 with merge a5e7bb3...

bors added a commit that referenced this pull request Jul 27, 2019
Auto merge of #63043 - Centril:rollup-f4baee4, r=Centril
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

This comment has been minimized.

Copy link
Contributor

commented Jul 27, 2019

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

@bors bors added the merged-by-bors label Jul 27, 2019

@bors bors merged commit 51769b3 into rust-lang:master Jul 27, 2019

5 checks passed

homu Test successful
Details
pr Build #20190727.26 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details

@Centril Centril deleted the Centril:rollup-f4baee4 branch Jul 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.