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

Subtree push with 1.77.0 nightly 2023-12-28 #5994

Commits on Dec 14, 2023

  1. Split Handler::emit_diagnostic in two.

    Currently, `emit_diagnostic` takes `&mut self`.
    
    This commit changes it so `emit_diagnostic` takes `self` and the new
    `emit_diagnostic_without_consuming` function takes `&mut self`.
    
    I find the distinction useful. The former case is much more common, and
    avoids a bunch of `mut` and `&mut` occurrences. We can also restrict the
    latter with `pub(crate)` which is nice.
    nnethercote committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    7045cad View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2023

  1. Configuration menu
    Copy the full SHA
    c7992af View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7738d69 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cce3961 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ef315b3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ca2472e View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2023

  1. Plumb awaitness of for loops

    eholk committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    0315daa View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2023

  1. Configuration menu
    Copy the full SHA
    df30a7a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    60419aa View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2023

  1. Auto merge of #119163 - fmease:refactor-ast-trait-bound-modifiers, r=…

    …compiler-errors
    
    Refactor AST trait bound modifiers
    
    Instead of having two types to represent trait bound modifiers in the parser / the AST (`parser::ty::BoundModifiers` & `ast::TraitBoundModifier`), only to map one to the other later, just use `parser::ty::BoundModifiers` (moved & renamed to `ast::TraitBoundModifiers`).
    
    The struct type is more extensible and easier to deal with (see [here](https://github.com/rust-lang/rust/pull/119099/files#r1430749981) and [here](https://github.com/rust-lang/rust/pull/119099/files#r1430752116) for context) since it more closely models what it represents: A compound of two kinds of modifiers, constness and polarity. Modeling this as an enum (the now removed `ast::TraitBoundModifier`) meant one had to add a new variant per *combination* of modifier kind, which simply isn't scalable and which lead to a lot of explicit non-DRY matches.
    
    NB: `hir::TraitBoundModifier` being an enum is fine since HIR doesn't need to worry representing invalid modifier kind combinations as those get rejected during AST validation thereby immensely cutting down the number of possibilities.
    bors committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    5085bf5 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #118847 - eholk:for-await, r=compiler-errors

    Add support for `for await` loops
    
    This adds support for `for await` loops. This includes parsing, desugaring in AST->HIR lowering, and adding some support functions to the library.
    
    Given a loop like:
    ```rust
    for await i in iter {
        ...
    }
    ```
    this is desugared to something like:
    ```rust
    let mut iter = iter.into_async_iter();
    while let Some(i) = loop {
        match core::pin::Pin::new(&mut iter).poll_next(cx) {
            Poll::Ready(i) => break i,
            Poll::Pending => yield,
        }
    } {
        ...
    }
    ```
    
    This PR also adds a basic `IntoAsyncIterator` trait. This is partly for symmetry with the way `Iterator` and `IntoIterator` work. The other reason is that for async iterators it's helpful to have a place apart from the data structure being iterated over to store state. `IntoAsyncIterator` gives us a good place to do this.
    
    I've gated this feature behind `async_for_loop` and opened #118898 as the feature tracking issue.
    
    r? `@compiler-errors`
    bors committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    b29b02c View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2023

  1. Improve some names.

    Lots of vectors of messages called `message` or `msg`. This commit
    pluralizes them.
    
    Note that `emit_message_default` and `emit_messages_default` both
    already existed, and both process a vector, so I renamed the former
    `emit_messages_default_inner` because it's called by the latter.
    nnethercote committed Dec 23, 2023
    Configuration menu
    Copy the full SHA
    101bc22 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d9ea102 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of #119231 - aDotInTheVoid:PatKind-struct-bool-docs, r=c…

    …ompiler-errors
    
    Clairify `ast::PatKind::Struct` presese of `..` by using an enum instead of a bool
    
    The bool is mainly used for when a `..` is present, but it is also set on recovery to avoid errors. The doc comment not describes both of these cases.
    
    See https://github.com/rust-lang/rust/blob/cee794ee98d49b45a55ba225680d98e0c4672736/compiler/rustc_parse/src/parser/pat.rs#L890-L897 for the only place this is constructed.
    
    r? ``@compiler-errors``
    matthiaskrgr authored Dec 23, 2023
    Configuration menu
    Copy the full SHA
    f002221 View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2023

  1. Bump Update itertools to 0.11.

    ytmimi committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    fd78575 View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/master' into subtree_sync_with_1…

    ….77.0_nightly_2023_12_27
    ytmimi committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    6cc513f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    621904f View commit details
    Browse the repository at this point in the history