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 7 pull requests #111089

Merged
merged 39 commits into from
May 2, 2023
Merged

Rollup of 7 pull requests #111089

merged 39 commits into from
May 2, 2023

Commits on Mar 2, 2023

  1. Configuration menu
    Copy the full SHA
    05c1e6b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5c34f77 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2023

  1. Refactor core::char::EscapeDefault and co. structures

    Change core::char::{EscapeUnicode, EscapeDefault and EscapeDebug}
    structures from using a state machine to computing escaped sequence
    upfront and during iteration just going through the characters.
    
    This is arguably simpler since it’s easier to think about having
    a buffer and start..end range to iterate over rather than thinking
    about a state machine.
    
    This also harmonises implementation of aforementioned iterators and
    core::ascii::EscapeDefault struct.  This is done by introducing a new
    helper EscapeIterInner struct which holds the buffer and offers simple
    methods for iterating over range.
    
    As a side effect, this probably optimises Display implementation for
    those types since rather than calling write_char repeatedly, write_str
    is invoked once.  On 64-bit platforms, it also reduces size of some of
    the structs:
    
        | Struct                     | Before | After |
        |----------------------------+--------+-------+
        | core::char::EscapeUnicode  |     16 |    12 |
        | core::char::EscapeDefault  |     16 |    12 |
        | core::char::EscapeDebug    |     16 |    16 |
    
    My ulterior motive and reason why I started looking into this is
    addition of as_str method to the iterators.  With this change this
    will became trivial.  It’s also going to be trivial to implement
    DoubleEndedIterator if that’s ever desired.
    mina86 committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    4510439 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. Remove all in target_thread_local cfg

    I think it was left there by mistake after previous refactoring.
    
    Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
    Ayush1325 committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    be413ae View commit details
    Browse the repository at this point in the history
  2. Implement StructuralEq for integers, bool and char

    (how did this work before??)
    WaffleLapkin committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    518d348 View commit details
    Browse the repository at this point in the history
  3. Add a ConstParamTy trait

    WaffleLapkin committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    9a716da View commit details
    Browse the repository at this point in the history
  4. derive(Eq) in a test

    WaffleLapkin committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    c8844e1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    81a2b85 View commit details
    Browse the repository at this point in the history
  6. Rename/move a test

    WaffleLapkin committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    c45c4f2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1c54410 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7234d63 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2205c3f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1bf6bbb View commit details
    Browse the repository at this point in the history
  11. Add FIXMEs

    WaffleLapkin committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    2c5e716 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    51355ad View commit details
    Browse the repository at this point in the history
  13. Fix some marker impls

    WaffleLapkin committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    bdb5502 View commit details
    Browse the repository at this point in the history
  14. Add ConstParamTy tests

    WaffleLapkin committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    26417a8 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    2f70d02 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    1f44a24 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2023

  1. Configuration menu
    Copy the full SHA
    182eee2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5c99175 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2023

  1. fix rustdoc and core test

    fee1-dead committed Apr 29, 2023
    Configuration menu
    Copy the full SHA
    e928067 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    475378f View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2023

  1. review

    mina86 committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    4d0f7e2 View commit details
    Browse the repository at this point in the history
  2. a bit more usize::from

    mina86 committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    76c9947 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2023

  1. Fix StructuralEq impls for &T, [T] and [T; N]

    (`StructuralEq` is shallow for some reason...)
    WaffleLapkin committed May 1, 2023
    Configuration menu
    Copy the full SHA
    c317546 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0bcfff4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8ea71f2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bec7193 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b00e5f3 View commit details
    Browse the repository at this point in the history
  6. fix stderrs

    gibbyfree committed May 1, 2023
    Configuration menu
    Copy the full SHA
    c9653a6 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Configuration menu
    Copy the full SHA
    7411468 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#105076 - mina86:a, r=scottmcm

    Refactor core::char::EscapeDefault and co. structures
    
    Change core::char::{EscapeUnicode, EscapeDefault and EscapeDebug}
    structures from using a state machine to computing escaped sequence
    upfront and during iteration just going through the characters.
    
    This is arguably simpler since it’s easier to think about having
    a buffer and start..end range to iterate over rather than thinking
    about a state machine.
    
    This also harmonises implementation of aforementioned iterators and
    core::ascii::EscapeDefault struct.  This is done by introducing a new
    helper EscapeIterInner struct which holds the buffer and offers simple
    methods for iterating over range.
    
    As a side effect, this probably optimises Display implementation for
    those types since rather than calling write_char repeatedly, write_str
    is invoked once.  On 64-bit platforms, it also reduces size of some of
    the structs:
    
        | Struct                     | Before | After |
        |----------------------------+--------+-------+
        | core::char::EscapeUnicode  |     16 |    12 |
        | core::char::EscapeDefault  |     16 |    12 |
        | core::char::EscapeDebug    |     16 |    16 |
    
    My ulterior motive and reason why I started looking into this is
    addition of as_str method to the iterators.  With this change this
    will became trivial.  It’s also going to be trivial to implement
    DoubleEndedIterator if that’s ever desired.
    Dylan-DPC committed May 2, 2023
    Configuration menu
    Copy the full SHA
    f916c44 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#108161 - WaffleLapkin:const_param_ty, r=Box…

    …yUwU
    
    Add `ConstParamTy` trait
    
    This is a bit sketch, but idk.
    r? `@BoxyUwU`
    
    Yet to be done:
    - [x] ~~Figure out if it's okay to implement `StructuralEq` for primitives / possibly remove their special casing~~ (it should be okay, but maybe not in this PR...)
    - [ ] Maybe refactor the code a little bit
    - [x] Use a macro to make impls a bit nicer
    
    Future work:
    - [ ] Actually™ use the trait when checking if a `const` generic type is allowed
    - [ ] _Really_ refactor the surrounding code
    - [ ] Refactor `marker.rs` into multiple modules for each "theme" of markers
    Dylan-DPC committed May 2, 2023
    Configuration menu
    Copy the full SHA
    b727132 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#108668 - gibbyfree:stabilizedebuggervisuali…

    …zer, r=wesleywiser
    
    Stabilize debugger_visualizer
    
    This stabilizes the `debugger_visualizer` attribute (rust-lang#95939).
    
    * Marks the `debugger_visualizer` feature as `accepted`.
    * Marks the `debugger_visualizer` attribute as `ungated`.
    * Deletes feature gate test, removes feature gate from other tests.
    
    Closes rust-lang#95939
    Dylan-DPC committed May 2, 2023
    Configuration menu
    Copy the full SHA
    f379a58 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#110512 - compiler-errors:fix-elaboration-wi…

    …th-associated-type-bounds, r=spastorino
    
    Fix elaboration with associated type bounds
    
    When computing a trait's supertrait predicates, do not add any associated type *trait* bounds to that list of supertrait predicates. This is because supertrait predicates are expected to have the same `Self` type as the trait.
    
    For example, given:
    
    ```rust
    trait Foo: Bar<Assoc: Send>
    ```
    
    Before, we would compute that the supertrait predicates of `T: Foo` are `T: Bar` and `<T as Bar>::Assoc: Send`. However, the last bound is a trait predicate for a totally different type than `T`, and existing code that uses supertrait bounds such as vtable construction, closure fn signature deduction, etc. all rely on the invariant that we have a list of predicates for self type `T`.
    
    Fixes rust-lang#76593
    
    The reason for all the extra diagnostic noise is that we're recomputing predicates with a different filter now. These diagnostics should be deduplicated for any end-user though.
    
    ---
    
    This does bring up an interesting question -- is the predicate `<T as Bar>::Assoc: Send` an implied bound of `T: Foo`? Because currently the only bounds implied by a (non-alias) trait are its supertraits. I guess I could fix this too, but it would require even more changes, and I'm inclined to punt this question along.
    Dylan-DPC committed May 2, 2023
    Configuration menu
    Copy the full SHA
    be4f9f5 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#110895 - Ayush1325:thread-local-fix, r=thomcc

    Remove `all` in target_thread_local cfg
    
    I think it was left there by mistake after the previous refactoring. I just came across it while rebasing to master.
    Dylan-DPC committed May 2, 2023
    Configuration menu
    Copy the full SHA
    f47a63c View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#110955 - fee1-dead-contrib:sus-operation, r…

    …=compiler-errors
    
    uplift `clippy::clone_double_ref` as `suspicious_double_ref_op`
    
    Split from rust-lang#109842.
    
    r? ``@compiler-errors``
    Dylan-DPC committed May 2, 2023
    Configuration menu
    Copy the full SHA
    40c4ed4 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#111048 - compiler-errors:rpitit-not-incompl…

    …ete, r=jackh726
    
    Mark`feature(return_position_impl_trait_in_trait)` and`feature(async_fn_in_trait)` as not incomplete
    
    I think they've graduated, since as far as I'm aware, they don't cause compiler crashes or unsoundness anymore.
    Dylan-DPC committed May 2, 2023
    Configuration menu
    Copy the full SHA
    2e3373c View commit details
    Browse the repository at this point in the history