Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 26 pull requests #76774

Closed
wants to merge 65 commits into from

Commits on Aug 29, 2020

  1. Add more info for Vec Drain doc

    See its documentation for more
    pickfire authored Aug 29, 2020
    Configuration menu
    Copy the full SHA
    ba4c498 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7148412 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2020

  1. Use inline(never) instead of cold

    inline(never) is better way to avoid optimizer to inline the function instead of cold.
    howard0su authored Sep 2, 2020
    Configuration menu
    Copy the full SHA
    a80d390 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2020

  1. Add Arith Tests in Library

    Ayush Kumar Mishra committed Sep 5, 2020
    Configuration menu
    Copy the full SHA
    941dca8 View commit details
    Browse the repository at this point in the history
  2. Minor refactoring

    Ayush Kumar Mishra committed Sep 5, 2020
    Configuration menu
    Copy the full SHA
    dc37b55 View commit details
    Browse the repository at this point in the history
  3. Move Various str tests in library

    Ayush Kumar Mishra committed Sep 5, 2020
    Configuration menu
    Copy the full SHA
    7d834c8 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2020

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

Commits on Sep 12, 2020

  1. Update bootstrap readme

    - Reflect changes in x.py defaults
    - Remove recommendation to use nightly for incremental; it works fine on
    beta
    - Remove note that incremental chooses stage 1 by default; stage 1 is
    already the default
    - Update Discord -> Zulip
    jyn514 committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    85ab152 View commit details
    Browse the repository at this point in the history
  2. Make all methods of Duration const

    Make the following methods of `Duration` unstable const under `duration_const_2`:
     - `from_secs_f64`
     - `from_secs_f32`
     - `mul_f64`
     - `mul_f32`
     - `div_f64`
     - `div_f32`
    
    This results in all methods of `Duration` being (unstable) const.
    
    Also adds tests for these methods in a const context, moved the test to `library` as part of rust-lang#76268.
    
    Possible because of rust-lang#72449, which made the relevant `f32` and `f64` methods const.
    
    Tracking issue: rust-lang#72440
    CDirkx committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    73e0a56 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4f0047e View commit details
    Browse the repository at this point in the history
  4. Fix a typo

    nox committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    75f0f7a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    caf6c92 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2e7ca73 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    15d25a8 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2020

  1. remove orphaned files

    Should been part of rust-lang#74163
    tshepang committed Sep 13, 2020
    Configuration menu
    Copy the full SHA
    b7ce5b4 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2020

  1. Configuration menu
    Copy the full SHA
    c9686cb View commit details
    Browse the repository at this point in the history
  2. fix syntax error in suggesting generic constraint in trait parameter

    suggest `where T: Foo` for the first bound on a trait, then suggest
    `, T: Foo` when the suggested bound would add to an existing set of
    `where` clauses. `where T: Foo` may be the first bound if `T` has a
    default, because we'd rather suggest
    ```
    trait A<T=()> where T: Copy
    ```
    than
    ```
    trait A<T: Copy=()>
    ```
    for legibility reasons.
    iximeow committed Sep 14, 2020
    Configuration menu
    Copy the full SHA
    0eac38b View commit details
    Browse the repository at this point in the history
  3. shrink const infer error

    lcnr committed Sep 14, 2020
    Configuration menu
    Copy the full SHA
    dd57275 View commit details
    Browse the repository at this point in the history
  4. improve const infer err

    lcnr committed Sep 14, 2020
    Configuration menu
    Copy the full SHA
    035f879 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b881551 View commit details
    Browse the repository at this point in the history
  6. ⬆️ rust-analyzer

    Jonas Schievink committed Sep 14, 2020
    Configuration menu
    Copy the full SHA
    43709f7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5112f87 View commit details
    Browse the repository at this point in the history
  8. Use intra-doc links for DelaySpanBugEmitted

    Also improve the docs for it a bit.
    camelid authored Sep 14, 2020
    Configuration menu
    Copy the full SHA
    1f26a18 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    15349ef View commit details
    Browse the repository at this point in the history
  10. Fix diagram for DebruijnIndex

    camelid committed Sep 14, 2020
    Configuration menu
    Copy the full SHA
    5c1043a View commit details
    Browse the repository at this point in the history
  11. clean up comment text a bit

    Co-authored-by: Esteban Küber <[email protected]>
    iximeow and estebank committed Sep 14, 2020
    Configuration menu
    Copy the full SHA
    e1607c8 View commit details
    Browse the repository at this point in the history
  12. Include non-JSON output in error display for lint-doc failure.

    Some errors, like if rustc is broken, or dylib search path is wrong,
    will only display non-JSON errors. Show those, too, to make it easier to
    debug a problem.
    ehuss committed Sep 14, 2020
    Configuration menu
    Copy the full SHA
    32efcfc View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9dad908 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    58310ce View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2020

  1. Configuration menu
    Copy the full SHA
    f7f9a6c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c7204f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1f572b0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    176956c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b93a831 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5f3145f View commit details
    Browse the repository at this point in the history
  7. Make the default stage for x.py configurable

    This allows configuring the default stage for each sub-command individually.
    
    - Normalize the stage as early as possible, so there's no confusion
      about which to use.
    - Don't add an explicit `stage` option in config.toml
    
      This offers no more flexibility than `*_stage` and makes it confusing
      which takes precedence.
    
    - Always give `--stage N` precedence over config.toml
    - Fix bootstrap tests
    
      This changes the tests to go through `Config::parse` so that they test
      the actual defaults, not the dummy ones provided by `default_opts`.  To
      make this workable (and independent of the environment), it does not
      read `config.toml` for tests.
    jyn514 committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    328c61c View commit details
    Browse the repository at this point in the history
  8. Extract some intrinsics out of rustc_codegen_llvm

    A significant amount of intrinsics do not actually need backend-specific
    behaviors to be implemented, instead relying on methods already in
    rustc_codegen_ssa. So, extract those methods out to rustc_codegen_ssa,
    so that each backend doesn't need to reimplement the same code.
    khyperia committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    21b0c12 View commit details
    Browse the repository at this point in the history
  9. Update books

    ehuss committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    e0c1621 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2020

  1. Rollup merge of rust-lang#76056 - pickfire:patch-10, r=jyn514

    Add more info for Vec Drain doc
    
    See its documentation for more
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    eeffc1c View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#76062 - pickfire:patch-13, r=jyn514

    Vec slice example fix style and show type elision
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    fe989e9 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#76262 - howard0su:patch-1, r=cramertj

    Use inline(never) instead of cold
    
    inline(never) is better way to avoid optimizer to inline the function instead of cold.
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    f2d9579 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#76335 - CDirkx:const-duration, r=ecstatic-m…

    …orse
    
    Make all methods of `Duration` unstably const
    
    Make the following methods of `Duration` unstable const under `duration_const_2`:
     - `from_secs_f64`
     - `from_secs_f32`
     - `mul_f64`
     - `mul_f32`
     - `div_f64`
     - `div_f32`
    
    This results in all methods of `Duration` being (unstable) const.
    
    Moved the tests to `library` as part of rust-lang#76268.
    
    Possible because of rust-lang#72449, which made the relevant `f32` and `f64` methods const.
    
    Tracking issue: rust-lang#72440
    
    r? @ecstatic-morse
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    bc42cd8 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#76366 - ayushmishra2005:arith_tests_in_libr…

    …ary, r=jyn514
    
    Add Arith Tests in Library
    
    Added Arith Tests library as a part of rust-lang#76268
    
    r? @matklad
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    921c15c View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#76369 - ayushmishra2005:move_various_str_te…

    …sts_library, r=jyn514
    
    Move Various str tests in library
    
    Moved various string ui  tests in library  as a part of rust-lang#76268
    
    r? @matklad
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    53cb50d View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#76534 - notriddle:doc-comments, r=jyn514

    Add doc comments for From impls
    
    rust-lang#51430
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    651210c View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#76622 - jyn514:bootstrap-readme, r=Mark-Sim…

    …ulacrum
    
    Update bootstrap readme
    
    - Reflect changes in x.py defaults
    - Remove recommendation to use nightly for incremental; it works fine on
    beta
    - Remove note that incremental chooses stage 1 by default; stage 1 is
    already the default
    - Update Discord -> Zulip
    
    r? @Mark-Simulacrum
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    ca2db9e View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#76625 - jyn514:default-stages, r=Mark-Simul…

    …acrum
    
    Make the default stage for x.py configurable
    
    This also allows configuring each sub-command individually.
    
    Possibly rust-lang#76617 should land before this? I don't feel strongly either way, I don't mind waiting.
    
    Closes rust-lang#76165.
    r? @Mark-Simulacrum
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    d33c57c View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#76641 - nox:pointee-random-stuff, r=eddyb

    Some cleanup changes and commenting
    
    r? @nikomatsakis
    Cc @eddyb
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    0224a3e View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#76642 - GuillaumeGomez:ignored-private-doc-…

    …test, r=jyn514
    
    Ignored private doc test
    
    Fixes rust-lang#76457.
    
    r? @ehuss
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    b0e36db View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#76669 - lzutao:core_asm, r=Amanieu

    Prefer asm! over llvm_asm! in core
    
    Replace llvm_asm! with asm! in core.
    
    x86 asm compare (in somecases I replaced generic type with String).
    * https://rust.godbolt.org/z/59eEMv
    * https://rust.godbolt.org/z/v78s6q
    * https://rust.godbolt.org/z/7qYY41
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    1012d66 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#76681 - tshepang:unused, r=Mark-Simulacrum

    remove orphaned files
    
    Should been part of rust-lang#74163
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    b5c8816 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#76694 - wesleywiser:partitioning_cx_trait, …

    …r=davidtwco
    
    Introduce a PartitioningCx struct
    
    This contains all the data used by the partitioning algorithm and allows that data to be used at each stage of the partitioning. This is useful for other approaches to partitioning which may want different pieces of the data available at each step.
    
    cc @rust-lang/wg-incr-comp
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    0f834e6 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#76695 - iximeow:trait-generic-bound-suggest…

    …ion, r=estebank
    
    fix syntax error in suggesting generic constraint in trait parameter
    
    suggest `where T: Foo` for the first bound on a trait, then suggest
    `, T: Foo` when the suggested bound would add to an existing set of
    `where` clauses. `where T: Foo` may be the first bound if `T` has a
    default, because we'd rather suggest
    ```
    trait A<T=()> where T: Copy
    ```
    than
    ```
    trait A<T: Copy=()>
    ```
    for legibility reasons.
    
    the test case i added here is derived from [this reproduction](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=0bf3ace9f2a183d0bdbd748c6b8e3971):
    ```
    struct B<T: Copy> {
        t: T
    }
    
    trait A<T = ()> {
        fn returns_constrained_type(&self, t: T) -> B<T> {
            B { t }
        }
    }
    ```
    where the suggested fix,
    ```
    trait A<T = ()>, T: Copy { ... }
    ```
    is in fact invalid syntax!
    
    i also found an error in the existing suggestion for `trait Base<T = String>: Super<T>` where rustc would suggest `trait Base<T = String>: Super<T>, T: Copy`, but `T: Copy` is the first of the trait's `where` clauses and should be `where T: Copy` as well. the test for that suggestion expects invalid syntax, and has been revised to a compiler-pleasing `trait Base<T = String>: Super<T> where T: Copy`.
    
    judging by rust-lang#70009 i'll.. cc @estebank ?
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    f4be98a View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#76699 - lcnr:const-infer-err, r=varkor

    improve const infer error
    
    cc rust-lang#72328
    
    reduces it from
    ```
    error[E0282]: type annotations needed
      --> src/main.rs:17:5
       |
    17 |     Foo.bar().bar().bar().bar().baz();
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: unable to infer the value of a const parameter
    ```
    to
    ```
    error[E0282]: type annotations needed
      --> $DIR/method-chain.rs:21:33
       |
    LL |     Foo.bar().bar().bar().bar().baz();
       |                                 ^^^
       |
       = note: cannot infer the value of the const parameter `N`
    ```
    
    r? @varkor
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    55b9088 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#76707 - pickfire:patch-4, r=jonas-schievink

    Simplify iter flatten struct doc
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    6ef8299 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#76710 - rust-lang:rust-analyzer-2020-09-14,…

    … r=jonas-schievink
    
    ⬆️ rust-analyzer
    
    r? @ghost
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    51fd7db View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#76714 - camelid:patch-3, r=jonas-schievink

    Small docs improvements
    
    @rustbot modify labels: T-doc T-compiler
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    ce2041b View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#76717 - ehuss:fix-rustc-book-libdir, r=Mark…

    …-Simulacrum
    
    Fix generating rustc docs with non-default lib directory.
    
    If `libdir` is set in `config.toml`, then the tool to generate the rustc docs was unable to run `rustc` because it could not find the shared libraries. The solution is to set the dylib search path to include the libdir.
    
    I changed the API of `add_rustc_lib_path` to take `Command` instead of `Cargo` to try to share the code in several places. This is how it worked before rust-lang#64316, and I think this still retains the spirit of that change.
    
    Fixes rust-lang#76702
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    75cd58e View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#76721 - camelid:intra-doc-links-for-core-me…

    …m, r=jyn514
    
    Use intra-doc links in `core::mem`
    
    Part of rust-lang#75080.
    
    Last one for now!
    
    ---
    
    @rustbot modify labels: A-intra-doc-links T-doc
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    dcb5c5b View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#76722 - ssomers:btree_send_sync, r=Mark-Sim…

    …ulacrum
    
    Test and fix Send and Sync traits of BTreeMap artefacts
    
    Fixes rust-lang#76686.
    
    I'm not quite sure what all this implies. E.g. comparing with the definitions for `NodeRef` in node.rs,  maybe an extra bound `T: 'a` is useful for something. The test compiles on stable/beta (apart from `drain_filter`) so I bet `Sync` is equally desirable.
    
    r? @Mark-Simulacrum
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    d99896b View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#76728 - jyn514:rustdoc-extern-crate, r=ehuss

    Add a comment why `extern crate` is necessary for rustdoc
    
    r? @ehuss
    
    From rust-lang#74293 (comment).
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    36bf0c9 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#76741 - Mark-Simulacrum:no-dry-run-timing, …

    …r=alexcrichton
    
    Avoid printing dry run timings
    
    This avoids a wall of text on CI with 0.000 as the likely time.
    
    r? @alexcrichton
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    31e0815 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#76764 - ehuss:update-books, r=ehuss

    Update books
    
    ## nomicon
    
    1 commits in 25854752549d44d76fbd7650e17cb4f167a0b8fb..6e57e64501f61873ab80cb78a07180a22751a5d6
    2020-08-19 16:41:48 -0400 to 2020-09-14 11:40:23 -0400
    - Fix API change to alloc::Global::grow. (rust-lang/nomicon#236)
    
    ## reference
    
    3 commits in 25391dba46262f882fa846beefaff54a966a8fa5..56a13c082ee90736c08d6abdcd90462517b703d3
    2020-09-02 07:22:55 -0700 to 2020-09-14 23:20:16 -0700
    - Update the description of staticlib (rust-lang/reference#884)
    - Rust 1.46 now allows more features in const fn (rust-lang/reference#883)
    - Document the enum changes in RFC 2195 (rust-lang/reference#879)
    
    ## book
    
    1 commits in e5ed97128302d5fa45dbac0e64426bc7649a558c..cb28dee95e5e50b793e6ba9291c5d1568d3ad72e
    2020-08-31 12:53:40 -0500 to 2020-09-09 10:06:00 -0500
    - Fixed the error message of invalid array element access in ch03.2 (rust-lang/book#2446)
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    f868f02 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#76766 - khyperia:generic_intrinsics, r=eddyb

    Extract some intrinsics out of rustc_codegen_llvm
    
    A significant amount of intrinsics do not actually need backend-specific behaviors to be implemented, instead relying on methods already in rustc_codegen_ssa. So, extract those methods out to rustc_codegen_ssa, so that each backend doesn't need to reimplement the same code.
    
    Almost everything should be a pretty direct translation. A notable not-direct-translation is `add_with_overflow` and friends being changed to `bx.checked_binop`, but it's pretty simple.
    
    I could have been a lot more aggressive here and pulled out way more methods, and add a few new methods in the rustc_codegen_ssa "API". However, because this is my second rustc PR, I thought that moving those to a follow-up PR and doing more incremental changes here would be better (and I guess ask if this work is even desired in the first place). I'm hoping to eventually remove the mess of intrinsic handling in the backend entirely, which would be hecking fantastic ✨
    Dylan-DPC authored Sep 16, 2020
    Configuration menu
    Copy the full SHA
    32ff2c9 View commit details
    Browse the repository at this point in the history