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

Closed
wants to merge 43 commits into from

Commits on Sep 6, 2021

  1. Configuration menu
    Copy the full SHA
    3caf0bc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ebf1252 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2021

  1. remap-cwd-prefix

    danakj committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    ce35f8e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2a687de View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2021

  1. Configuration menu
    Copy the full SHA
    2691a39 View commit details
    Browse the repository at this point in the history
  2. Revert "Add test for pretty printing anonymous types"

    This reverts commit d59b1f1.
    pnkfelix committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    2041fb1 View commit details
    Browse the repository at this point in the history
  3. Revert "Fix ast expanded printing for anonymous types"

    This reverts commit 5b4bc05.
    pnkfelix committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    5560f6d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f38ec9c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b6aa7e3 View commit details
    Browse the repository at this point in the history
  6. Revert "Implement Anonymous{Struct, Union} in the AST"

    This reverts commit 059b68d.
    
    Note that this was manually adjusted to retain some of the refactoring
    introduced by commit 059b68d, so that it could
    likewise retain the correction introduced in commit
    5b4bc05
    pnkfelix committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    91feb76 View commit details
    Browse the repository at this point in the history
  7. Re-add 71a7f8f post-revert.

    pnkfelix committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    f26f1ed View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    35370a7 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2021

  1. Configuration menu
    Copy the full SHA
    5dab3c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5c2412 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d98892b View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2021

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

Commits on Sep 13, 2021

  1. Configuration menu
    Copy the full SHA
    8be729c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7d8d7a0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8d879aa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1c4873c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7965a9f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9a3b1cf View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1053a5b View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2021

  1. Tokenize emoji as if they were valid indentifiers

    In the lexer, consider emojis to be valid identifiers and reject
    them later to avoid knock down parse errors.
    estebank committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    ae2cda6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f61ae01 View commit details
    Browse the repository at this point in the history
  3. Fix RustDoc

    estebank committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    8b65c79 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b43ac6e View commit details
    Browse the repository at this point in the history
  5. fix fmt

    estebank committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    411d643 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4c71eec View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3750cc6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    109ebdf View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    76713c9 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    30f9807 View commit details
    Browse the repository at this point in the history
  11. Remove implementation of min_align_of intrinsic

    Since 88839 `min_align_of` is lowered to AlignOf operator.
    tmiasko committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    f9b8191 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#87320 - danakj:debug-compilation-dir, r=mic…

    …haelwoerister
    
    Introduce -Z remap-cwd-prefix switch
    
    This switch remaps any absolute paths rooted under the current
    working directory to a new value. This includes remapping the
    debug info in `DW_AT_comp_dir` and `DW_AT_decl_file`.
    
    Importantly, this flag does not require passing the current working
    directory to the compiler, such that the command line can be
    run on any machine (with the same input files) and produce the
    same results. This is critical property for debugging compiler
    issues that crop up on remote machines.
    
    This is based on adetaylor's rust-lang@dbc4ae7
    
    Major Change Proposal: rust-lang/compiler-team#450
    Discussed on rust-lang#38322. Would resolve issue rust-lang#87325.
    Manishearth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    8580e54 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#88619 - GuillaumeGomez:simplify-std-os-reex…

    …ports, r=Amanieu
    
    Remove `cfg(doc)` from std::os module reexports to fix rustdoc linking issues
    
    Fixes rust-lang#88304.
    
    I tested it based on rust-lang#88292.
    
    Not sure if it's the best approach, but at least it makes thing a bit simpler.
    
    cc ``@jyn514``
    Manishearth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    8be84a9 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#88690 - m-ou-se:macro-braces-dot-question-e…

    …xpr-parse, r=nagisa
    
    Accept `m!{ .. }.method()` and `m!{ .. }?` statements.
    
    This PR fixes something that I keep running into when using `quote!{}.into()` in a proc macro to convert the `proc_macro2::TokenStream` to a `proc_macro::TokenStream`:
    
    Before:
    
    ```
    error: expected expression, found `.`
     --> src/lib.rs:6:6
      |
    4 |     quote! {
    5 |         ...
    6 |     }.into()
      |      ^ expected expression
    ```
    
    After:
    ```
    ```
    (No output, compiles fine.)
    
    ---
    
    Context:
    
    For expressions like `{ 1 }` and `if true { 1 } else { 2 }`, we accept them as full statements without a trailing `;`, which means the following is not accepted:
    
    ```rust
    { 1 } - 1 // error
    ```
    
    since that is parsed as two statements: `{ 1 }` and `-1`. Syntactically correct, but the type of `{ 1 }` should be `()` as there is no `;`.
    
    However, for specifically `.` and `?` after the `}`, we do [continue parsing it as an expression](https://github.com/rust-lang/rust/blob/13db8440bbbe42870bc828d4ec3e965b38670277/compiler/rustc_parse/src/parser/expr.rs#L864-L876):
    
    ```rust
    { "abc" }.len(); // ok
    ```
    
    For braced macro invocations, we do not do this:
    
    ```rust
    vec![1, 2, 3].len(); // ok
    vec!{1, 2, 3}.len(); // error
    ```
    
    (It parses `vec!{1, 2, 3}` as a full statement, and then complains about `.len()` not being a valid expression.)
    
    This PR changes this to also look for a `.` and `?` after a braced macro invocation. We can be sure the macro is an expression and not a full statement in those cases, since no statement can start with a `.` or `?`.
    Manishearth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    d8d2681 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#88775 - pnkfelix:revert-anon-union-parsing,…

    … r=davidtwco
    
    Revert anon union parsing
    
    Revert PR rust-lang#84571 and rust-lang#85515, which implemented anonymous union parsing in a manner that broke the context-sensitivity for the `union` keyword and thus broke stable Rust code.
    
    Fix rust-lang#88583.
    Manishearth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    8417ac5 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#88781 - estebank:emoji-idents, r=oli-obk

    Tokenize emoji as if they were valid identifiers
    
    In the lexer, consider emojis to be valid identifiers and reject
    them later to avoid knock down parse errors.
    
    Partially address rust-lang#86102.
    Manishearth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    46373af View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#88841 - notriddle:notriddle/method-parens, …

    …r=estebank
    
    feat(rustc_typeck): suggest removing bad parens in `(recv.method)()`
    
    Fixes rust-lang#88803
    Manishearth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    6e041ee View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#88892 - estebank:trait-objects, r=petrochenkov

    Move object safety suggestions to the end of the error
    Manishearth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    7195c8d View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#88915 - joshlf:patch-4, r=kennytm

    `Wrapping<T>` has the same layout and ABI as `T`
    Manishearth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    0c3a7d0 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#88933 - tmiasko:remove-min-align-of, r=oli-obk

    Remove implementation of `min_align_of` intrinsic
    
    Since rust-lang#88839 `min_align_of` is lowered to AlignOf operator.
    Manishearth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    d675005 View commit details
    Browse the repository at this point in the history