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 10 pull requests #73923

Closed
wants to merge 28 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

Polkaverse and others added 28 commits June 14, 2020 22:57
This allows us to write

fn char_to_string() -> String {
    'a'.into()
}

which was not possible before.
They are gated by internal feature gate const_likely
Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
…=davidtwco

Added detailed error code explanation for issue E0687 in Rust compiler.

Added proper error explanation for issue E0687 in the Rust compiler.
Error Code E0687

Sub Part of Issue rust-lang#61137

r? @GuillaumeGomez
…olnay

impl From<char> for String

This allows us to write

````rust
fn char_to_string() -> String {
    'a'.into()
}
````

which was not possible before.
stop taking references in Relate

Adds a `Copy` bound to `Relate` and changes the type signatures to `T` from `&T`. While the `Copy` bound is not strictly necessary (i.e. the `Clone` bound of `TypeRelation` would be good enough), we don't need non `Copy` types and it simplifies the implementation.

Removes the afaict unused impls for `Vec<ty::PolyExistentialProjection<'tcx>>`, `Rc<T>` and `Box<T>`. If they end up being relevant again the bound of `Relate` can be reduced to `T: Clone`.

This also changes signature of `Binder::skip_binder` to `fn skip_binder(self) -> T`.

`TypeError::ProjectionBoundsLength` was never used and is also removed in this PR.

r? @nikomatsakis maybe 🤔 feel free to reassign
Make `likely` and `unlikely` const, gated by feature `const_unlikely`

This PR also contains a fix to allow `#[allow_internal_unstable]` to work properly with `#[rustc_const_unstable]`.

cc @RalfJung @nagisa

r? @oli-obk
…bank

Fix wording for anonymous parameter name help

```
 --> exercises/functions/functions2.rs:8:15
  |
8 | fn call_me(num) {
  |               ^ expected one of `:`, `@`, or `|`
  |
  = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a `self` type, give it a parameter name
  |
8 | fn call_me(self: num) {
  |            ^^^^^^^^^
help: if this was a parameter name, give it a type
  |
8 | fn call_me(num: TypeName) {
  |            ^^^^^^^^^^^^^
help: if this is a type, explicitly ignore the parameter name
  |
8 | fn call_me(_: num) {
  |
```
This commit changes "if this was a parameter name" to "if this is a parameter name" to match the wording of similar errors.
…r=jonas-schievink

Advertise correct stable version for const control flow

rust-lang#72437 was opened before the 1.45 release but merged afterwards. These will be stable in 1.46.
remove duplicate test for rust-lang#61935

Apparently I somehow messed up the issue number in rust-lang#67890
which caused us to add this test twice, both as https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/issues/issue-61935.rs and https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/lazy-normalization/issue-71922.rs

rust-lang#61935 is the actually fixed issue while rust-lang#71922 is still not working, as it depends on lazy norm of repeat expressions
…vink

Add missing backtick in `ty_error_with_message`
…ckler

`#[deny(unsafe_op_in_unsafe_fn)]` in libstd/fs.rs

The `libstd/fs.rs` part of rust-lang#73904 . Wraps the two calls to an unsafe fn `Initializer::nop()` in an `unsafe` block.

Followed instructions in parent issue, ran `./x.py check src/libstd/` after adding the lint and two warnings were given. After adding these changes, those disappear.
@Dylan-DPC-zz
Copy link
Author

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Jul 1, 2020

📌 Commit b37816d has been approved by Dylan-DPC

@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 1, 2020
@Manishearth
Copy link
Member

Closing in favor of #73924 , contains more substantiative PRs.

@Manishearth Manishearth closed this Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.