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 #84424

Closed
wants to merge 35 commits into from

Commits on Feb 27, 2021

  1. Configuration menu
    Copy the full SHA
    5b9905b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    772543a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    907eab8 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2021

  1. Configuration menu
    Copy the full SHA
    30fc601 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    321aace View commit details
    Browse the repository at this point in the history
  3. Updating test stderr files

    sunjay committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    7faaf39 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    789186d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2acd8eb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3e34eb8 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Configuration menu
    Copy the full SHA
    539242a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eea27b8 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2021

  1. On stable, suggest removing #![feature] for features that have been…

    … 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)]
      | ^^^^^^^^^^^^^^^^^^^^^^^^^
    ```
    jyn514 committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    53a1105 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2021

  1. Configuration menu
    Copy the full SHA
    fa1624c View commit details
    Browse the repository at this point in the history
  2. Rename AssociatedItems to AssocItems

    Signed-off-by: Rustin-Liu <[email protected]>
    Rustin170506 committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    115e216 View commit details
    Browse the repository at this point in the history
  3. resolve conflicts

    resolve conflicts
    Rustin170506 committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    6c3f5b8 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2021

  1. Configuration menu
    Copy the full SHA
    37a5b51 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2021

  1. Configuration menu
    Copy the full SHA
    7efba4f View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. Configuration menu
    Copy the full SHA
    904ee68 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2021

  1. Correct typos

    Co-authored-by: Mara Bos <[email protected]>
    CDirkx and m-ou-se committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    2ecc820 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    03900e4 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2021

  1. Configuration menu
    Copy the full SHA
    259a368 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7cb1dcd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    312b4fd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d3e0d2f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6763a40 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2021

  1. Rollup merge of rust-lang#71511 - hi-rustin:rustin-patch-rename-assoc…

    …, r=eddyb,varkor
    
    Rename AssociatedItems to AssocItems
    
    Signed-off-by: Rustin-Liu <[email protected]>
    
    Part of rust-lang#60163 (comment)
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    07f8e76 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#77704 - AnthonyMikh:slice_index_with_ops_bo…

    …und_pair, r=m-ou-se
    
    Implement indexing slices with pairs of core::ops::Bound<usize>
    
    Closes rust-lang#49976.
    
    I am not sure about code duplication between `check_range` and `into_maybe_range`. Should be former implemented in terms of the latter? Also this PR doesn't address code duplication between `impl SliceIndex for Range*`.
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    752a293 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#82585 - TrolledWoods:master, r=dtolnay

    Added CharIndices::offset function
    
    The CharIndices iterator has a field internally called front_offset, that I think would be very useful to have access to.
    
    You can already do something like ``char_indices.next().map(|(offset, _)| offset)``, but that is wordy, in addition to not handling the case where the iterator has ended, where you'd want the offset to be equal to the length.
    
    I'm very new to the open source world and the rust repository, so I'm sorry if I missed a step or did something weird.
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    b468ccb View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#83004 - sunjay:field-never-read-issue-81658…

    …, r=pnkfelix
    
    Improve diagnostic for when field is never read
    
    Related to (but does not close) rust-lang#81658
    
    This completes the first step of `@pnkfelix's` [mentoring instructions](rust-lang#81658 (comment)) but does not actually improve the diagnostics (yet!). The two tests are heavily reduced versions of code from the original bug report.
    
    I've confirmed that the reduced `field-used-in-ffi` test [fails on nightly](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f0862c89ddca028c55c20a5ed05e679a) but [passes on stable](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f0862c89ddca028c55c20a5ed05e679a). This confirms that the regression is reproduced correctly. The `drop-only-field` test is a case that `@pnkfelix` mentioned in his mentoring instructions. It is not a regression, but will come in handy when we make the diagnostic smarter by looking at whether the field type implements `Drop`.
    
    Per the [rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/tests/adding.html), each test includes a comment summarizing what it is about.
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    7421ae1 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#83722 - jyn514:stable-help, r=estebank

    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.
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    c1bfcae View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#83729 - JohnTitor:issue-43913, r=estebank

    Add a suggestion when using a type alias instead of trait alias
    
    Fixes rust-lang#43913
    
    r? `@estebank`
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    d1da677 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#83990 - the8472:take-trusted-len, r=dtolnay

    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
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    be1d543 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#84179 - CDirkx:dont_send_sync, r=m-ou-se

    Explicitly implement `!Send` and `!Sync` for `sys::{Args, Env}`
    
    Remove the field `_dont_send_or_sync_me: PhantomData<*mut ()>` in favor of an explicit implementation of `!Send` and `!Sync`.
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    16e0773 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#84216 - RalfJung:black-box, r=Mark-Simulacrum

    move core::hint::black_box under its own feature gate
    
    The `black_box` function had its own RFC and is tracked separately from the `test` feature at rust-lang#64102. Let's reflect this in the feature gate.
    
    To avoid breaking all the benchmarks, libtest's `test::black_box` is a wrapping definition, not a reexport -- this means it is still under the `test` feature gate.
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    cee9014 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#84299 - lcnr:const-generics-defaults-name-r…

    …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``
    Dylan-DPC authored Apr 22, 2021
    Configuration menu
    Copy the full SHA
    faa7dca View commit details
    Browse the repository at this point in the history