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 11 pull requests #84483

Closed
wants to merge 31 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jyn514 and others added 30 commits April 2, 2021 19:36
… stabilized

I don't know how to test this. I confirmed locally that this gives the
appropriate help with `channel = "beta"`:

```
error[E0554]: `#![feature]` may not be used on the beta release channel
 --> src/lib.rs:2:1
  |
2 | #![feature(min_const_generics)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the attribute
  |
  = help: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable

error[E0554]: `#![feature]` may not be used on the beta release channel
 --> src/lib.rs:3:1
  |
3 | #![feature(min_const_generics, min_specialization)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable

error[E0554]: `#![feature]` may not be used on the beta release channel
 --> src/lib.rs:4:1
  |
4 | #![feature(box_patterns)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
```
Add missing information on what standard-library features are supported
by the UEFI targets.

All current UEFI targets (which is i686 and x86_64) only support no_std
cross-compilations. `std` support has not been worked on and is unlikely
to emerge anytime soon, due to the much restricted environment that UEFI
provides.
This was missed a while ago when support for proc-macro attributes was
first added.
On stable, suggest removing `#![feature]` for features that have been stabilized

I don't know how to test this (https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Run.20tests.20without.20enabling.20nightly.20features.3F). I confirmed locally that this gives the
appropriate help with `channel = "beta"`:

```
error[E0554]: `#![feature]` may not be used on the beta release channel
 --> src/lib.rs:2:1
  |
2 | #![feature(min_const_generics)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the attribute
  |
  = help: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable

error[E0554]: `#![feature]` may not be used on the beta release channel
 --> src/lib.rs:3:1
  |
3 | #![feature(min_const_generics, min_specialization)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable

error[E0554]: `#![feature]` may not be used on the beta release channel
 --> src/lib.rs:4:1
  |
4 | #![feature(box_patterns)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
```

Closes rust-lang#83715.
implement `TrustedRandomAccess` for `Take` iterator adapter

`TrustedRandomAccess` requires the iterator length to fit within `usize`. `take(n)` only constrains the upper bound of an iterator. So if the inner is `TrustedRandomAccess` (which already implies a finite length) then so can be `Take`.

``````@rustbot`````` label T-libs-impl
…es, r=varkor

various const parameter defaults improvements

Actually resolve names in const parameter defaults, fixing `struct Foo<const N: usize = { usize::MAX }>`.

---
Split generic parameter ban rib for types and consts, allowing
```rust
#![feature(const_generics_defaults)]
struct Q;
struct Foo<T = Q, const Q: usize = 3>(T);
```

---
Remove the type/const ordering restriction if `const_generics_defaults` is active, even if `const_generics` is not. allowing us to stabilize and test const param defaults separately.

---
Check well formedness of const parameter defaults, eagerly emitting an error for `struct Foo<const N: usize = { 0 - 1 }>`

---
Do not forbid const parameters in param defaults, allowing `struct Foo<const N: usize, T = [u8; N]>(T)` and `struct Foo<const N: usize, const M: usize = N>`. Note that this should not change anything which is stabilized, as on stable, type parameters must be in front of const parameters, which means that type parameter defaults are only allowed if no const parameters exist.

We still forbid generic parameters inside of const param types.

r? ``````@varkor`````` ``````@petrochenkov``````
Clean up .gitignore

Categorizes entries in the `.gitignore` file.

Other changes:
- added `desktop.ini` (Windows equivalent of `.DS_Store`)
- removed `.hg/` and `.hgignore`
Move `sys_common::poison` to `sync::poison`

`sys_common` should not contain publicly exported types, only platform-independent abstractions on top of `sys`, which `sys_common::poison` is not. There is thus no reason for the module to not live under `sync`.

Part of rust-lang#84187.
…r=dtolnay

Ensure TLS destructors run before thread joins in SGX

The excellent test is from ``@jethrogb``

For context see: rust-lang#83416 (comment)
doc/platform-support: clarify UEFI support

Add missing information on what standard-library features are supported by the UEFI targets.

All current UEFI targets (which is i686 and x86_64) only support no_std cross-compilations. `std` support has not been worked on and is unlikely to emerge anytime soon, due to the much restricted environment that UEFI provides.
…=jsha

Prevent control, shift and alt keys to make search input lose focus

Part of rust-lang#84384.

r? ```@jsha```
…d-items-toggle, r=yaahc

doc: Get rid of "[+] show undocumented items" toggle on numeric From impls

On most From implementations, the docstring is attached to the function. This is also how people have been [recommended] to do it.

Screenshots:

* [before](https://user-images.githubusercontent.com/1593513/115767662-323c5480-a35e-11eb-9918-98aba83e9183.png)
* [after](https://user-images.githubusercontent.com/1593513/115767675-35374500-a35e-11eb-964f-c28eeb6c807a.png)

[recommended]: rust-lang#51430 (comment)
Fix ICE if original_span(fn_sig) returns a span not in body sourcefile

Fixes: rust-lang#84421

r? ```@tmandry```

fyi: ```@wesleywiser``` ```@sdroege``` ```@rajivshah3```
rustdoc: Get rid of `clean::TypeKind`

It does exactly the same thing as ItemType.
@rustbot rustbot added the rollup A PR which is a rollup label Apr 23, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=11 rollup=never

@bors
Copy link
Contributor

bors commented Apr 23, 2021

📌 Commit 3ed8bba has been approved by JohnTitor

@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 Apr 23, 2021
@bors
Copy link
Contributor

bors commented Apr 23, 2021

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rollup-tmhaaib (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rollup-tmhaaib --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Removing src/test/ui/const-generics/defaults/simple-defaults.min.stderr
Auto-merging src/librustdoc/html/render/cache.rs
Auto-merging src/librustdoc/clean/utils.rs
CONFLICT (content): Merge conflict in src/librustdoc/clean/utils.rs
Auto-merging src/librustdoc/clean/types.rs
Auto-merging src/librustdoc/clean/mod.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 23, 2021
@JohnTitor JohnTitor closed this Apr 23, 2021
@JohnTitor JohnTitor deleted the rollup-tmhaaib branch April 23, 2021 18:38
@bors
Copy link
Contributor

bors commented Apr 23, 2021

☔ The latest upstream changes (presumably #84457) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.