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 9 pull requests #121761

Closed
wants to merge 27 commits into from

Commits on Feb 19, 2024

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

Commits on Feb 20, 2024

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

Commits on Feb 21, 2024

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

Commits on Feb 23, 2024

  1. Configuration menu
    Copy the full SHA
    97e00a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3927057 View commit details
    Browse the repository at this point in the history
  3. std: make ReentrantLock public

    joboet committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    2aa8a1d View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2024

  1. Configuration menu
    Copy the full SHA
    5df9593 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    67f14e8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c0e0d13 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    990fd60 View commit details
    Browse the repository at this point in the history
  5. Move capacity_overflow function to make ui tests change less

    Code changes in raw_vec require blessing UI tests every time
    kornelski committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    196522b View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. Refactor DiagCtxtInner::flush_delayed.

    This commit:
    - Moves the ICE file create/open outside the loop. (Redoing it on every
      loop iteration works, but is really weird.)
    - Moves the explanatory note emission above the loop, which removes the
      need for the `enumerate` call.
    - Introduces a `decorate` local.
    nnethercote committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    bac96bd View commit details
    Browse the repository at this point in the history
  2. Use LitKind::Err for floats with empty exponents.

    This prevents a follow-up type error in a test, which seems fine.
    nnethercote committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    951f2d9 View commit details
    Browse the repository at this point in the history
  3. Reformat float-field.rs test.

    - Put every literal in its own braces, rather than just some of them,
      for maximal error recovery.
    - Add a blank line between every case, for readability.
    nnethercote committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    7976609 View commit details
    Browse the repository at this point in the history
  4. Use LitKind::Err for floats with unsupported bases.

    This slightly changes error messages in `float-field.rs`, but nothing of
    real importance.
    nnethercote committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    840c8d3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    12b991d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    632d26a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5cdbe83 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#110543 - joboet:reentrant_lock, r=m-ou-se

    Make `ReentrantLock` public
    
    Implements the ACP rust-lang/libs-team#193.
    
    `@rustbot` label +T-libs-api +S-waiting-on-ACP
    GuillaumeGomez authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    90244b7 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#120504 - kornelski:try_with_capacity, r=Ama…

    …nieu
    
    Vec::try_with_capacity
    
    Related to rust-lang#91913
    
    Implements try_with_capacity for `Vec`, `VecDeque`, and `String`. I can follow it up with more collections if desired.
    
    `Vec::try_with_capacity()` is functionally equivalent to the current stable:
    
    ```rust
    let mut v = Vec::new();
    v.try_reserve_exact(n)?
    ```
    
    However, `try_reserve` calls non-inlined `finish_grow`, which requires old and new `Layout`, and is designed to reallocate memory. There is benefit to using `try_with_capacity`, besides syntax convenience, because it generates much smaller code at the call site with a direct call to the allocator. There's codegen test included.
    
    It's also a very desirable functionality for users of `no_global_oom_handling` (Rust-for-Linux), since it makes a very commonly used function available in that environment (`with_capacity` is used much more frequently than all `(try_)reserve(_exact)`).
    GuillaumeGomez authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    f38a60b View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#121326 - fmease:detect-empty-leading-where-…

    …clauses-on-ty-aliases, r=compiler-errors
    
    Detect empty leading where clauses on type aliases
    
    1. commit: refactor the AST of type alias where clauses
       * I could no longer bear the look of `.0.1` and `.1.0`
       * Arguably moving `split` out of `TyAlias` into a substruct might not make that much sense from a semantic standpoint since it reprs an index into `TyAlias.predicates` but it's alright and it cleans up the usage sites of `TyAlias`
    2. commit: fix an oversight: An empty leading where clause is still a leading where clause
       * semantically reject empty leading where clauses on lazy type aliases
         * e.g., on `#![feature(lazy_type_alias)] type X where = ();`
       * make empty leading where clauses on assoc types trigger lint `deprecated_where_clause_location`
         * e.g., `impl Trait for () { type X where = (); }`
    GuillaumeGomez authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    a426716 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#121416 - veera-sivarajan:bugfix-120785, r=n…

    …nethercote
    
    Improve error messages for generics with default parameters
    
    Fixes rust-lang#120785
    
    Issue: Previously, all type parameters with default types were deliberately ignored to simplify error messages. For example, an error message for Box type would display `Box<T>` instead of `Box<T, _>`. But, this resulted in unclear error message when a concrete type was used instead of the default type.
    
    Fix: This PR fixes it by checking if a concrete type is specified after a default type to display the entire type name or the simplified type name.
    GuillaumeGomez authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    0d5303a View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#121689 - GuillaumeGomez:rustdoc-highlightin…

    …g-whitespace, r=notriddle
    
    [rustdoc] Prevent inclusion of whitespace character after macro_rules ident
    
    Discovered this bug randomly when looking at:
    
    ![image](https://github.com/rust-lang/rust/assets/3050060/dca38047-9085-4377-bfac-f98890224be4)
    
    We were too eagerly trying to merge tokens that shouldn't be merged together (for example if you have a code comment followed by a code comment, we merge them in one attribute to reduce the DOM size).
    
    r? `@notriddle`
    GuillaumeGomez authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    fd3b535 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#121723 - nnethercote:two-diagnostic-things,…

    … r=oli-obk
    
    Two diagnostic things
    
    Two minor improvements to diagnostics-related things.
    
    r? `@RalfJung`
    GuillaumeGomez authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    9704475 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#121724 - nnethercote:LitKind-Err-for-floats…

    …, r=fmease
    
    Use `LitKind::Err` for malformed floats
    
    rust-lang#121120 changed `StringReader::cook_lexer_literal` to return `LitKind::Err` for malformed integer literals. This commit does the same for float literals, for consistency.
    
    r? `@fmease`
    GuillaumeGomez authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    cd01b13 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#121735 - Nadrieril:no-panic-on-type-error, …

    …r=compiler-errors
    
    pattern analysis: Don't panic when encountering unexpected constructor
    
    Tiny PR to fix rust-lang/rust-analyzer#16656
    
    r? `@compiler-errors`
    GuillaumeGomez authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    74fbbaa View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#121743 - compiler-errors:opportunistically-…

    …resolve-regions, r=jackh726
    
    Opportunistically resolve regions when processing region outlives obligations
    
    Due to the matching in `TypeOutlives` being structural, we should attempt to opportunistically resolve regions before processing region obligations. Thanks `@lcnr` for finding this.
    
    r? lcnr
    GuillaumeGomez authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    1c10897 View commit details
    Browse the repository at this point in the history