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 17 pull requests #57733

Closed
wants to merge 45 commits into
base: master
from

Conversation

Projects
None yet
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Jan 18, 2019

Successful merges:

  • #56594 (Remove confusing comment about ideally using ! for c_void)
  • #57107 (Add a regression test for mutating a non-mut #[thread_local])
  • #57340 (Use correct tracking issue for c_variadic)
  • #57357 (Cleanup PartialEq docs.)
  • #57370 (Support passing cflags/cxxflags/ldflags to LLVM build)
  • #57551 (resolve: Add a test for issue #57539)
  • #57635 (use structured macro and path resolve suggestions)
  • #57636 (Fix sources sidebar not showing up)
  • #57646 (Fixes text becoming invisible when element targetted)
  • #57650 (librustc_metadata: Pass a default value when unwrapping a span)
  • #57654 (Add some links in std::fs.)
  • #57658 (Two HIR tweaks)
  • #57683 (Document Unpin in std::prelude documentation)
  • #57685 (Enhance Pin impl applicability for PartialEq and PartialOrd.)
  • #57710 (Fix non-clickable urls)
  • #57720 (Fix suggestions given mulitple bad lifetimes)
  • #57725 (Use structured suggestion to surround struct literal with parenthesis)

Failed merges:

r? @ghost

sdroege and others added some commits Dec 7, 2018

Remove confusing comment about ideally using `!` for `c_void`
Using `!` for `c_void` would have the problem that pointers and
potentially references to an uninhabited type would be created, and at
least for references this is UB.

Also document in addition that newtype wrappers around `c_void` are not
recommended for representing opaque types (as a workaround for `extern
type` not being stable) but instead refer to the Nomicon.
Update code comments of `c_void` to explain the reasoning for its cur…
…rent implementation

We need at least two variants of the enum as otherwise the compiler
complains about the #[repr(u8)] attribute and we also need at least one
variant as otherwise the enum would be uninhabitated and dereferencing
pointers to it would be UB.

As such, mark the variants not unstable because they should not actually
exist but because they are temporary implementation details until
`extern type` is stable and can be used instead.
Cleanup PartialEq docs.
- Cleanup the `impl PartialEq<BookFormat> for Book` implementation
- Implement `impl PartialEq<Book> for BookFormat` so it’s symmetric
  - Fixes #53844.
- Removes the last example since it appears to be redundant with the
  previous two examples.
