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

librustc_middle: Rename upvar_list to closure_captures #3

Closed
wants to merge 527 commits into from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on May 19, 2020

  1. update select docs

    lcnr committed May 19, 2020
    Configuration menu
    Copy the full SHA
    aab144f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f7c5a8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b6975bf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    25930e4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3188ca7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ff2940a View commit details
    Browse the repository at this point in the history
  7. add tests for enum discriminants

    lcnr committed May 19, 2020
    Configuration menu
    Copy the full SHA
    d6cb540 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    08b9b97 View commit details
    Browse the repository at this point in the history
  9. Assert doc wording

    kornelski committed May 19, 2020
    Configuration menu
    Copy the full SHA
    5b65c0f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    56c494a View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#71886 - t-rapp:tr-saturating-funcs, r=dtolnay

    Stabilize saturating_abs and saturating_neg
    
    Stabilizes the following signed integer functions with saturation mechanics:
     * saturating_abs()
     * saturating_neg()
    
    Closes rust-lang#59983
    Dylan-DPC authored May 19, 2020
    Configuration menu
    Copy the full SHA
    4c48f5a View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#72066 - lcnr:const-type-info-err, r=varkor

    correctly handle uninferred consts
    
    fixes the ICE mentioned in rust-lang#70507 (comment)
    
    I originally tried to generalize `need_type_info_err` to also work with consts which was not as much fun as I hoped 😅
    
    It might be easier to have some duplication here and handle consts separately.
    
    r? @varkor
    Dylan-DPC authored May 19, 2020
    Configuration menu
    Copy the full SHA
    12040cf View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#72068 - estebank:mut-deref-hack, r=oli-obk

    Ignore arguments when looking for `IndexMut` for subsequent `mut` obligation
    
    Given code like `v[&field].boo();` where `field: String` and
    `.boo(&mut self)`, typeck will have decided that `v` is accessed using
    `Index`, but when `boo` adds a new `mut` obligation,
    `convert_place_op_to_mutable` is called. When this happens, for *some
    reason* the arguments' dereference adjustments are completely ignored
    causing an error saying that `IndexMut` is not satisfied:
    
    ```
    error[E0596]: cannot borrow data in an index of `Indexable` as mutable
      --> src/main.rs:30:5
       |
    30 |     v[&field].boo();
       |     ^^^^^^^^^ cannot borrow as mutable
       |
       = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `Indexable`
    ```
    
    This is not true, but by changing `try_overloaded_place_op` to retry
    when given `Needs::MutPlace` without passing the argument types, the
    example successfully compiles.
    
    I believe there might be more appropriate ways to deal with this.
    
    Fix rust-lang#72002.
    Dylan-DPC authored May 19, 2020
    Configuration menu
    Copy the full SHA
    79ac73a View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#72338 - doctorn:trait-object-ice, r=ecstati…

    …c-morse
    
    Fix ICE in -Zsave-analysis
    
    Puts a short-circuit in to avoid an ICE in `-Zsave-analysis`.
    
    r? @ecstatic-morse
    
    Resolves rust-lang#72267
    Dylan-DPC authored May 19, 2020
    Configuration menu
    Copy the full SHA
    8178808 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#72344 - kornelski:assertdoc, r=Mark-Simulacrum

    Assert doc wording
    
    The current wording implies unsafe code is dependent on assert:
    
    https://users.rust-lang.org/t/are-assert-statements-included-in-unsafe-blocks/42865
    Dylan-DPC authored May 19, 2020
    Configuration menu
    Copy the full SHA
    745ca2a View commit details
    Browse the repository at this point in the history
  16. Auto merge of rust-lang#72346 - Dylan-DPC:rollup-vp418xs, r=Dylan-DPC

    Rollup of 5 pull requests
    
    Successful merges:
    
     - rust-lang#71886 (Stabilize saturating_abs and saturating_neg)
     - rust-lang#72066 (correctly handle uninferred consts)
     - rust-lang#72068 (Ignore arguments when looking for `IndexMut` for subsequent `mut` obligation)
     - rust-lang#72338 (Fix ICE in -Zsave-analysis)
     - rust-lang#72344 (Assert doc wording)
    
    Failed merges:
    
    r? @ghost
    bors committed May 19, 2020
    Configuration menu
    Copy the full SHA
    42acd90 View commit details
    Browse the repository at this point in the history
  17. Make intra-link resolve links for both trait and impl items

    Tymoteusz Jankowski committed May 19, 2020
    Configuration menu
    Copy the full SHA
    fc4c9a6 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    ed84780 View commit details
    Browse the repository at this point in the history
  19. Auto merge of rust-lang#72227 - nnethercote:tiny-vecs-are-dumb, r=Ama…

    …nieu
    
    Tiny Vecs are dumb.
    
    Currently, if you repeatedly push to an empty vector, the capacity
    growth sequence is 0, 1, 2, 4, 8, 16, etc. This commit changes the
    relevant code (the "amortized" growth strategy) to skip 1 and 2, instead
    using 0, 4, 8, 16, etc. (You can still get a capacity of 1 or 2 using
    the "exact" growth strategy, e.g. via `reserve_exact()`.)
    
    This idea (along with the phrase "tiny Vecs are dumb") comes from the
    "doubling" growth strategy that was removed from `RawVec` in rust-lang#72013.
    That strategy was barely ever used -- only when a `VecDeque` was grown,
    oddly enough -- which is why it was removed in rust-lang#72013.
    
    (Fun fact: until just a few days ago, I thought the "doubling" strategy
    was used for repeated push case. In other words, this commit makes
    `Vec`s behave the way I always thought they behaved.)
    
    This change reduces the number of allocations done by rustc itself by
    10% or more. It speeds up rustc, and will also speed up any other Rust
    program that uses `Vec`s a lot.
    
    In theory, the change could increase memory usage, but in practice it
    doesn't. It would be an unusual program where very small `Vec`s having a
    capacity of 4 rather than 1 or 2 would make a difference. You'd need a
    *lot* of very small `Vec`s, and/or some very small `Vec`s with very
    large elements.
    
    r? @Amanieu
    bors committed May 19, 2020
    Configuration menu
    Copy the full SHA
    672b272 View commit details
    Browse the repository at this point in the history
  20. Make caveat more precise

    Nadrieril committed May 19, 2020
    Configuration menu
    Copy the full SHA
    d7e1d5f View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    1cfdc7e View commit details
    Browse the repository at this point in the history
  22. Auto merge of rust-lang#69171 - Amanieu:new-asm, r=nagisa,nikomatsakis

    Implement new asm! syntax from RFC 2850
    
    This PR implements the new `asm!` syntax proposed in rust-lang/rfcs#2850.
    
    # Design
    
    A large part of this PR revolves around taking an `asm!` macro invocation and plumbing it through all of the compiler layers down to LLVM codegen. Throughout the various stages, an `InlineAsm` generally consists of 3 components:
    
    - The template string, which is stored as an array of `InlineAsmTemplatePiece`. Each piece represents either a literal or a placeholder for an operand (just like format strings).
    ```rust
    pub enum InlineAsmTemplatePiece {
        String(String),
        Placeholder { operand_idx: usize, modifier: Option<char>, span: Span },
    }
    ```
    
    - The list of operands to the `asm!` (`in`, `[late]out`, `in[late]out`, `sym`, `const`). These are represented differently at each stage of lowering, but follow a common pattern:
      - `in`, `out` and `inout` all have an associated register class (`reg`) or explicit register (`"eax"`).
      - `inout` has 2 forms: one with a single expression that is both read from and written to, and one with two separate expressions for the input and output parts.
      - `out` and `inout` have a `late` flag (`lateout` / `inlateout`) to indicate that the register allocator is allowed to reuse an input register for this output.
      - `out` and the split variant of `inout` allow `_` to be specified for an output, which means that the output is discarded. This is used to allocate scratch registers for assembly code.
      - `sym` is a bit special since it only accepts a path expression, which must point to a `static` or a `fn`.
    
    - The options set at the end of the `asm!` macro. The only one that is particularly of interest to rustc is `NORETURN` which makes `asm!` return `!` instead of `()`.
    ```rust
    bitflags::bitflags! {
        pub struct InlineAsmOptions: u8 {
            const PURE = 1 << 0;
            const NOMEM = 1 << 1;
            const READONLY = 1 << 2;
            const PRESERVES_FLAGS = 1 << 3;
            const NORETURN = 1 << 4;
            const NOSTACK = 1 << 5;
        }
    }
    ```
    
    ## AST
    
    `InlineAsm` is represented as an expression in the AST:
    
    ```rust
    pub struct InlineAsm {
        pub template: Vec<InlineAsmTemplatePiece>,
        pub operands: Vec<(InlineAsmOperand, Span)>,
        pub options: InlineAsmOptions,
    }
    
    pub enum InlineAsmRegOrRegClass {
        Reg(Symbol),
        RegClass(Symbol),
    }
    
    pub enum InlineAsmOperand {
        In {
            reg: InlineAsmRegOrRegClass,
            expr: P<Expr>,
        },
        Out {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            expr: Option<P<Expr>>,
        },
        InOut {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            expr: P<Expr>,
        },
        SplitInOut {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            in_expr: P<Expr>,
            out_expr: Option<P<Expr>>,
        },
        Const {
            expr: P<Expr>,
        },
        Sym {
            expr: P<Expr>,
        },
    }
    ```
    
    The `asm!` macro is implemented in librustc_builtin_macros and outputs an `InlineAsm` AST node. The template string is parsed using libfmt_macros, positional and named operands are resolved to explicit operand indicies. Since target information is not available to macro invocations, validation of the registers and register classes is deferred to AST lowering.
    
    ## HIR
    
    `InlineAsm` is represented as an expression in the HIR:
    
    ```rust
    pub struct InlineAsm<'hir> {
        pub template: &'hir [InlineAsmTemplatePiece],
        pub operands: &'hir [InlineAsmOperand<'hir>],
        pub options: InlineAsmOptions,
    }
    
    pub enum InlineAsmRegOrRegClass {
        Reg(InlineAsmReg),
        RegClass(InlineAsmRegClass),
    }
    
    pub enum InlineAsmOperand<'hir> {
        In {
            reg: InlineAsmRegOrRegClass,
            expr: Expr<'hir>,
        },
        Out {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            expr: Option<Expr<'hir>>,
        },
        InOut {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            expr: Expr<'hir>,
        },
        SplitInOut {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            in_expr: Expr<'hir>,
            out_expr: Option<Expr<'hir>>,
        },
        Const {
            expr: Expr<'hir>,
        },
        Sym {
            expr: Expr<'hir>,
        },
    }
    ```
    
    AST lowering is where `InlineAsmRegOrRegClass` is converted from `Symbol`s to an actual register or register class. If any modifiers are specified for a template string placeholder, these are validated against the set allowed for that operand type. Finally, explicit registers for inputs and outputs are checked for conflicts (same register used for different operands).
    
    ## Type checking
    
    Each register class has a whitelist of types that it may be used with. After the types of all operands have been determined, the `intrinsicck` pass will check that these types are in the whitelist. It also checks that split `inout` operands have compatible types and that `const` operands are integers or floats. Suggestions are emitted where needed if a template modifier should be used for an operand based on the type that was passed into it.
    
    ## HAIR
    
    `InlineAsm` is represented as an expression in the HAIR:
    
    ```rust
    crate enum ExprKind<'tcx> {
        // [..]
        InlineAsm {
            template: &'tcx [InlineAsmTemplatePiece],
            operands: Vec<InlineAsmOperand<'tcx>>,
            options: InlineAsmOptions,
        },
    }
    crate enum InlineAsmOperand<'tcx> {
        In {
            reg: InlineAsmRegOrRegClass,
            expr: ExprRef<'tcx>,
        },
        Out {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            expr: Option<ExprRef<'tcx>>,
        },
        InOut {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            expr: ExprRef<'tcx>,
        },
        SplitInOut {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            in_expr: ExprRef<'tcx>,
            out_expr: Option<ExprRef<'tcx>>,
        },
        Const {
            expr: ExprRef<'tcx>,
        },
        SymFn {
            expr: ExprRef<'tcx>,
        },
        SymStatic {
            expr: ExprRef<'tcx>,
        },
    }
    ```
    
    The only significant change compared to HIR is that `Sym` has been lowered to either a `SymFn` whose `expr` is a `Literal` ZST of the `fn`, or a `SymStatic` whose `expr` is a `StaticRef`.
    
    ## MIR
    
    `InlineAsm` is represented as a `Terminator` in the MIR:
    
    ```rust
    pub enum TerminatorKind<'tcx> {
        // [..]
    
        /// Block ends with an inline assembly block. This is a terminator since
        /// inline assembly is allowed to diverge.
        InlineAsm {
            /// The template for the inline assembly, with placeholders.
            template: &'tcx [InlineAsmTemplatePiece],
    
            /// The operands for the inline assembly, as `Operand`s or `Place`s.
            operands: Vec<InlineAsmOperand<'tcx>>,
    
            /// Miscellaneous options for the inline assembly.
            options: InlineAsmOptions,
    
            /// Destination block after the inline assembly returns, unless it is
            /// diverging (InlineAsmOptions::NORETURN).
            destination: Option<BasicBlock>,
        },
    }
    
    pub enum InlineAsmOperand<'tcx> {
        In {
            reg: InlineAsmRegOrRegClass,
            value: Operand<'tcx>,
        },
        Out {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            place: Option<Place<'tcx>>,
        },
        InOut {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            in_value: Operand<'tcx>,
            out_place: Option<Place<'tcx>>,
        },
        Const {
            value: Operand<'tcx>,
        },
        SymFn {
            value: Box<Constant<'tcx>>,
        },
        SymStatic {
            value: Box<Constant<'tcx>>,
        },
    }
    ```
    
    As part of HAIR lowering, `InOut` and `SplitInOut` operands are lowered to a split form with a separate `in_value` and `out_place`.
    
    Semantically, the `InlineAsm` terminator is similar to the `Call` terminator except that it has multiple output places where a `Call` only has a single return place output.
    
    The constant promotion pass is used to ensure that `const` operands are actually constants (using the same logic as `#[rustc_args_required_const]`).
    
    ## Codegen
    
    Operands are lowered one more time before being passed to LLVM codegen:
    
    ```rust
    pub enum InlineAsmOperandRef<'tcx, B: BackendTypes + ?Sized> {
        In {
            reg: InlineAsmRegOrRegClass,
            value: OperandRef<'tcx, B::Value>,
        },
        Out {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            place: Option<PlaceRef<'tcx, B::Value>>,
        },
        InOut {
            reg: InlineAsmRegOrRegClass,
            late: bool,
            in_value: OperandRef<'tcx, B::Value>,
            out_place: Option<PlaceRef<'tcx, B::Value>>,
        },
        Const {
            string: String,
        },
        SymFn {
            instance: Instance<'tcx>,
        },
        SymStatic {
            def_id: DefId,
        },
    }
    ```
    
    The operands are lowered to LLVM operands and constraint codes as follow:
    - `out` and the output part of `inout` operands are added first, as required by LLVM. Late output operands have a `=` prefix added to their constraint code, non-late output operands have a `=&` prefix added to their constraint code.
    - `in` operands are added normally.
    - `inout` operands are tied to the matching output operand.
    - `sym` operands are passed as function pointers or pointers, using the `"s"` constraint.
    - `const` operands are formatted to a string and directly inserted in the template string.
    
    The template string is converted to LLVM form:
    - `$` characters are escaped as `$$`.
    - `const` operands are converted to strings and inserted directly.
    - Placeholders are formatted as `${X:M}` where `X` is the operand index and `M` is the modifier character. Modifiers are converted from the Rust form to the LLVM form.
    
    The various options are converted to clobber constraints or LLVM attributes, refer to the [RFC](https://github.com/Amanieu/rfcs/blob/inline-asm/text/0000-inline-asm.md#mapping-to-llvm-ir) for more details.
    
    Note that LLVM is sometimes rather picky about what types it accepts for certain constraint codes so we sometimes need to insert conversions to/from a supported type. See the target-specific ISelLowering.cpp files in LLVM for details.
    
    # Adding support for new architectures
    
    Adding inline assembly support to an architecture is mostly a matter of defining the registers and register classes for that architecture. All the definitions for register classes are located in `src/librustc_target/asm/`.
    
    Additionally you will need to implement lowering of these register classes to LLVM constraint codes in `src/librustc_codegen_llvm/asm.rs`.
    bors committed May 19, 2020
    Configuration menu
    Copy the full SHA
    3a7dfda View commit details
    Browse the repository at this point in the history
  23. Remove dangling COPYRIGHT references

    Missed in 2a66355.
    tamird committed May 19, 2020
    Configuration menu
    Copy the full SHA
    2bf6833 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    84a4421 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    d190e10 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    46159b3 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    aaeea7f View commit details
    Browse the repository at this point in the history
  28. Remove unused dependencies

    jsgf committed May 19, 2020
    Configuration menu
    Copy the full SHA
    508e3f2 View commit details
    Browse the repository at this point in the history
  29. Break tokens before checking if they are 'probably equal'

    Fixes rust-lang#68489
    
    When checking two `TokenStreams` to see if they are 'probably equal',
    we ignore the `IsJoint` information associated with each `TokenTree`.
    However, the `IsJoint` information determines whether adjacent tokens
    will be 'glued' (if possible) when construction the `TokenStream` - e.g.
    `[Gt Gt]` can be 'glued' to `BinOp(Shr)`.
    
    Since we are ignoring the `IsJoint` information, 'glued' and 'unglued'
    tokens are equivalent for determining if two `TokenStreams` are
    'probably equal'. Therefore, we need to 'unglue' all tokens in the
    stream to avoid false negatives (which cause us to throw out the cached
    tokens, losing span information).
    Aaron1011 committed May 19, 2020
    Configuration menu
    Copy the full SHA
    9b2b8a5 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    fdc4522 View commit details
    Browse the repository at this point in the history
  31. Implement #[ffi_const] and #[ffi_pure] function attributes

    Introduce function attribute corresponding to the `const`/`pure`
    attributes supported by GCC, clang and other compilers.
    
    Based on the work of gnzlbg <gonzalobg88@gmail.com>.
    neocturne committed May 19, 2020
    Configuration menu
    Copy the full SHA
    abc2364 View commit details
    Browse the repository at this point in the history
  32. Add tests for #[ffi_const] and #[ffi_pure] function attributes

    Based on the work of gnzlbg <gonzalobg88@gmail.com>.
    neocturne committed May 19, 2020
    Configuration menu
    Copy the full SHA
    a7d7f0b View commit details
    Browse the repository at this point in the history
  33. Document #[ffi_const] and #[ffi_pure] function attributes in unst…

    …able book
    
    Based on the work of gnzlbg <gonzalobg88@gmail.com>.
    neocturne committed May 19, 2020
    Configuration menu
    Copy the full SHA
    a114a23 View commit details
    Browse the repository at this point in the history
  34. Use a fixed-point iteration when breaking tokens

    Some tokens need to be broken in a loop until we reach
    'unbreakable' tokens.
    Aaron1011 committed May 19, 2020
    Configuration menu
    Copy the full SHA
    4a8ccdc View commit details
    Browse the repository at this point in the history
  35. Adjust the zero check in RawVec::grow.

    This was supposed to land as part of rust-lang#72227. (I wish `git push` would
    abort when you have uncommited changes.)
    nnethercote committed May 19, 2020
    Configuration menu
    Copy the full SHA
    9eb0399 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2020

  1. Configuration menu
    Copy the full SHA
    daea09c View commit details
    Browse the repository at this point in the history
  2. Clean up generator live locals analysis

    Instead of using a bespoke dataflow analysis, `MaybeRequiresStorage`,
    for computing locals that need to be stored across yield points and that
    have conflicting storage, use a combination of simple, generally
    applicable dataflow analyses. In this case, the formula for locals
    that are live at a yield point is:
    
        live_across_yield := (live & init) | (!movable & borrowed)
    
    and the formula for locals that require storage (and thus may conflict
    with others) at a given point is:
    
        requires_storage := init | borrowed
    
    `init` is `MaybeInitializedLocals`, a direct equivalent of
    `MaybeInitializedPlaces` that works only on whole `Local`s. `borrowed`
    and `live` are the pre-existing `MaybeBorrowedLocals` and
    `MaybeLiveLocals` analyses respectively.
    ecstatic-morse committed May 20, 2020
    Configuration menu
    Copy the full SHA
    fc964c5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3508592 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    157631b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    90da274 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d8e0807 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    def207e View commit details
    Browse the repository at this point in the history
  8. Document assumptions made in generator transform for analyses

    The generator transform needs to inspect all possible dataflow states.
    This can be done with half the number of bitset union operations if we
    can assume that the relevant analyses do not use "before" effects.
    ecstatic-morse committed May 20, 2020
    Configuration menu
    Copy the full SHA
    dd49c6f View commit details
    Browse the repository at this point in the history
  9. Document why we don't look at storage liveness

    ...when determining what locals are live.
    
    A local cannot be borrowed before it is `storage_live` and
    `MaybeBorrowedLocals` already invalidates borrows on `StorageDead`.
    Likewise, a local cannot be initialized before it is marked StorageLive
    and is marked as uninitialized after `StorageDead`.
    ecstatic-morse committed May 20, 2020
    Configuration menu
    Copy the full SHA
    3ff9317 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    564ebbb View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#72339 - ehuss:update-cargo, r=ehuss

    Update cargo
    
    9 commits in cb06cb2696df2567ce06d1a39b1b40612a29f853..500b2bd01c958f5a33b6aa3f080bea015877b83c
    2020-05-08 21:57:44 +0000 to 2020-05-18 17:12:54 +0000
    - Handle LTO with an rlib/cdylib crate type (rust-lang/cargo#8254)
    - Gracefully handle errors during a build. (rust-lang/cargo#8247)
    - Update `im-rc` to 15.0.0 (rust-lang/cargo#8255)
    - Fix `cargo update` with unused patch. (rust-lang/cargo#8243)
    - Rephrased error message for disallowed sections in virtual workspace (rust-lang/cargo#8200)
    - Ignore broken console output in some situations. (rust-lang/cargo#8236)
    - Expand error message to explain that a string was found (rust-lang/cargo#8235)
    - Add context to some fs errors. (rust-lang/cargo#8232)
    - Move SipHasher to an isolated module. (rust-lang/cargo#8233)
    bors committed May 20, 2020
    Configuration menu
    Copy the full SHA
    692a26e View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#71769 - petrochenkov:crto, r=cuviper

    linker: More systematic handling of CRT objects
    
    Document which kinds of `crt0.o`-like objects we link and in which cases, discovering bugs in process.
    `src/librustc_target/spec/crt_objects.rs` is the place to start reading from.
    
    This PR also automatically contains half of the `-static-pie` support (rust-lang#70740), because that's one of the six cases that we need to consider when linking CRT objects.
    
    This is a breaking change for custom target specifications that specify CRT objects.
    
    Closes rust-lang#30868
    bors committed May 20, 2020
    Configuration menu
    Copy the full SHA
    64ad709 View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#71923 - csmoe:issue-70818, r=tmandry

    Check non-Send/Sync upvars captured by generator
    
    Closes rust-lang#70818
    r? @tmandry
    bors committed May 20, 2020
    Configuration menu
    Copy the full SHA
    f182c4a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e9ae64c View commit details
    Browse the repository at this point in the history
  15. FIX - Char documentation for unexperienced users

    Elrendio committed May 20, 2020
    Configuration menu
    Copy the full SHA
    f5b4957 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8ac1699 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#71863 - mibac138:self-import, r=estebank

    Suggest fixes and add error recovery for `use foo::self`
    
    Fixes rust-lang#63741.
    I have implemented 2 suggestions on how to fix a `use foo::self` import, however I feel like showing them both might be too verbose.
    
    Additionally, I have also implemented error recovery as [menitoned](rust-lang#63741 (comment)) by @comex.
    
    I believe r? @estebank deals with diagnostics.
    Dylan-DPC authored May 20, 2020
    Configuration menu
    Copy the full SHA
    14c4391 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#72139 - nnethercote:standalone-fold, r=cuviper

    Make `fold` standalone.
    
    `fold` is currently implemented via `try_fold`, but implementing it
    directly results in slightly less LLVM IR being generated, speeding up
    compilation of some benchmarks.
    
    r? @cuviper
    Dylan-DPC authored May 20, 2020
    Configuration menu
    Copy the full SHA
    5c52f9f View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#72275 - marmeladema:fix-issue-71104-2, r=ec…

    …static-morse
    
    Continue lowering for unsupported async generator instead of returning an error.
    
    This way the hir is "valid" and we can remove one more call to
    `opt_node_id_to_hir_id` but an error is still emitted.
    
    This is another partial fix for rust-lang#71104
    
    r? @eddyb
    Dylan-DPC authored May 20, 2020
    Configuration menu
    Copy the full SHA
    68fd4e0 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#72361 - golddranks:split_inclusive_add_trac…

    …king_issue, r=shepmaster
    
    split_inclusive: add tracking issue number (72360)
    
    Adds tracking issue number ( rust-lang#72360 ) to the unstable feature attributes.
    Dylan-DPC authored May 20, 2020
    Configuration menu
    Copy the full SHA
    2bfbc05 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#72364 - jsgf:remove-unused-deps, r=Mark-Sim…

    …ulacrum
    
    Remove unused dependencies
    
    Remove some unused dependencies found while while working on rust-lang#72342.
    Dylan-DPC authored May 20, 2020
    Configuration menu
    Copy the full SHA
    c93ddbf View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#72366 - nnethercote:tiny-vecs-are-dumb-foll…

    …owup, r=Amanieu
    
    Adjust the zero check in `RawVec::grow`.
    
    This was supposed to land as part of rust-lang#72227. (I wish `git push` would
    abort when you have uncommited changes.)
    
    r? @Amanieu
    Dylan-DPC authored May 20, 2020
    Configuration menu
    Copy the full SHA
    51f80b7 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    cad8fe9 View commit details
    Browse the repository at this point in the history
  24. make to_predicate take a tcx argument

    nikomatsakis authored and lcnr committed May 20, 2020
    Configuration menu
    Copy the full SHA
    034c25f View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    f316479 View commit details
    Browse the repository at this point in the history
  26. intern PredicateKind

    lcnr committed May 20, 2020
    Configuration menu
    Copy the full SHA
    57746f9 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    6544d7b View commit details
    Browse the repository at this point in the history
  28. ptr eq for Predicate

    lcnr committed May 20, 2020
    Configuration menu
    Copy the full SHA
    3dd830b View commit details
    Browse the repository at this point in the history
  29. Suggest installing VS Build Tools in more situations

    When MSVC's `link.exe` wasn't found but another `link.exe` was, the error message given can be impenetrable to many users. The usual suspect is GNU's `link` tool. In this case, inform the user that they may need to install VS build tools.
    
    This only applies when Microsoft's link tool is expected. Not `lld-link` or other MSVC compatible linkers.
    ChrisDenton committed May 20, 2020
    Configuration menu
    Copy the full SHA
    2fd504c View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    6778c7a View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    2d4d0db View commit details
    Browse the repository at this point in the history
  32. Auto merge of rust-lang#72384 - mati865:ci-fix, r=pietroalbini

    Workaround MSYS2/chocolatey issue again
    bors committed May 20, 2020
    Configuration menu
    Copy the full SHA
    8858a43 View commit details
    Browse the repository at this point in the history
  33. Update LLVM submodule

    nikic committed May 20, 2020
    Configuration menu
    Copy the full SHA
    9f12823 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    b2bf0cd View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    ed1297c View commit details
    Browse the repository at this point in the history
  36. Rename some types describing native libraries

    NativeLibrary(Kind) -> NativeLib(Kind)
    NativeStatic -> StaticBundle
    NativeStaticNobundle -> StaticNoBundle
    NativeFramework -> Framework
    NativeRawDylib -> RawDylib
    NativeUnknown -> Unspecified
    petrochenkov committed May 20, 2020
    Configuration menu
    Copy the full SHA
    ee7a35a View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    529d488 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    8dbe4d9 View commit details
    Browse the repository at this point in the history
  39. Auto merge of rust-lang#72378 - Dylan-DPC:rollup-m87bp2d, r=Dylan-DPC

    Rollup of 6 pull requests
    
    Successful merges:
    
     - rust-lang#71863 (Suggest fixes and add error recovery for `use foo::self`)
     - rust-lang#72139 (Make `fold` standalone.)
     - rust-lang#72275 (Continue lowering for unsupported async generator instead of returning an error.)
     - rust-lang#72361 (split_inclusive: add tracking issue number (72360))
     - rust-lang#72364 (Remove unused dependencies)
     - rust-lang#72366 (Adjust the zero check in `RawVec::grow`.)
    
    Failed merges:
    
    r? @ghost
    bors committed May 20, 2020
    Configuration menu
    Copy the full SHA
    0aa6751 View commit details
    Browse the repository at this point in the history
  40. Fix tests

    Aaron1011 committed May 20, 2020
    Configuration menu
    Copy the full SHA
    633293f View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    c7813ff View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    dc3de7c View commit details
    Browse the repository at this point in the history
  43. Auto merge of rust-lang#67759 - nikic:llvm-10, r=Mark-Simulacrum

    Update to LLVM 10
    
    LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;)
    
    Status:
    
     * Preparation split off into rust-lang#67900.
     * Optimization regressions:
       * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed.
       * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed.
       * [x] https://reviews.llvm.org/D72169 submitted.
       * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 submitted, but unlikely eligible for LLVM 10.
     * Compile-time regressions:
       * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](llvm/llvm-project@192cce1) the patch.
       * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14).
     * Assertion failures / infinite loops:
       * [x] https://bugs.llvm.org/show_bug.cgi?id=44600 => https://reviews.llvm.org/D73135, https://reviews.llvm.org/D73854 and https://reviews.llvm.org/D73908 have landed and been cherry-picked to the 10.x branch.
       * [x] https://bugs.llvm.org/show_bug.cgi?id=44835 => https://reviews.llvm.org/D74278 has landed and been cherry-picked.
    bors committed May 20, 2020
    Configuration menu
    Copy the full SHA
    82911b3 View commit details
    Browse the repository at this point in the history
  44. Move the target libLLVM to llvm-tools-preview

    For running the compiler, we usually only need LLVM from `$sysroot/lib`,
    which rustup will make available with `LD_LIBRARY_PATH`. We've also been
    shipping LLVM in the `$target/lib` directory, which bloats the download
    and installed size. The only times we do need the latter are for the
    RPATH of `llvm-tools-preview` binaries, and for linking `rustc-dev`
    libraries. We'll move it to the `llvm-tools-preview` component directly,
    and `rustc-dev` will have an implicit dependency on it.
    
    Here are the dist sizes that I got before and after this change:
    
        llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz     1.3M   24M
        llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz     748K   17M
        rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz          83M    61M
        rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz          56M    41M
    
    The installed size should reduce by exactly one `libLLVM.so` (~70-80M),
    unless you also install `llvm-tools`, and then it should be identical.
    cuviper committed May 20, 2020
    Configuration menu
    Copy the full SHA
    9c97b3c View commit details
    Browse the repository at this point in the history

Commits on May 21, 2020

  1. Comment flock usage on Linux

    nbdd0121 committed May 21, 2020
    Configuration menu
    Copy the full SHA
    a05acbf View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#70705 - lcnr:generic_discriminant, r=nikomats…

    …akis
    
    Use `T`'s discriminant type in `mem::Discriminant<T>` instead of `u64`.
    
    fixes rust-lang#70509
    
    Adds the lang-item `discriminant_kind`.
    Updates the function signature of `intrinsics::discriminant_value`.
    Adds the *probably permanently unstable* trait `DiscriminantKind`.
    `mem::Discriminant` should now be smaller in some cases.
    
    r? @ghost
    bors committed May 21, 2020
    Configuration menu
    Copy the full SHA
    963bf52 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f509862 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#72205 - ecstatic-morse:nrvo, r=oli-obk

    Dumb NRVO
    
    This is a very simple version of an NRVO pass, which scans backwards from the `return` terminator to see if there is an an assignment like `_0 = _1`. If a basic block with two or more predecessors is encountered during this scan without first seeing an assignment to the return place, we bail out. This avoids running a full "reaching definitions" dataflow analysis.
    
    I wanted to see how much `rustc` would benefit from even a very limited version of this optimization. We should be able to use this as a point of comparison for more advanced versions that are based on live ranges.
    
    r? @ghost
    bors committed May 21, 2020
    Configuration menu
    Copy the full SHA
    7f79e98 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    20b499c View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#71854 - eduardosm:assoc-char-funcs-and-cons…

    …ts, r=Amanieu
    
    Make `std::char` functions and constants associated to `char`.
    
    First step to fix rust-lang#71763.
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    25028ad View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#72111 - petrochenkov:docstrip, r=ehuss

    rustc-book: Document `-Z strip=val` option
    
    cc rust-lang#72110
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    e2c05d1 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#72272 - GuillaumeGomez:fix-back-on-page-wit…

    …h-search-behaviour, r=kinnison
    
    Fix going back in history to a search result page on firefox
    
    This bug was actually firefox not re-running JS script when you go back in history. To trigger it on the current docs:
    
     * Make a search
     * Pick an element (which isn't on the same page as the current element!)
     * Go back in history
    
    Instead of having the search results, you'll see the normal doc page. You can find a small explanation about it [here](http://web.archive.org/web/20100428053932/http://www.firefoxanswer.com/firefox/672-firefoxanswer.html).
    
    r? @kinnison
    
    cc @ollie27
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    e279bd5 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#72296 - ChrisDenton:msvc-link-check, r=petr…

    …ochenkov
    
    Suggest installing VS Build Tools in more situations
    
    When MSVC's `link.exe` wasn't found but another `link.exe` was, the error message given can be [impenetrable](https://pastebin.com/MRMCr7HM) to many users. The usual suspect is GNU's `link` tool. In this case, inform the user that they may need to install VS build tools.
    
    This only applies when Microsoft's link tool is expected.
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    85d712c View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#72365 - marmeladema:remove-node_to_hir_id, …

    …r=ecstatic-morse
    
    Remove unused `StableHashingContext::node_to_hir_id` method
    
    cc rust-lang#50928
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    4f9fe91 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#72371 - Elrendio:char_documentation, r=stev…

    …eklabnik
    
    FIX - Char documentation for unexperienced users
    
    This is my first PR on rust and even if I've read [CONTRIBUTING.md](https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#pull-requests) I'm ensure everything is perfect. Sorry if I didn't follow the exact procedure.
    
    **What it does:**
    - Add an example in the char documentation
    
    **Explanation**
    Unexperienced users might not know that punctuation is `Case_Ignorable` and not `Uppercase` and `Lowercase` which mean that when checking if a string is uppercase one might be tempted to write:
    ```rust
    my_string.chars().all(char::is_uppercase)
    ```
    
    However this will return false for `"HELLO WORLD"` which is not intuitive. Since the function `is_case_ignorable` doesn't exists I believe the correct way to check is:
    ```rust
    !my_string.chars().any(char::is_lowercase)
    ```
    
    The aim of this example is to prevent unexperienced users to make an error which punctuation chars.
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    0e88712 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#72397 - petrochenkov:tiny, r=Amanieu

    llvm: Expose tiny code model to users
    
    This model is relevant to embedded AArch64 targets and was added to LLVM relatively recently (https://reviews.llvm.org/D49673, mid 2018), so rustc frontend didn't provide access to it with `-C code-model`. The gcc analogue is [`-mcmodel=tiny`](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html).
    (This is one of the options that are passed directly to LLVM without being interpreted by rustc.)
    
    Follow up to rust-lang#72248.
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    e5a4550 View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#72422 - RalfJung:rollup-u81z4mw, r=RalfJung

    Rollup of 7 pull requests
    
    Successful merges:
    
     - rust-lang#71854 (Make `std::char` functions and constants associated to `char`.)
     - rust-lang#72111 (rustc-book: Document `-Z strip=val` option)
     - rust-lang#72272 (Fix going back in history to a search result page on firefox)
     - rust-lang#72296 (Suggest installing VS Build Tools in more situations)
     - rust-lang#72365 (Remove unused `StableHashingContext::node_to_hir_id` method)
     - rust-lang#72371 (FIX - Char documentation for unexperienced users)
     - rust-lang#72397 (llvm: Expose tiny code model to users)
    
    Failed merges:
    
    r? @ghost
    bors committed May 21, 2020
    Configuration menu
    Copy the full SHA
    06c9fef View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    94aa028 View commit details
    Browse the repository at this point in the history
  15. Auto merge of rust-lang#71718 - NeoRaider:ffi_const_pure, r=Amanieu

    Experimentally add `ffi_const` and `ffi_pure` extern fn attributes
    
    Add FFI function attributes corresponding to clang/gcc/... `const` and `pure`.
    
    Rebased version of rust-lang#58327 by @gnzlbg with the following changes:
    
    - Switched back from the `c_ffi_const` and `c_ffi_pure` naming to `ffi_const` and `ffi_pure`, as I agree with rust-lang#58327 (comment) and this nicely aligns with `ffi_returns_twice`
    - (Hopefully) took care of all of @hanna-kruppe's change requests in the original PR
    
    r? @hanna-kruppe
    bors committed May 21, 2020
    Configuration menu
    Copy the full SHA
    148c125 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    5728c53 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    3c5dba7 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    52359f7 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    13c86f2 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    25f575b View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    21f65ae View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    8ff6ffd View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    4c4cb46 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    f31e076 View commit details
    Browse the repository at this point in the history
  25. Improve documentation of slice::from_raw_parts

    This is to provide a more explicit statement against a code pattern that
    many people end up coming with, since the reason of it being unsound
    comes from the badly known single-allocation validity rule.
    
    Providing that very pattern as a counter-example could help mitigate that.
    
    Co-authored-by: Ralf Jung <post@ralfj.de>
    danielhenrymantilla and RalfJung committed May 21, 2020
    Configuration menu
    Copy the full SHA
    a81e9a7 View commit details
    Browse the repository at this point in the history
  26. Typo

    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    67e0755 View commit details
    Browse the repository at this point in the history
  27. Auto merge of rust-lang#71930 - Nadrieril:exhaustiveness-remove-tyerr…

    …, r=varkor
    
    De-abuse TyKind::Error in exhaustiveness checking
    
    Replaces rust-lang#71074. Context: rust-lang#70866.
    
    In order to remove the use of `TyKind::Error`, I had to make sure we skip over those fields whose inhabitedness should not be observed. This is potentially error-prone however, since we must be careful not to mix filtered and unfiltered lists of patterns. I managed to hide away most of the filtering behind a new `Fields` struct, that I used everywhere relevant. I quite like the result; I think the twin concepts of `Constructor` and `Fields` make a good mental model.
    
    As usual, I tried to separate commits that shuffle code around from commits that require more thought to review.
    
    cc @varkor @Centril
    bors committed May 21, 2020
    Configuration menu
    Copy the full SHA
    9310e3b View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    d0a48d1 View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#72055 - lcnr:predicate-kind, r=nikomatsakis

    Intern predicates
    
    Implements the first step of rust-lang/compiler-team#285
    
    Renames `ty::Predicate` to `ty::PredicateKind`, which is now interned.
    To ease the transition, `ty::Predicate` is now a struct containing a reference
    to `ty::PredicateKind`.
    
    r? @ghost
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    22438fc View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#72149 - estebank:icemation, r=eddyb

    Don't `type_of` on trait assoc ty without default
    
    Fix rust-lang#72076.
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    dc65fd4 View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#72347 - xliiv:72340-impl-for-default, r=Gui…

    …llaumeGomez
    
    Make intra-link resolve links for both trait and impl items
    
    Closes rust-lang#72340
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    3d5f130 View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#72350 - danielhenrymantilla:doc_warn_agains…

    …t_adjacent_slice_concat, r=RalfJung
    
    Improve documentation of `slice::from_raw_parts`
    
    This is to provide a more explicit statement against a code pattern that
    many people end up coming with, since the reason of it being unsound
    comes from the badly known single-allocation validity rule.
    
    Providing that very pattern as a counter-example could help mitigate that.
    
    See also: https://internals.rust-lang.org/t/pre-rfc-add-join-seq-method-to-slices-and-strs/11936/13
    
    r? @RalfJung
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    261505a View commit details
    Browse the repository at this point in the history
  33. Rollup merge of rust-lang#72382 - tmiasko:config-toml-debug-assertion…

    …s, r=nikomatsakis
    
    Show default values for debug-assertions & debug-assertions-std
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    503a2fd View commit details
    Browse the repository at this point in the history
  34. Rollup merge of rust-lang#72421 - GuillaumeGomez:fix-impl-hover-ancho…

    …r, r=kinnison
    
    Fix anchor display when hovering impl
    
    A little gif for the fixed behaviour:
    
    ![hover-anchor](https://user-images.githubusercontent.com/3050060/82549808-cfdf4080-9b5d-11ea-9495-2b1d90b2a791.gif)
    
    r? @kinnison
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    fc729d0 View commit details
    Browse the repository at this point in the history
  35. Rollup merge of rust-lang#72425 - RalfJung:discr-sign-ext, r=nikomats…

    …akis
    
    fix discriminant_value sign extension
    
    Fixes a regression introduced in rust-lang#70705
    r? @nikomatsakis Cc @lcnr @oli-obk
    RalfJung authored May 21, 2020
    Configuration menu
    Copy the full SHA
    74b5c50 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    93abdd7 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    4a10f6c View commit details
    Browse the repository at this point in the history
  38. Auto merge of rust-lang#72433 - RalfJung:rollup-srft8nx, r=RalfJung

    Rollup of 7 pull requests
    
    Successful merges:
    
     - rust-lang#72055 (Intern predicates)
     - rust-lang#72149 (Don't `type_of` on trait assoc ty without default)
     - rust-lang#72347 (Make intra-link resolve links for both trait and impl items)
     - rust-lang#72350 (Improve documentation of `slice::from_raw_parts`)
     - rust-lang#72382 (Show default values for debug-assertions & debug-assertions-std)
     - rust-lang#72421 (Fix anchor display when hovering impl)
     - rust-lang#72425 (fix discriminant_value sign extension)
    
    Failed merges:
    
    r? @ghost
    bors committed May 21, 2020
    Configuration menu
    Copy the full SHA
    d9417b3 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2020

  1. Configuration menu
    Copy the full SHA
    e9fed69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a4bf44 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#71956 - ecstatic-morse:remove-requires-storag…

    …e-analysis, r=tmandry
    
    Clean up logic around live locals in generator analysis
    
    Resolves rust-lang#69902. Requires rust-lang#71893.
    
    I've found it difficult to make changes in the logic around live locals in `generator/transform.rs`. It uses a custom dataflow analysis, `MaybeRequiresStorage`, that AFAICT computes whether a local is either initialized or borrowed. That analysis is using `before` effects, which we should try to avoid if possible because they are harder to reason about than ones only using the unprefixed effects. @pnkfelix has suggested removing "before" effects entirely to simplify the dataflow framework, which I might pursue someday.
    
    This PR replaces `MaybeRequiresStorage` with a combination of the existing `MaybeBorrowedLocals` and a new `MaybeInitializedLocals`. `MaybeInitializedLocals` is just `MaybeInitializedPlaces` with a coarser resolution: it works on whole locals instead of move paths. As a result, I was able to simplify the logic in `compute_storage_conflicts` and `locals_live_across_suspend_points`.
    
    This is not exactly equivalent to the old logic; some generators are now smaller than before. I believe this was because the old logic was too conservative, but I'm not as familiar with the constraints as the original implementers were, so I could be wrong. For example, I don't see a reason the size of the `mixed_sizes` future couldn't be 5K. It went from 7K to 6K in this PR.
    
    r? @jonas-schievink @tmandry
    bors committed May 22, 2020
    Configuration menu
    Copy the full SHA
    458a3e7 View commit details
    Browse the repository at this point in the history
  4. Add flag to open docs: x.py doc --open

    Tested with:
    
           # opens doc/index.html
        x.py doc --stage 0 --open
        x.py doc --stage 0 --open src/doc
    
           # opens doc/book/index.html
        x.py doc --stage 0 --open src/doc/book
    
           # opens doc/std/index.html
        x.py doc --stage 0 --open src/libstd
    
           # opens doc/proc_macro/index.html
        x.py doc --stage 0 --open src/libproc_macro
    
           # opens both
        x.py doc --stage 0 --open src/libstd src/libproc_macro
    dtolnay committed May 22, 2020
    Configuration menu
    Copy the full SHA
    6a3aae8 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#72000 - cuviper:dist-llvm, r=Mark-Simulacrum

    Move the target libLLVM to llvm-tools-preview
    
    For running the compiler, we usually only need LLVM from `$sysroot/lib`,
    which rustup will make available with `LD_LIBRARY_PATH`. We've also been
    shipping LLVM in the `$target/lib` directory, which bloats the download
    and installed size. The only times we do need the latter are for the
    RPATH of `llvm-tools-preview` binaries, and for linking `rustc-dev`
    libraries. We'll move it to the `llvm-tools-preview` component directly,
    and `rustc-dev` will have an implicit dependency on it.
    
    Here are the dist sizes that I got before and after this change:
    
        llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz     1.3M   24M
        llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz     748K   17M
        rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz          83M    61M
        rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz          56M    41M
    
    The installed size should reduce by exactly one `libLLVM.so` (~70-80M),
    unless you also install `llvm-tools`, and then it should be identical.
    
    Resolves rust-lang#70838.
    bors committed May 22, 2020
    Configuration menu
    Copy the full SHA
    c60b675 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    407958a View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#71607 - RalfJung:pin-drop-panic, r=nikomats…

    …akis
    
    clarify interaction of pin drop guarantee and panics
    
    Cc rust-lang/unsafe-code-guidelines#232
    @Diggsey would this have helped?
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    a819f42 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#72125 - tshepang:broken-link, r=nikomatsakis

    remove broken link
    
    Not sure why this is broken @Marwes
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    ee0c7d4 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#72133 - bdbai:master, r=joshtriplett

    Add target thumbv7a-uwp-windows-msvc
    
    Add target spec for thumbv7a-uwp-windows-msvc, so that libraries written in Rust will have a chance to run on ARM-based devices with Windows 10.
    
    So far I managed to create a proof-of-concept library for Universal Windows Platform apps to consume and it worked on a Windows Phone. However, building a standalone executable seemed troublesome due to `LLVM ERROR: target does not implement codeview register mapping` stuff (see also rust-lang#52659 (comment) ).
    
    Steps to test:
    1. Clone and build this version
    ```sh
    git clone https://github.com/bdbai/rust.git
    cd rust
    python x.py build -i --target thumbv7a-uwp-windows-msvc --stage 1 src/libstd
    rustup toolchain link arm-uwp-stage1 .\build\x86_64-pc-windows-msvc\stage1\
    ```
    2. Create a new library crate
    ```sh
    cargo new --lib arm-uwp-test
    cd arm-uwp-test
    ```
    3. Change `crate-type` in `Cargo.toml` to `staticlib`
    ```toml
    [lib]
    crate-type=["staticlib"]
    ```
    4. Replace the following code in `src/lib.rs`
    ```rust
    #[no_mangle]
    pub extern "system" fn call_rust() -> i32 {
        2333
    }
    ```
    5. Build the crate
    ```sh
    cargo +arm-uwp-stage1 build -v --target thumbv7a-uwp-windows-msvc
    ```
    6. `arm-uwp-test.lib` should appear in `target\thumbv7a-uwp-windows-msvc\debug`
    
    To consume this library:
    1. Make sure Visual Studio 2017 and Windows 10 SDK (10.0.17134 or above) are installed
    2. Create a new Blank App (C++/WinRT) in Visual Studio 2017 (Visual Studio 2019 cannot deploy UWP apps to Windows Phone)
    3. Go to Property Pages, and then Linker->Input->Additional Dependencies, add `arm-uwp-test.lib` produced just now
    4. Manually declare function prototypes in `MainPage.h`
    ```c++
    extern "C" {
        int call_rust();
    }
    ```
    5. Replace the `ClickHandler` part in `MainPage.cpp`
    ```c++
    myButton().Content(box_value(std::to_wstring(call_rust())));
    ```
    6. Build and deploy this app to an ARM device running Windows 10. The app should run and show `2333` when the button is clicked.
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    715f1e8 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#72304 - petrochenkov:sgxunwind, r=nikomatsa…

    …kis,jethrogb,dingelish
    
    rustc_target: Avoid an inappropriate use of `post_link_objects`
    
    It isn't supposed to be used for linking libraries.
    Also linking libunwind unconditionally (and not together with the `src/libunwind` crate) is suspicious.
    
    @jethrogb @VardhanThigle
    Could you verify that it works as expected?
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    0eba152 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#72309 - petrochenkov:linkunspec, r=matthewj…

    …asper
    
    Some renaming and minor refactoring for `NativeLibraryKind`
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    afbbb86 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#72438 - vertexclique:vcq/aarch64-tme-featur…

    …es, r=Amanieu
    
    Enable ARM TME (Transactional Memory Extensions)
    
    Enables ARM TME coming up with LLVM 10. Related ARM TME intrinsics are included by the merge of rust-lang#67900.
    
    Enables: rust-lang/stdarch#855
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    64beaff View commit details
    Browse the repository at this point in the history
  13. Rewrite Parser::collect_tokens

    The previous implementation did not work when called on an opening
    delimiter, or when called re-entrantly from the same `TokenCursor` stack
    depth.
    Aaron1011 committed May 22, 2020
    Configuration menu
    Copy the full SHA
    52bb09a View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#72458 - RalfJung:rollup-g1w1vws, r=RalfJung

    Rollup of 6 pull requests
    
    Successful merges:
    
     - rust-lang#71607 (clarify interaction of pin drop guarantee and panics)
     - rust-lang#72125 (remove broken link)
     - rust-lang#72133 (Add target thumbv7a-uwp-windows-msvc)
     - rust-lang#72304 (rustc_target: Avoid an inappropriate use of `post_link_objects`)
     - rust-lang#72309 (Some renaming and minor refactoring for `NativeLibraryKind`)
     - rust-lang#72438 (Enable ARM TME (Transactional Memory Extensions))
    
    Failed merges:
    
    r? @ghost
    bors committed May 22, 2020
    Configuration menu
    Copy the full SHA
    de6060b View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e776121 View commit details
    Browse the repository at this point in the history
  16. Add core::future::IntoFuture

    This patch adds `core::future::IntoFuture`. However unlike earlier PRs this patch does not integrate it into the `async/.await` lowering. That integration should be done in a follow-up PR.
    yoshuawuyts committed May 22, 2020
    Configuration menu
    Copy the full SHA
    9ff5020 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#71610 - divergentdave:InvalidUndefBytes-ran…

    …ge, r=RalfJung
    
    InvalidUndefBytes: Track size of undef region used
    
    This PR adds a size to `UndefinedBehaviorInfo::InvalidUndefBytes`, to keep track of how many undefined bytes in a row were accessed, and changes a few methods to pass this information through. This additional information will eventually be used in Miri to improve diagnostics for this UB error. See also rust-lang/miri#1354 for prior discussion.
    
    I expect Miri will break the next time its submodule is updated, due to this change to the `InvalidUndefBytes`. (The current commit for src/tools/miri predates rust-lang/miri#1354, and thus does not try to destructure the `InvalidUndefBytes` variant) I have a corresponding change prepared for that repository.
    
    r? @RalfJung
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    2059112 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#72161 - nbdd0121:master, r=cuviper

    Replace fcntl-based file lock with flock
    
    WSL1 does not support `fcntl`-based lock and will always report success,
    therefore creating a race condition when multiple rustc processes are
    modifying shared data such as `search-index.js`. WSL1 does however
    support `flock`.
    
    `flock` is supported by all unix-like platforms. The only caveat is that
    Linux 2.6.11 or earlier does not support `flock` on NFS mounts, but as
    the minimum supported Linux version is 2.6.18, it is not an issue.
    
    Fixes rust-lang#72157
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    a8018e2 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#72306 - Aaron1011:feature/turbo-spacing, r=…

    …petrochenkov
    
    Break tokens before checking if they are 'probably equal'
    
    Fixes rust-lang#68489
    Fixes rust-lang#70987
    
    When checking two `TokenStreams` to see if they are 'probably equal',
    we ignore the `IsJoint` information associated with each `TokenTree`.
    However, the `IsJoint` information determines whether adjacent tokens
    will be 'glued' (if possible) when construction the `TokenStream` - e.g.
    `[Gt Gt]` can be 'glued' to `BinOp(Shr)`.
    
    Since we are ignoring the `IsJoint` information, 'glued' and 'unglued'
    tokens are equivalent for determining if two `TokenStreams` are
    'probably equal'. Therefore, we need to 'unglue' all tokens in the
    stream to avoid false negatives (which cause us to throw out the cached
    tokens, losing span information).
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    62d4e9e View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#72325 - alexcrichton:ignore-linker-plugin-l…

    …to, r=nnethercote
    
    Always generated object code for `#![no_builtins]`
    
    This commit updates the code generation for `#![no_builtins]` to always
    produce object files instead of conditionally respecting
    `-Clinker-plugin-lto` and sometimes producing bitcode. This is intended
    to address rust-lang/cargo#8239.
    
    The issue at hand here is that Cargo has tried to get "smarter" about
    codegen in whole crate graph scenarios. When LTO is enabled it attempts
    to avoid codegen on as many crates as possible, opting to pass
    `-Clinker-plugin-lto` where it can to only generate bitcode. When this
    is combined with `-Zbuild-std`, however, it means that
    `compiler-builtins` only generates LLVM bitcode instead of object files.
    Rustc's own LTO passes then explicitly skip `compiler-builtins` (because
    it wouldn't work anyway) which means that LLVM bitcode gets sent to the
    linker, which chokes most of the time.
    
    The fix in this PR is to not actually respect `-Clinker-plugin-lto` for
    `#![no_builtins]` crates. These crates, even if slurped up by the linker
    rather than rustc, will not work with LTO. They define symbols which are
    only referenced as part of codegen, so LTO's aggressive internalization
    would trivially remove the symbols only to have the linker realize later
    that the symbol is undefined. Since pure-bitcode never makes sense for
    these libraries, the `-Clinker-plugin-lto` flag is silently ignored.
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    1119421 View commit details
    Browse the repository at this point in the history
  21. Auto merge of rust-lang#72460 - RalfJung:rollup-28fs06y, r=RalfJung

    Rollup of 4 pull requests
    
    Successful merges:
    
     - rust-lang#71610 (InvalidUndefBytes: Track size of undef region used)
     - rust-lang#72161 (Replace fcntl-based file lock with flock)
     - rust-lang#72306 (Break tokens before checking if they are 'probably equal')
     - rust-lang#72325 (Always generated object code for `#![no_builtins]`)
    
    Failed merges:
    
    r? @ghost
    bors committed May 22, 2020
    Configuration menu
    Copy the full SHA
    a9ca1ec View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    6e5cb37 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    985ebf2 View commit details
    Browse the repository at this point in the history
  24. Allow using Self:: in doc

    Tymoteusz Jankowski committed May 22, 2020
    Configuration menu
    Copy the full SHA
    fc0675b View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#71829 - kper:issue71136, r=matthewjasper

    Fix suggestion to borrow in struct
    
    The corresponding issue is rust-lang#71136.
    The compiler suggests that borrowing `the_foos` might solve the problem. This is obviously incorrect.
    ```
    struct Foo(u8);
    
    #[derive(Clone)]
    struct FooHolster {
        the_foos: Vec<Foo>,
    }
    ```
    
    I propose as fix to check if there is any colon in the span. However, there might a case where `my_method(B { a: 1, b : foo })` would be appropriate to show a suggestion for `&B ...`.  To fix that too, we can simply check if there is a bracket in the span. This is only possible because both spans are different.
    Issue's span: `the_foos: Vec<Foo>`
    other's span: `B { a : 1, b : foo }`
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    9c34481 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#72123 - jsgf:stabilize-arg0, r=sfackler

    Stabilize process_set_argv0 feature for Unix
    
    This stabilizes process_set_argv0 targeting 1.45.0. It has been
    useful in practice and seems useful as-is.
    
    The equivalent feature could be implemented for Windows, but as far as I
    know nobody has. That can be done separately.
    
    Tracking issue: rust-lang#66510
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    53d0046 View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#72235 - GuillaumeGomez:cleanup-E0590, r=Dyl…

    …an-DPC
    
    Clean up E0590 explanation
    
    r? @Dylan-DPC
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    02eb002 View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#72345 - GuillaumeGomez:cleanup-e0593, r=Dyl…

    …an-DPC
    
    Clean up E0593 explanation
    
    r? @Dylan-DPC
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    f7ed13b View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#72376 - wesleywiser:record_cgu_name, r=Mark…

    …-Simulacrum
    
    [self-profling] Record the cgu name when doing codegen for a module
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    a116e7b View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#72399 - Lucretiel:ipv4-display-fast, r=kennytm

    Add fast-path optimization for Ipv4Addr::fmt
    
    Don't use an intermediary buffer when writing an IPv4 address without any specific alignment options
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    37587af View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#72435 - petrochenkov:cratetypesopt, r=Mark-…

    …Simulacrum
    
    rustllvm: Fix warnings about unused function parameters
    
    And then perform corresponding cleanups on Rust side.
    
    Fixes rust-lang#72427
    RalfJung authored May 22, 2020
    Configuration menu
    Copy the full SHA
    e7503ca View commit details
    Browse the repository at this point in the history
  32. Allow rust-highfive to label issues it creates.

    Replace sets with lists.
    Elinvynia committed May 22, 2020
    Configuration menu
    Copy the full SHA
    dc4b9fd View commit details
    Browse the repository at this point in the history
  33. Auto merge of rust-lang#72464 - RalfJung:rollup-xhm7w7u, r=RalfJung

    Rollup of 7 pull requests
    
    Successful merges:
    
     - rust-lang#71829 (Fix suggestion to borrow in struct)
     - rust-lang#72123 (Stabilize process_set_argv0 feature for Unix)
     - rust-lang#72235 (Clean up E0590 explanation)
     - rust-lang#72345 (Clean up E0593 explanation)
     - rust-lang#72376 ([self-profling] Record the cgu name when doing codegen for a module)
     - rust-lang#72399 (Add fast-path optimization for Ipv4Addr::fmt)
     - rust-lang#72435 (rustllvm: Fix warnings about unused function parameters)
    
    Failed merges:
    
    r? @ghost
    bors committed May 22, 2020
    Configuration menu
    Copy the full SHA
    215f2d3 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    01630b2 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    33f90f2 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    187bfb3 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    c102312 View commit details
    Browse the repository at this point in the history
  38. Report error from opener in bootstrap

    On my machine, an error looks like:
    
        Finished release [optimized] target(s) in 0.29s
        Opening doc /git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html
        command 'xdg-open (internal)' did not execute successfully; exit code: 4
        command stderr:
        gio: file:///git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html: Error when getting information for file “/git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html”: No such file or directory
    
        Build completed successfully in 0:00:08
    dtolnay committed May 22, 2020
    Configuration menu
    Copy the full SHA
    07b1de4 View commit details
    Browse the repository at this point in the history
  39. Remove ReScope

    matthewjasper committed May 22, 2020
    Configuration menu
    Copy the full SHA
    7d73e4c View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    52d628f View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    3d8a073 View commit details
    Browse the repository at this point in the history
  42. Update tests

    matthewjasper committed May 22, 2020
    Configuration menu
    Copy the full SHA
    f9f3063 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    9754b3f View commit details
    Browse the repository at this point in the history
  44. Revert MSYS2 CI workaround

    mati865 committed May 22, 2020
    Configuration menu
    Copy the full SHA
    4b51627 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    7a4c186 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    2af0218 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    30c00fd View commit details
    Browse the repository at this point in the history
  48. Fix rebase fallout

    Aaron1011 committed May 22, 2020
    Configuration menu
    Copy the full SHA
    5685e4d View commit details
    Browse the repository at this point in the history
  49. Rollup merge of rust-lang#71289 - xliiv:70802-intra-self, r=Guillaume…

    …Gomez
    
    Allow using `Self::` in doc
    
    Closes rust-lang#70802
    Dylan-DPC authored May 22, 2020
    Configuration menu
    Copy the full SHA
    dd78839 View commit details
    Browse the repository at this point in the history
  50. Rollup merge of rust-lang#72375 - GuillaumeGomez:cleanup-e0599, r=Dyl…

    …an-DPC
    
    Improve E0599 explanation
    
    r? @Dylan-DPC
    Dylan-DPC authored May 22, 2020
    Configuration menu
    Copy the full SHA
    47f3c44 View commit details
    Browse the repository at this point in the history
  51. Rollup merge of rust-lang#72385 - spastorino:add-exclude-labels, r=Ma…

    …rk-Simulacrum
    
    Add some teams to prioritization exclude_labels
    
    r? @Mark-Simulacrum @LeSeulArtichaut
    Dylan-DPC authored May 22, 2020
    Configuration menu
    Copy the full SHA
    84fbbde View commit details
    Browse the repository at this point in the history
  52. Rollup merge of rust-lang#72395 - Elinvynia:highfive, r=Mark-Simulacrum

    Allow rust-highfive to label issues it creates.
    
    This is my first meaningful PR, I am unsure how to test this code so any pointers would be welcome!
    
    I am about 50% sure it works.
    Dylan-DPC authored May 22, 2020
    Configuration menu
    Copy the full SHA
    01adfe1 View commit details
    Browse the repository at this point in the history
  53. Rollup merge of rust-lang#72453 - dtolnay:open, r=Mark-Simulacrum

    Add flag to open docs:  x.py doc --open
    
    This aligns with Cargo's flag `cargo doc --open`.
    
    Tested with:
    
    ```bash
       # opens doc/index.html
    x.py doc --stage 0 --open
    x.py doc --stage 0 --open src/doc
    
       # opens doc/book/index.html
    x.py doc --stage 0 --open src/doc/book
    
       # opens doc/std/index.html
    x.py doc --stage 0 --open src/libstd
    
       # opens doc/proc_macro/index.html
    x.py doc --stage 0 --open src/libproc_macro
    
       # opens both
    x.py doc --stage 0 --open src/libstd src/libproc_macro
    ```
    Dylan-DPC authored May 22, 2020
    Configuration menu
    Copy the full SHA
    3083ce7 View commit details
    Browse the repository at this point in the history
  54. Rollup merge of rust-lang#72459 - yoshuawuyts:into-future, r=nikomats…

    …akis
    
    Add core::future::IntoFuture
    
    This patch reintroduces the `core::future::IntoFuture` trait. However unlike earlier PRs this patch does not integrate it into the `async/.await` lowering since that lead to performance regressions. By introducing the trait separately from the integration, the integration PR can be more narrowly scoped, and people can start trying out the `IntoFuture` trait today. Thanks heaps!
    
    cc/ @rust-lang/wg-async-foundations
    
    ## References
    - Original PR adding `IntoFuture` rust-lang#65244
    - Open issue to re-land `IntoFuture` (assigned to me) rust-lang#67982
    - Tracking issue for `IntoFuture` rust-lang#67644
    Dylan-DPC authored May 22, 2020
    Configuration menu
    Copy the full SHA
    141ce5f View commit details
    Browse the repository at this point in the history
  55. Rollup merge of rust-lang#72461 - GuillaumeGomez:cleanup-e0600, r=Dyl…

    …an-DPC
    
    Clean up E0600 explanation
    
    r? @Dylan-DPC
    Dylan-DPC authored May 22, 2020
    Configuration menu
    Copy the full SHA
    bf1b998 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    9f82785 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    c282c1c View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    f17e2c9 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    307153e View commit details
    Browse the repository at this point in the history
  60. Preserve substitutions when trying to prove trait obligation

    `mk_obligation_for_def_id` is only correct if the trait and self type do
    not have any substitutions. Use a different method,
    `mk_trait_obligation_with_new_self_ty` that is more clear about what is
    happening.
    ecstatic-morse committed May 22, 2020
    Configuration menu
    Copy the full SHA
    730c6f3 View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    8ea828b View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    4d9e9c6 View commit details
    Browse the repository at this point in the history
  63. Ensure that new_self_ty has no escaping bound vars

    Otherwise inserting it to the `Binder` used by `trait_ref` would cause
    problems. This is just to be extra carefult: we aren't going to
    start recommending that the user start using HKTs anytime soon.
    ecstatic-morse committed May 22, 2020
    Configuration menu
    Copy the full SHA
    d2bacb1 View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    7278e29 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    f99519b View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    1fad3b7 View commit details
    Browse the repository at this point in the history
  67. Remove macro_defs map

    We store store the `DefId` directly in `ExpnData`. This will allow us to
    serialize `ExpnData` in PR rust-lang#72121 without needing to manage a side
    table.
    Aaron1011 committed May 22, 2020
    Configuration menu
    Copy the full SHA
    d277904 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2020

  1. Auto merge of rust-lang#72256 - ecstatic-morse:once-cell, r=Mark-Simu…

    …lacrum
    
    Use `once_cell` crate instead of custom data structure
    
    Internally, we use the [`Once`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/sync/struct.Once.html) type for shared data that is initialized exactly once and only read from afterwards. `Once` uses a `parking_lot::Mutex` when the parallel compiler is enabled and a `RefCell` when it is not. This PR switches to the [`once_cell`](https://crates.io/crates/once_cell) crate, which also uses a `parking_lot::Mutex` for its `sync` version (because we enable the `parking_lot` feature) but has zero overhead for its `unsync` one.
    
    This PR adds `once_cell` to the list of whitelisted dependencies. I think this is acceptable because it is already used in `rustc_driver`, is owned by a well-known community member (cc @matklad), and has a stable release. cc @rust-lang/compiler
    
    `once_cell` has a slightly more minimal API than `Once`, which allows for initialization to be either optimistic (evaluate the initializer and then synchronize) or pessimistic (synchronize and then evaluate the initializer). `once_cell`'s `get_or_init` is always pessimistic. The optimistic version is only used once in the current `master`.
    
    r? @Mark-Simulacrum
    bors committed May 23, 2020
    Configuration menu
    Copy the full SHA
    7f940ef View commit details
    Browse the repository at this point in the history
  2. Fix ice-72487

    nbdd0121 committed May 23, 2020
    Configuration menu
    Copy the full SHA
    e04baed View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#72478 - Dylan-DPC:rollup-vval8du, r=Dylan-DPC

    Rollup of 7 pull requests
    
    Successful merges:
    
     - rust-lang#71289 (Allow using `Self::` in doc)
     - rust-lang#72375 (Improve E0599 explanation)
     - rust-lang#72385 (Add some teams to prioritization exclude_labels)
     - rust-lang#72395 (Allow rust-highfive to label issues it creates.)
     - rust-lang#72453 (Add flag to open docs:  x.py doc --open)
     - rust-lang#72459 (Add core::future::IntoFuture)
     - rust-lang#72461 (Clean up E0600 explanation)
    
    Failed merges:
    
    r? @ghost
    bors committed May 23, 2020
    Configuration menu
    Copy the full SHA
    75b0a68 View commit details
    Browse the repository at this point in the history
  4. Add test for rust-lang#69415

    JohnTitor committed May 23, 2020
    Configuration menu
    Copy the full SHA
    58fe05a View commit details
    Browse the repository at this point in the history
  5. Add test for rust-lang#72455

    JohnTitor committed May 23, 2020
    Configuration menu
    Copy the full SHA
    47e35cb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    749d9e7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1c9b96b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    89aac16 View commit details
    Browse the repository at this point in the history
  9. bless mir-opt tests

    RalfJung committed May 23, 2020
    Configuration menu
    Copy the full SHA
    b388f96 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#72292 - ldm0:derefsteps, r=estebank

    Replace obligation construction with deref_steps()
    
    1. Use `probe()` to avoid unwanted binding committing during `deref_steps()`.
    2. Fixes rust-lang#59819 again by using `deref_steps()`, make the code cleaner. And if we want to suggest multiple dereferences (like: `consider dereferencing the borrow: "****a"`) in the future, this change will make it easier to achieve.
    Dylan-DPC authored May 23, 2020
    Configuration menu
    Copy the full SHA
    b24030f View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#72431 - RalfJung:ub-warning, r=shepmaster

    add warning sign to UB examples
    
    Just to make it less likely that people miss the fact that these are examples for how to *not* do it.
    Dylan-DPC authored May 23, 2020
    Configuration menu
    Copy the full SHA
    d5e3009 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#72446 - dtolnay:ord, r=petrochenkov

    Impl Ord for proc_macro::LineColumn
    
    ```rust
    impl Ord for LineColumn {...}
    impl PartialOrd for LineColumn {...}
    ```
    
    for https://doc.rust-lang.org/nightly/proc_macro/struct.LineColumn.html.
    
    The ordering is the natural one you would get by writing one line after another, where we compare line first, then compare columns within the same line.
    Dylan-DPC authored May 23, 2020
    Configuration menu
    Copy the full SHA
    67759b7 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e91897d View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#72496 - shepmaster:typo, r=Dylan-DPC

    Correct small typo: 'not' -> 'note'
    Dylan-DPC authored May 23, 2020
    Configuration menu
    Copy the full SHA
    a03bf3f View commit details
    Browse the repository at this point in the history
  15. Auto merge of rust-lang#72504 - Dylan-DPC:rollup-6wi1ifz, r=Dylan-DPC

    Rollup of 5 pull requests
    
    Successful merges:
    
     - rust-lang#72292 (Replace obligation construction with deref_steps())
     - rust-lang#72431 (add warning sign to UB examples)
     - rust-lang#72446 (Impl Ord for proc_macro::LineColumn)
     - rust-lang#72492 (Add some regression tests)
     - rust-lang#72496 (Correct small typo: 'not' -> 'note')
    
    Failed merges:
    
    r? @ghost
    bors committed May 23, 2020
    Configuration menu
    Copy the full SHA
    8970e8b View commit details
    Browse the repository at this point in the history
  16. Add missing ASM arena declaration to librustc_middle

    Fixes rust-lang#72386
    
    This type also needs to get allocated on the `librustc_middle` arena
    when we deserialize MIR.
    Aaron1011 committed May 23, 2020
    Configuration menu
    Copy the full SHA
    8da4942 View commit details
    Browse the repository at this point in the history
  17. Auto merge of rust-lang#72474 - mati865:ci-fix, r=pietroalbini

    Revert MSYS2 CI workaround
    
    MSYS2 has made workaround for critical packages so older installers like one used by chocolatey can work again.
    Fixes rust-lang#72333
    bors committed May 23, 2020
    Configuration menu
    Copy the full SHA
    4774f9b View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#71618 - ecstatic-morse:issue-71394, r=nikom…

    …atsakis
    
    Preserve substitutions when making trait obligations for suggestions
    
    Resolves rust-lang#71394.
    
    I *think* `map_bound_ref` is correct here. In any case, I think a lot of the diagnostic code is using `skip_binder` more aggressively than it should be, so I doubt that this is worse than the status quo. The assertion that `new_self_ty` has no escaping bound vars should be enough.
    
    r? @estebank
    
    cc @nikomatsakis Is the call to `skip_binder` on line 551 (and elsewhere in this file) appropriate? https://github.com/rust-lang/rust/blob/46ec74e60f238f694b46c976d6217e7cf8d4cf1a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs#L537-L565
    Dylan-DPC authored May 23, 2020
    Configuration menu
    Copy the full SHA
    ff48fc9 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#72092 - workingjubilee:patch-2, r=Guillaume…

    …Gomez
    
    Unblock font loading in rustdoc.css
    
    rustdoc's font loading defaults to "auto", so browsers may block render.
    But rustdoc's case prefers a faster TTI for scrolling, this means the
    strictest font-display in use should be "swap". rustdoc's fonts do provide
    notable legibility improvements but first-time users will have little trouble
    reading without. This means "optional" is preferred.
    
    The one exception is Source Serif Pro: it's a big difference for body text, so
    "fallback" is preferred over "optional" to cause a (tiny) block.
    
    This follows up on (but does not resolve) rust-lang#20962, taking PageSpeed Insight's rec fairly directly. Supporting reading material: https://drafts.csswg.org/css-fonts-4/#font-display-desc
    Dylan-DPC authored May 23, 2020
    Configuration menu
    Copy the full SHA
    238a0ce View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#72400 - Aaron1011:fix/asm-incr-ice, r=Amanieu

    Add missing ASM arena declarations to librustc_middle
    
    Fixes rust-lang#72386
    
    These types also need to get allocated on the `librustc_middle` arena
    when we deserialize MIR.
    
    @Amanieu: If we end up using your approach in rust-lang#72392 instead, feel free to copy the test I added over to your PR.
    Dylan-DPC authored May 23, 2020
    Configuration menu
    Copy the full SHA
    3948e60 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    ee92ddf View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#72502 - RalfJung:generator-discr-ty, r=jona…

    …s-schievink
    
    fix discriminant type in generator transform
    
    The generator transform assumed that the discriminant type is always `isize`, which is not correct, leading to [ICEs in Miri](https://github.com/rust-lang/rust/pull/72419/files#r429543536) when some extra sanity checking got enabled.
    
    r? @jonas-schievink @eddyb
    Dylan-DPC authored May 23, 2020
    Configuration menu
    Copy the full SHA
    1e79144 View commit details
    Browse the repository at this point in the history
  23. small select cleanup

    lcnr committed May 23, 2020
    Configuration menu
    Copy the full SHA
    82b4fc4 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    fbc6f2c View commit details
    Browse the repository at this point in the history

Commits on May 24, 2020

  1. Auto merge of rust-lang#72516 - Dylan-DPC:rollup-cc4w96z, r=Dylan-DPC

    Rollup of 5 pull requests
    
    Successful merges:
    
     - rust-lang#71618 (Preserve substitutions when making trait obligations for suggestions)
     - rust-lang#72092 (Unblock font loading in rustdoc.css)
     - rust-lang#72400 (Add missing ASM arena declarations to librustc_middle)
     - rust-lang#72489 (Fix ice-72487)
     - rust-lang#72502 (fix discriminant type in generator transform)
    
    Failed merges:
    
    r? @ghost
    bors committed May 24, 2020
    Configuration menu
    Copy the full SHA
    3137f8e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2359299 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#72362 - matthewjasper:remove-rescope, r=nikom…

    …atsakis
    
    Remove ReScope
    
    `ReScope` is unnecessary now that AST borrowck is gone and we're erasing the results of region inference in function bodies. This removes about as much of the old regionck code as possible without having to enable NLL fully.
    
    cc rust-lang#68261
    
    r? @nikomatsakis
    bors committed May 24, 2020
    Configuration menu
    Copy the full SHA
    52b605c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#72388 - Aaron1011:fix/deep-tokenstream-equa…

    …lity, r=petrochenkov
    
    Recursively expand `TokenKind::Interpolated` in `probably_equal_for_proc_macro`
    
    Fixes rust-lang#68430
    
    When comparing the captured and re-parsed `TokenStream` for a `TokenKind::Interpolated`, we currently treat any nested `TokenKind::Interpolated` tokens as unequal. If a `TokenKind::Interpolated` token shows up in the captured `TokenStream` due to a `macro_rules!` expansion, we will throw away the captured `TokenStream`, losing span information.
    
    This PR recursively invokes `nt_to_tokenstream` on nested `TokenKind::Interpolated` tokens, effectively flattening the stream into a sequence of non-interpolated tokens. This allows it to compare equal with the re-parsed stream, allowing us to keep the original captured `TokenStream` (with span information).
    
    This requires all of the `probably_equal_for_proc_macro` methods to be moved from `librustc_ast` to `librustc_parse` so that they can call `nt_to_tokenstream`.
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    fb848a6 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#72517 - lcnr:refactor-winnowing, r=jonas-sc…

    …hievink
    
    small select cleanup
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    6cb1c0e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b97ed1a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7a121ad View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#72524 - RalfJung:rollup-s9f1pcc, r=RalfJung

    Rollup of 2 pull requests
    
    Successful merges:
    
     - rust-lang#72388 (Recursively expand `TokenKind::Interpolated` in `probably_equal_for_proc_macro`)
     - rust-lang#72517 (small select cleanup)
    
    Failed merges:
    
    r? @ghost
    bors committed May 24, 2020
    Configuration menu
    Copy the full SHA
    7726070 View commit details
    Browse the repository at this point in the history
  9. Fix typo in doc comment.

    call_one_force -> call_once_force
    emosenkis authored May 24, 2020
    Configuration menu
    Copy the full SHA
    806f581 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#72284 - Aaron1011:feature/inline-macro-did,…

    … r=petrochenkov
    
    Remove `macro_defs` map
    
    We now store the `DefId` directly in `ExpnKind::Macro`. This will allow
    us to serialize `ExpnData` in PR rust-lang#72121 without needing to manage a side
    table.
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    94d96b1 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#72393 - Aaron1011:feature/rewrite-collect-t…

    …okens, r=petrochenkov
    
    Rewrite `Parser::collect_tokens`
    
    The previous implementation did not work when called on an opening
    delimiter, or when called re-entrantly from the same `TokenCursor` stack
    depth.
    
    I'm not sure how to test this apart from rust-lang#72287
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    8692c45 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#72528 - emosenkis:patch-1, r=dtolnay

    Fix typo in doc comment.
    
    call_one_force -> call_on**c**e_force
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    e2e3aac View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2220eb4 View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#72529 - RalfJung:rollup-ydthv90, r=RalfJung

    Rollup of 3 pull requests
    
    Successful merges:
    
     - rust-lang#72284 (Remove `macro_defs` map)
     - rust-lang#72393 (Rewrite `Parser::collect_tokens`)
     - rust-lang#72528 (Fix typo in doc comment.)
    
    Failed merges:
    
    r? @ghost
    bors committed May 24, 2020
    Configuration menu
    Copy the full SHA
    94fcccc View commit details
    Browse the repository at this point in the history
  15. Use dyn trait syntax in more comments and docs

    Probably missed it out during earlier `dyn` refactoring.
    ratijas authored May 24, 2020
    Configuration menu
    Copy the full SHA
    d1f4796 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    df2f9a4 View commit details
    Browse the repository at this point in the history
  17. Fix unsizing casts

    RalfJung committed May 24, 2020
    Configuration menu
    Copy the full SHA
    b9b1554 View commit details
    Browse the repository at this point in the history
  18. bump Miri

    RalfJung committed May 24, 2020
    Configuration menu
    Copy the full SHA
    9b87f40 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    be2fd61 View commit details
    Browse the repository at this point in the history
  20. Auto merge of rust-lang#72531 - RalfJung:miri-upd, r=RalfJung

    bump Miri
    
    Fixes rust-lang#72358
    r? @ghost Cc @rust-lang/miri
    bors committed May 24, 2020
    Configuration menu
    Copy the full SHA
    ff991d6 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#72402 - marmeladema:resolver-outputs-def-id…

    …, r=ecstatic-morse
    
    Remove all uses of `NodeId` in `ResolverOutputs`
    
    cc rust-lang#50928
    
    r? @ecstatic-morse
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    95c4583 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#72527 - RalfJung:miri-clippy-test-args, r=M…

    …ark-Simulacrum
    
    bootstrap: propagate test-args to miri and clippy test suites
    
    For Miri I verified this works. For clippy, unfortunately it doesn't seem to work as a stage 0 tool:
    ```
    ./x.py --stage 0 test src/tools/clippy --test-args init
    ```
    gives
    ```
       Compiling clippy-mini-macro-test v0.2.0 (/home/r/src/rust/rustc.3/src/tools/clippy/mini-macro)
    error[E0658]: procedural macros cannot be expanded to expressions
      --> src/tools/clippy/mini-macro/src/lib.rs:11:5
       |
    11 | /     quote!(
    12 | |         #[allow(unused)]
    13 | |         fn needless_take_by_value(s: String) {
    14 | |             println!("{}", s.len());
    ...  |
    24 | |         }
    25 | |     )
       | |_____^
       |
       = note: see issue rust-lang#54727 <rust-lang#54727> for more information
       = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
    
       Compiling proc-macro2 v1.0.3
       Compiling syn v1.0.11
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0658`.
    error: could not compile `clippy-mini-macro-test`.
    ```
    But propagating `--test-args` to the test suite seems to make sense regardless.
    Cc @rust-lang/clippy
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    a75068a View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#72530 - GuillaumeGomez:cleanup-e0602, r=Dyl…

    …an-DPC
    
    Clean up E0602 explanation
    
    r? @Dylan-DPC
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    cdeef96 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#72532 - ratijas:dyn-trait-object-doc, r=jon…

    …as-schievink
    
    Use `dyn` trait syntax in more comments and docs
    
    Probably missed it out during earlier dyn refactoring.
    
    033cbfe#diff-a0ba6bbf82d9ee83a4c9525873f85b04
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    67b4e2b View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#72535 - saschanaz:patch-1, r=jonas-schievink

    Use sort_unstable_by in its own docs
    
    Currently it uses `sort_by` instead of itself.
    RalfJung authored May 24, 2020
    Configuration menu
    Copy the full SHA
    134a165 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    7b98552 View commit details
    Browse the repository at this point in the history
  27. comment nit

    RalfJung committed May 24, 2020
    Configuration menu
    Copy the full SHA
    8b5ba4a View commit details
    Browse the repository at this point in the history
  28. librustc_middle: Rename upvars query to upvars_mentioned

    As part of supporting RFC 2229, we will be capturing all the Places that
    were mentioned in the closure.
    
    This commit modifies the name of the upvars query to upvars_mentioned.
    
    Co-authored-by: Aman Arora <me@aman-arora.com>
    Co-authored-by: Chris Pardy <chrispardy36@gmail.com>
    3 people committed May 24, 2020
    Configuration menu
    Copy the full SHA
    c3edb15 View commit details
    Browse the repository at this point in the history
  29. Auto merge of rust-lang#72539 - RalfJung:rollup-8yfidi8, r=RalfJung

    Rollup of 5 pull requests
    
    Successful merges:
    
     - rust-lang#72402 (Remove all uses of `NodeId` in `ResolverOutputs`)
     - rust-lang#72527 (bootstrap: propagate test-args to miri and clippy test suites)
     - rust-lang#72530 (Clean up E0602 explanation)
     - rust-lang#72532 (Use `dyn` trait syntax in more comments and docs)
     - rust-lang#72535 (Use sort_unstable_by in its own docs)
    
    Failed merges:
    
    r? @ghost
    bors committed May 24, 2020
    Configuration menu
    Copy the full SHA
    46e85b4 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    14382c6 View commit details
    Browse the repository at this point in the history
  31. Auto merge of rust-lang#72287 - Aaron1011:feature/min-token-collect, …

    …r=petrochenkov
    
    Store tokens inside `ast::Expr`
    
    This is a smaller version of rust-lang#70091.
    
    We now store captured tokens inside `ast::Expr`, which allows us to avoid some reparsing in `nt_to_tokenstream`. To try to mitigate the performance impact, we only collect tokens when we've seen an outer attribute.
    
    This makes progress towards solving rust-lang#43081. There are still many things left to do:
    
    * Collect tokens for other AST items.
    * Come up with a way to handle inner attributes (we need to be collecting tokens by the time we encounter them)
    * Avoid re-parsing when a `#[cfg]` attr is used.
    
    However, this is enough to fix spans for a simple example, which I've included as a test case.
    bors committed May 24, 2020
    Configuration menu
    Copy the full SHA
    62da38d View commit details
    Browse the repository at this point in the history
  32. First draft documenting Debug stability.

    Debug implementations of std types aren't stable, and neither are
    derived Debug implementations for any types, including user-defined
    types. This commit adds a section to the Debug documentatio noting this
    stability status.
    alilleybrinker committed May 24, 2020
    Configuration menu
    Copy the full SHA
    698df11 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2020

  1. Auto merge of rust-lang#72472 - LeSeulArtichaut:sync-command, r=dtolnay

    Implement `Sync` for `process::Command on unix and vxworks
    
    Closes rust-lang#72387.
    r? @cuviper
    bors committed May 25, 2020
    Configuration menu
    Copy the full SHA
    2679c38 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#72520 - jonas-schievink:cleanup-userty, r=mat…

    …thewjasper
    
    Clear MIR local type annotations after borrowck
    bors committed May 25, 2020
    Configuration menu
    Copy the full SHA
    997d953 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#71940 - SimonSapin:nonnull-slice, r=kennytm

    Add `len` and `slice_from_raw_parts` to `NonNull<[T]>`
    
    This follows the precedent of the recently-added `<*const [T]>::len` (adding to its tracking issue rust-lang#71146) and `ptr::slice_from_raw_parts`.
    RalfJung authored May 25, 2020
    Configuration menu
    Copy the full SHA
    bf816e0 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#72525 - RalfJung:miri-cast-checks, r=eddyb

    Miri casts: do not blindly rely on dest type
    
    Make sure that we notice when the MIR is bad and the casted-to and destination type are e.g. of different size, as suggested by @eddyb.
    RalfJung authored May 25, 2020
    Configuration menu
    Copy the full SHA
    4a5a655 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#72537 - Amanieu:fix-asm-liveness, r=petroch…

    …enkov
    
    Fix InlineAsmOperand expresions being visited twice during liveness checking
    RalfJung authored May 25, 2020
    Configuration menu
    Copy the full SHA
    14941cf View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#72544 - sexxi-goose:upvars_mentioned, r=mat…

    …thewjasper
    
    librustc_middle: Rename upvars query to upvars_mentioned
    
    As part of supporting RFC 2229, we will be capturing all the Places that
    were mentioned in the closure.
    
    This commit modifies the name of the upvars query to upvars_mentioned.
    
    r? @nikomatsakis @blitzerr @matthewjasper
    RalfJung authored May 25, 2020
    Configuration menu
    Copy the full SHA
    4f4b716 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#72551 - alilleybrinker:document-debug-stabi…

    …lity, r=KodrAus
    
    First draft documenting Debug stability.
    
    Debug implementations of std types aren't stable, and neither are derived Debug implementations for any types, including user-defined types. This commit adds a section to the Debug documentation noting this stability status.
    
    This issue is tracked by rust-lang#62794.
    RalfJung authored May 25, 2020
    Configuration menu
    Copy the full SHA
    7c9fdb3 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#72562 - RalfJung:rollup-2ngjgwi, r=RalfJung

    Rollup of 5 pull requests
    
    Successful merges:
    
     - rust-lang#71940 (Add `len` and `slice_from_raw_parts` to `NonNull<[T]>`)
     - rust-lang#72525 (Miri casts: do not blindly rely on dest type)
     - rust-lang#72537 (Fix InlineAsmOperand expresions being visited twice during liveness checking)
     - rust-lang#72544 (librustc_middle: Rename upvars query to upvars_mentioned)
     - rust-lang#72551 (First draft documenting Debug stability.)
    
    Failed merges:
    
    r? @ghost
    bors committed May 25, 2020
    Configuration menu
    Copy the full SHA
    ee6c0da View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#72354 - tamird:remove-copyright, r=Mark-Simul…

    …acrum
    
    Remove dangling COPYRIGHT references
    
    Missed in 2a66355.
    
    r? @Mark-Simulacrum
    bors committed May 25, 2020
    Configuration menu
    Copy the full SHA
    a0f06d1 View commit details
    Browse the repository at this point in the history
  10. Rename upvar_list to closure_captures

    As part of supporting RFC 2229, we will be capturing all the places that
    are mentioned in a closure. Currently the upvar_list field gives access
    to a FxIndexMap<HirId, Upvar> map. Eventually this will change, with the
    upvar_list having a more general structure that expresses captured
    paths, not just the mentioned upvars. We will make those changes in
    subsequent PRs.
    
    This commit modifies the name of the upvar_list map to closure_captures
    in TypeckTables.
    
    Co-authored-by: Dhruv Jauhar <dhruvjhr@gmail.com>
    Co-authored-by: Aman Arora <me@aman-arora.com>
    3 people committed May 25, 2020
    Configuration menu
    Copy the full SHA
    c3dc8c4 View commit details
    Browse the repository at this point in the history