Support passing cflags/cxxflags/ldflags to LLVM build
This may be needed with some host compilers.
AB1908
Add some links in std::fs.
A few items were referenced, but did not have links.
Use `Lit` rather than `P<Lit>` in `hir::ExprKind`.
It's simpler and makes some benchmark run up to 1% faster. It also makes
`hir::ExprKind` more like `ast::ExprKind` (which underwent the
equivalent change in #55777).
Remove `hir::Label`.
It's identical to `ast::Label`.
Fix suggestions given mulitple bad lifetimes
When given multiple lifetimes prior to type parameters in generic
parameters, do not ICE and print the correct suggestion.
Rollup merge of #56594 - sdroege:c_void-is-not-never, r=TimNN
Remove confusing comment about ideally using `!` for `c_void`

Using `!` for `c_void` would have the problem that pointers and
potentially references to an uninhabited type would be created, and at
least for references this is UB.

In addition document that newtype wrappers around `c_void` can be used
safely in place of `extern type` until the latter is stabilized.

----

I'm not 100% sure about the usage for opaque types as the [nomicon](https://doc.rust-lang.org/nomicon/ffi.html#representing-opaque-structs) still recommends using `#[repr(C)] pub struct Foo { _private: [u8; 0] }` but it seems like these two should be equivalent in the end? Also the `#[repr(C)]` (in both cases) should be unneeded because such types never being passed by value, never being dereferenced but only passed around as pointer or reference, so the representation of (*values* of) the type itself should not matter at all?

Also in context of `c_void` and `!` the second unresolved question in the [`extern type`](#43467) stabilization ticket seems relevant

> In [std's](https://github.com/rust-lang/rust/blob/164619a8cfe6d376d25bd3a6a9a5f2856c8de64d/src/libstd/os/raw.rs#L59-L64) source, it is mentioned that LLVM expects i8* for C's void*.
> We'd need to continue to hack this for the two c_voids in std and libc.
> But perhaps this should be done across-the-board for all extern types?
> Somebody should check what Clang does.

Please correct me if my understanding is wrong and everything's actually fine as is.
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
Add a regression test for mutating a non-mut #[thread_local]

This should close #54901 since the regression has since been fixed.

GuillaumeGomez added some commits Jan 18, 2019

Rollup merge of #57340 - eqrion:doc/c_variadic, r=Mark-Simulacrum
Use correct tracking issue for c_variadic

Fixes #57306
Rollup merge of #57357 - frewsxcv:frewsxcv-partial-eq, r=QuietMisdreavus
Cleanup PartialEq docs.

- Cleanup the `impl PartialEq<BookFormat> for Book` implementation
- Implement `impl PartialEq<Book> for BookFormat` so it’s symmetric
  - Fixes #53844.
- Removes the last example since it appears to be redundant with the
  previous two examples.
Rollup merge of #57370 - petrhosek:llvm-flags, r=alexcrichton
Support passing cflags/cxxflags/ldflags to LLVM build

This may be needed with some host compilers.
Rollup merge of #57551 - petrochenkov:regrtest, r=nikomatsakis
resolve: Add a test for issue #57539

Add a test for the bugfix regression reported in #57539

Closes #57539
Rollup merge of #57635 - euclio:path-separators, r=michaelwoerister
use structured macro and path resolve suggestions
Rollup merge of #57636 - GuillaumeGomez:fix-sources-sidebar, r=QuietM…
…isdreavus

Fix sources sidebar not showing up

Fixes #57601.

The order of imports made it so that the sidebar creation was called before the sidebar sources were created. Like this, when the sources are loaded, they create the sidebar as expected.

r? @QuietMisdreavus
Rollup merge of #57646 - GuillaumeGomez:fix-css, r=QuietMisdreavus
Fixes text becoming invisible when element targetted

Fixes #57628.

r? @QuietMisdreavus
Rollup merge of #57650 - AB1908:master, r=petrochenkov
librustc_metadata: Pass a default value when unwrapping a span

Fixes #57323.

When compiling with `static-nobundle` a-la

`rustc -l static-nobundle=nonexistent main.rs`

we now get a neat output in the form of:

```
error[E0658]: kind="static-nobundle" is feature gated (see issue #37403)
  |
  = help: add #![feature(static_nobundle)] to the crate attributes to enable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
```
The build and tests completed successfully on my machine. Should I be adding a new test?
Rollup merge of #57654 - ehuss:fs-links, r=alexcrichton
Add some links in std::fs.

A few items were referenced, but did not have links.
Rollup merge of #57658 - nnethercote:rm-hir-P-Lit, r=michaelwoerister
Two HIR tweaks

Two HIR tweaks that make things slightly simpler and faster.
Rollup merge of #57683 - xfix:patch-15, r=QuietMisdreavus
Document Unpin in std::prelude documentation
Rollup merge of #57685 - pthariensflame:enhancement/pin-impl-applicab…
…ility, r=withoutboats

Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.

This allows for comparing for equality or ordering a `Pin<P>` and a `Pin<Q>` as long as `P` and `Q` are correspondingly comparable themselves *even when `P` and `Q` are different types*.
An example might be comparing a `Pin<&mut OsString>` to a `Pin<&mut PathBuf>`, which might arise from pin projections from a pair of larger contexts that aren't `Unpin`.
Rollup merge of #57710 - GuillaumeGomez:non-clickable, r=QuietMisdreavus
Fix non-clickable urls

Fixes #57695

I didn't find anywhere where this rule was useful. Why did you add it @JohnHeitmann?

r? @QuietMisdreavus
Rollup merge of #57720 - dlrobertson:fix_57521, r=estebank
Fix suggestions given mulitple bad lifetimes

When given multiple lifetimes prior to type parameters in generic
parameters, do not ICE and print the correct suggestion.

r? @estebank

CC @pnkfelix

Fixes: #57521
Rollup merge of #57725 - estebank:parens, r=michaelwoerister
Use structured suggestion to surround struct literal with parenthesis

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:rollup branch Jan 18, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 18, 2019

Your PR failed on Travis (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.

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 @TimNN. (Feature Requests)

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