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 14 pull requests #78001

Merged
merged 64 commits into from
Oct 16, 2020
Merged

Rollup of 14 pull requests #78001

merged 64 commits into from
Oct 16, 2020

Commits on Sep 11, 2020

  1. Configuration menu
    Copy the full SHA
    a020142 View commit details
    Browse the repository at this point in the history
  2. move buffered.rs to mod.rs

    Lucretiel committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    96229f0 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2020

  1. Configuration menu
    Copy the full SHA
    6d75cdf View commit details
    Browse the repository at this point in the history
  2. Stabilize move_ref_pattern

    Amjad50 committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    da700cb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    afb9eeb View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2020

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

Commits on Oct 1, 2020

  1. add str::{Split,RSplit}::as_str methods

    This commit introduses 2 methods under "str_split_as_str" gate with common
    signature of `&Split<'a, _> -> &'a str'`. Both of them work like
    `Chars::as_str` - return unyield part of the inner string.
    WaffleLapkin committed Oct 1, 2020
    Configuration menu
    Copy the full SHA
    0b923d3 View commit details
    Browse the repository at this point in the history
  2. add `str::{SplitN, RSplitN, SplitTerminator, RSplitTerminator}::as_st…

    …r` methods
    
    This commit entroduce 4 methods smililar to `Split::as_str` all under the same
    gate "str_split_as_str".
    WaffleLapkin committed Oct 1, 2020
    Configuration menu
    Copy the full SHA
    4747215 View commit details
    Browse the repository at this point in the history
  3. add str::SplitInclusive::as_str method

    This commit entroduces `core::str::SplitInclusive::as_str` method similar to
    `core::str::Split::as_str`, but under different gate -
    "str_split_inclusive_as_str" (this is done so because `SplitInclusive` is
    itself unstable).
    WaffleLapkin committed Oct 1, 2020
    Configuration menu
    Copy the full SHA
    076514c View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2020

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

Commits on Oct 7, 2020

  1. Configuration menu
    Copy the full SHA
    54a71e8 View commit details
    Browse the repository at this point in the history
  2. Use slice_as_mut_ptr instead of first_ptr_mut.

    This function was renamed.
    m-ou-se committed Oct 7, 2020
    Configuration menu
    Copy the full SHA
    e6d61ad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0f26578 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    41066be View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    060e8cb View commit details
    Browse the repository at this point in the history
  6. Formatting.

    m-ou-se committed Oct 7, 2020
    Configuration menu
    Copy the full SHA
    b3be11e View commit details
    Browse the repository at this point in the history
  7. Simplify doc-cfg rendering based on the current context

    For sub-items on a page don't show cfg that has already been rendered on
    a parent item. At its simplest this means not showing anything that is
    shown in the portability message at the top of the page, but also for
    things like fields of an enum variant if that variant itself is
    cfg-gated then don't repeat those cfg on each field of the variant.
    
    This does not touch trait implementation rendering, as that is more
    complex and there are existing issues around how it deals with doc-cfg
    that need to be fixed first.
    Nemo157 committed Oct 7, 2020
    Configuration menu
    Copy the full SHA
    6f0544a View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2020

  1. ICEs should print the top of the query stack

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    17eb8d8 View commit details
    Browse the repository at this point in the history
  2. run full query stack print just when RUST_BACKTRACE is set

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    20ea929 View commit details
    Browse the repository at this point in the history
  3. fix invalid-punct-ident-1 test

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    7ccca35 View commit details
    Browse the repository at this point in the history
  4. add filter regexes to load-panic-backtraces test

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    d6d4388 View commit details
    Browse the repository at this point in the history
  5. fix show we're just showing... message instead of the end of query st…

    …ack message when RUST_BACKTRACE=0
    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    d60b7e2 View commit details
    Browse the repository at this point in the history
  6. fix clippy custom_ice_message test

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    6e7e4ac View commit details
    Browse the repository at this point in the history
  7. add new line

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    15663a4 View commit details
    Browse the repository at this point in the history
  8. rebase with master

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    2124e9b View commit details
    Browse the repository at this point in the history
  9. ICEs should print the top of the query stack

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    2b91b7f View commit details
    Browse the repository at this point in the history
  10. run full query stack print just when RUST_BACKTRACE is set

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    01f838a View commit details
    Browse the repository at this point in the history
  11. change approach and run ui tests

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    2bfdd64 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b6e9f08 View commit details
    Browse the repository at this point in the history
  13. fix invalid-punct-ident-1 test

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    3c56ba5 View commit details
    Browse the repository at this point in the history
  14. add filter regexes to load-panic-backtraces test

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    d1e3059 View commit details
    Browse the repository at this point in the history
  15. fix show we're just showing... message instead of the end of query st…

    …ack message when RUST_BACKTRACE=0
    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    6c0f06a View commit details
    Browse the repository at this point in the history
  16. remove new line

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    c61d95b View commit details
    Browse the repository at this point in the history
  17. revert deleted new line

    hosseind75 authored and hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    998186e View commit details
    Browse the repository at this point in the history
  18. delete const-pat-ice test stderr

    hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    42ebae3 View commit details
    Browse the repository at this point in the history
  19. change condition for end of query stack message

    hosseind88 committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    73d8f00 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2020

  1. Configuration menu
    Copy the full SHA
    7280f6a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4e82da4 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2020

  1. Configuration menu
    Copy the full SHA
    4e263fe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4409cb2 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2020

  1. Fix comment about non-reentrant StaticMutex::lock().

    The comment said it's UB to call lock() while it is locked. That'd be
    quite a useless Mutex. :) It was supposed to say 'locked by the same
    thread', not just 'locked'.
    m-ou-se committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    5875657 View commit details
    Browse the repository at this point in the history
  2. Remove lifetime from StaticMutex and assume 'static.

    StaticMutex is only ever used with as a static (as the name already
    suggests). So it doesn't have to be generic over a lifetime, but can
    simply assume 'static.
    
    This 'static lifetime guarantees the object is never moved, so this is
    no longer a manually checked requirement for unsafe calls to lock().
    m-ou-se committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    44a2af3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a22cd05 View commit details
    Browse the repository at this point in the history
  4. fix stderr file of clippy/custom_ice_message test

    hosseind88 committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    46cc889 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2020

  1. mangling: non-monomorphic #[rustc_symbol_name]

    This commit adjust `#[rustc_symbol_name]` so that it can be applied to
    non-monomorphic functions without producing an ICE.
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    9752787 View commit details
    Browse the repository at this point in the history
  2. mangling: encode all impl parameters

    This commit modifies v0 symbol mangling to include all generic
    parameters from impl blocks (not just those used in the self type).
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    fbdfe2c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    95daa06 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    14b2d16 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1c03f6d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7bd6403 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2020

  1. Rollup merge of rust-lang#75023 - euclio:argument-span, r=estebank

    ensure arguments are included in count mismatch span
    
    The current diagnostic isn't very helpful if the function header spans multiple lines. Lines comprising the function signature may be elided to keep the diagnostic short, but these lines are essential to fixing the error. This is made worse when the function has a body, because the last two lines of the span are then dedicated to showing the end of the body, which is irrelevant.
    
    This PR changes the span to be a multispan made up of the header and the the arguments, ensuring they won't be elided. It also discards the function body from the span.
    
    [Old](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f92d9f81a8c9416f0f04e4e09923b6d4):
    
    ```
    error[E0061]: this function takes 6 arguments but 1 argument was supplied
      --> src/main.rs:18:5
       |
    1  | / fn bar(
    2  | |     a: i32,
    3  | |     b: i32,
    4  | |     c: i32,
    ...  |
    14 | |     println!("{}", f);
    15 | | }
       | |_- defined here
    ...
    18 |       bar(1);
       |       ^^^ - supplied 1 argument
       |       |
       |       expected 6 arguments
    ```
    
    New:
    
    ```
    error[E0061]: this function takes 6 arguments but 1 argument was supplied
      --> $DIR/not-enough-arguments.rs:28:3
       |
    LL |   bar(1);
       |   ^^^ - supplied 1 argument
       |   |
       |   expected 6 arguments
       |
    note: function defined here
      --> $DIR/not-enough-arguments.rs:9:1
       |
    LL | / fn bar(
    LL | |     a: i32,
       | |     ^^^^^^^
    LL | |     b: i32,
       | |     ^^^^^^^
    LL | |     c: i32,
       | |     ^^^^^^^
    LL | |     d: i32,
       | |     ^^^^^^^
    LL | |     e: i32,
       | |     ^^^^^^^
    LL | |     f: i32,
       | |     ^^^^^^^
    LL | | ) {
       | |_^
    ```
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    075f2bf View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#75265 - WaffleLapkin:str_split_as_str, r=dt…

    …olnay
    
    Add `str::{Split,RSplit,SplitN,RSplitN,SplitTerminator,RSplitTerminator,SplitInclusive}::as_str` methods
    
    tl;dr this allows viewing unyelded part of str-split-iterators, like so:
    ```rust
    let mut split = "Mary had a little lamb".split(' ');
    assert_eq!(split.as_str(), "Mary had a little lamb");
    split.next();
    assert_eq!(split.as_str(), "had a little lamb");
    split.by_ref().for_each(drop);
    assert_eq!(split.as_str(), "");
    ```
    
    --------------
    
    This PR adds semi-identical `as_str` methods to most str-split-iterators with signatures like `&'_ Split<'a, P: Pattern<'a>> -> &'a str` (Note: output `&str` lifetime is bound to the `'a`, not the `'_`). The methods are similar to [`Chars::as_str`]
    
    `SplitInclusive::as_str` is under `"str_split_inclusive_as_str"` feature gate, all other methods are under `"str_split_as_str"` feature gate.
    
    Before this PR you had to sum `len`s of all yielded parts or collect into `String` to emulate `as_str`.
    
    [`Chars::as_str`]: https://doc.rust-lang.org/core/str/struct.Chars.html#method.as_str
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    977df43 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#75675 - davidtwco:symbol-mangling-impl-para…

    …ms, r=eddyb
    
    mangling: mangle impl params w/ v0 scheme
    
    This PR modifies v0 symbol mangling to include all generic parameters from impl blocks (not just those used in the self type) - an alternative fix to rust-lang#75326.
    
    ```
    original:
       _RNCNvXCs4fqI2P2rA04_19impl_param_manglingINtB4_3FooppENtNtNtNtCsfnEnqCNU58Z_4core4iter6traits8iterator8Iterator4next0B4_
    //        |------------ B4_ ----------------|
    // _R (N C (N v (X (C ((s 4fqI2p2rA04_) 19impl_param_mangling)) (I (N t B4_ 3Foo) pp E) (N t (N t (N t (N t (C ((s fnEnqCNU58Z_) 4core)) 4iter) 6traits) 8iterator) 8Iterator)) 4next) 0) B4_
    
    modified:
       _RNvXINICs4fqI2P2rA04_11issue_753260pppEINtB5_3FooppENtNtNtNtCsfnEnqCNU58Z_4core4iter6traits8iterator8Iterator4nextB5_
    // _R (N v (X (I (N I (C ((s 4fqI2P2rA04_) 11issue_75326)) 0) ppp E) (I (N t B5_ 3Foo) pp E) (N t (N t (N t (N t (C ((s fnEnqCNU58Z_) 4core)) 4iter) 6traits) 8iterator) 8Iterator)) 4next) B5_
    //            |     ^                                              |
    //            |     |                                              |
    //            |     new impl namespace                             |
    ```
    
    ~~Submitted as a draft as after some discussion w/ @eddyb, I'm going to do some investigation into (yet more alternative) changes to polymorphization that might remove the necessity for this.~~
    
    r? @eddyb
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    1643fd8 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#76084 - Lucretiel:split-buffered, r=dtolnay

    Refactor io/buffered.rs into submodules
    
    This pull request splits `BufWriter`, `BufReader`, `LineWriter`, and `LineWriterShim` (along with their associated tests) into separate submodules. It contains no functional changes. This change is being made in anticipation of adding another type of buffered writer which can be switched between line- and block-buffering mode.
    
    Part of a series of pull requests resolving rust-lang#60673.
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    5acb7f1 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#76119 - Amjad50:stabilizing-move_ref_patter…

    …n, r=nikomatsakis
    
    Stabilize move_ref_pattern
    
    # Implementation
    - Initially the rule was added in the run-up to 1.0. The AST-based borrow checker was having difficulty correctly enforcing match expressions that combined ref and move bindings, and so it was decided to simplify forbid the combination out right.
    - The move to MIR-based borrow checking made it possible to enforce the rules in a finer-grained level, but we kept the rule in place in an effort to be conservative in our changes.
    - In rust-lang#68376, @Centril lifted the restriction but required a feature-gate.
    - This PR removes the feature-gate.
    
    Tracking issue: rust-lang#68354.
    
    # Description
    This PR is to stabilize the feature `move_ref_pattern`, which allows patterns
    containing both `by-ref` and `by-move` bindings at the same time.
    
    For example: `Foo(ref x, y)`, where `x` is `by-ref`,
    and `y` is `by-move`.
    
    The rules of moving a variable also apply here when moving *part* of a variable,
    such as it can't be referenced or moved before.
    
    If this pattern is used, it would result in *partial move*, which means that
    part of the variable is moved. The variable that was partially moved from
    cannot be used as a whole in this case, only the parts that are still
    not moved can be used.
    
    ## Documentation
    - The reference (rust-lang/reference#881)
    - Rust by example (rust-lang/rust-by-example#1377)
    
    ## Tests
    There are many tests, but I think one of the comperhensive ones:
    - [borrowck-move-ref-pattern-pass.rs](https://github.com/Centril/rust/blob/85fbf49ce0e2274d0acf798f6e703747674feec3/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs)
    - [borrowck-move-ref-pattern.rs](https://github.com/Centril/rust/blob/85fbf49ce0e2274d0acf798f6e703747674feec3/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.rs)
    
    # Examples
    
    ```rust
    #[derive(PartialEq, Eq)]
    struct Finished {}
    
    #[derive(PartialEq, Eq)]
    struct Processing {
        status: ProcessStatus,
    }
    
    #[derive(PartialEq, Eq)]
    enum ProcessStatus {
        One,
        Two,
        Three,
    }
    
    #[derive(PartialEq, Eq)]
    enum Status {
        Finished(Finished),
        Processing(Processing),
    }
    
    fn check_result(_url: &str) -> Status {
        // fetch status from some server
        Status::Processing(Processing {
            status: ProcessStatus::One,
        })
    }
    
    fn wait_for_result(url: &str) -> Finished {
        let mut previous_status = None;
        loop {
            match check_result(url) {
                Status::Finished(f) => return f,
                Status::Processing(p) => {
                    match (&mut previous_status, p.status) {
                        (None, status) => previous_status = Some(status), // first status
                        (Some(previous), status) if *previous == status => {} // no change, ignore
                        (Some(previous), status) => { // Now it can be used
                            // new status
                            *previous = status;
                        }
                    }
                }
            }
        }
    }
    ```
    
    Before, we would have used:
    ```rust
                    match (&previous_status, p.status) {
                        (Some(previous), status) if *previous == status => {} // no change, ignore
                        (_, status) => {
                            // new status
                            previous_status = Some(status);
                        }
                    }
    ```
    
    Demonstrating *partial move*
    ```rust
    fn main() {
        #[derive(Debug)]
        struct Person {
            name: String,
            age: u8,
        }
    
        let person = Person {
            name: String::from("Alice"),
            age: 20,
        };
    
        // `name` is moved out of person, but `age` is referenced
        let Person { name, ref age } = person;
    
        println!("The person's age is {}", age);
    
        println!("The person's name is {}", name);
    
        // Error! borrow of partially moved value: `person` partial move occurs
        //println!("The person struct is {:?}", person);
    
        // `person` cannot be used but `person.age` can be used as it is not moved
        println!("The person's age from person struct is {}", person.age);
    }
    ```
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    85dbb03 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#77493 - hosseind88:ICEs_should_always_print…

    …_the_top_of_the_query_stack, r=oli-obk
    
    ICEs should always print the top of the query stack
    
    see rust-lang#76920
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    0e4d196 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#77619 - fusion-engineering-forks:wasm-parke…

    …r, r=dtolnay
    
    Use futex-based thread-parker for Wasm32.
    
    This uses the existing `sys_common/thread_parker/futex.rs` futex-based thread parker (that was already used for Linux) for wasm32 as well (if the wasm32 atomics target feature is enabled, which is not the case by default).
    
    Wasm32 provides the basic futex operations as instructions: https://webassembly.github.io/threads/syntax/instructions.html
    
    These are now exposed from `sys::futex::{futex_wait, futex_wake}`, just like on Linux. So, `thread_parker/futex.rs` stays completely unmodified.
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    dcf972a View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#77646 - fusion-engineering-forks:use-static…

    …-mutex, r=dtolnay
    
    For backtrace, use StaticMutex instead of a raw sys Mutex.
    
    The code used the very unsafe `sys::mutex::Mutex` directly, and built its own unlock-on-drop wrapper around it. The StaticMutex wrapper already provides that and is easier to use safely.
    
    @rustbot modify labels: +T-libs +C-cleanup
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    085399f View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#77648 - fusion-engineering-forks:static-mut…

    …ex, r=dtolnay
    
    Static mutex is static
    
    StaticMutex is only ever used with as a static (as the name already suggests). So it doesn't have to be generic over a lifetime, but can simply assume 'static.
    
    This 'static lifetime guarantees the object is never moved, so this is no longer a manually checked requirement for unsafe calls to lock().
    
    @rustbot modify labels: +T-libs +A-concurrency +C-cleanup
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    b183ef2 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#77657 - fusion-engineering-forks:cleanup-cl…

    …oudabi-sync, r=dtolnay
    
    Cleanup cloudabi mutexes and condvars
    
    This gets rid of lots of unnecessary unsafety.
    
    All the AtomicU32s were wrapped in UnsafeCell or UnsafeCell<MaybeUninit>, and raw pointers were used to get to the AtomicU32 inside. This change cleans that up by using AtomicU32 directly.
    
    Also replaces a UnsafeCell<u32> by a safer Cell<u32>.
    
    @rustbot modify labels: +C-cleanup
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    9b8c0eb View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#77672 - Nemo157:simplify-cfg, r=jyn514

    Simplify doc-cfg rendering based on the current context
    
    For sub-items on a page don't show cfg that has already been rendered on
    a parent item. At its simplest this means not showing anything that is
    shown in the portability message at the top of the page, but also for
    things like fields of an enum variant if that variant itself is
    cfg-gated then don't repeat those cfg on each field of the variant.
    
    This does not touch trait implementation rendering, as that is more
    complex and there are existing issues around how it deals with doc-cfg
    that need to be fixed first.
    
    ### Screenshots, left is current, right is new:
    
    ![image](https://user-images.githubusercontent.com/81079/95387261-c2e6a200-08f0-11eb-90d4-0a9734acd922.png)
    
    ![image](https://user-images.githubusercontent.com/81079/95387458-06411080-08f1-11eb-81f7-5dd7f37695dd.png)
    
    ![image](https://user-images.githubusercontent.com/81079/95387702-6637b700-08f1-11eb-82f4-46b6cd9b24f2.png)
    
    ![image](https://user-images.githubusercontent.com/81079/95387905-b9aa0500-08f1-11eb-8d95-8b618d31d419.png)
    
    ![image](https://user-images.githubusercontent.com/81079/95388300-5bc9ed00-08f2-11eb-9ac9-b92cbdb60b89.png)
    
    cc rust-lang#43781
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    71b0ea6 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#77780 - calebcartwright:cast-expr-attr-span…

    …, r=oli-obk
    
    rustc_parse: fix spans on cast and range exprs with attrs
    
    Currently the span for cast and range expressions does not include the span of attributes associated to the lhs which is causing some issues for us in rustfmt.
    
    ```rust
    fn foo() -> i64 {
        #[attr]
        1u64 as i64
    }
    
    fn bar() -> Range<i32> {
        #[attr]
        1..2
    }
    ```
    
    This corrects the span for cast and range expressions to fully include the span of child nodes
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    9d8bf44 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#77935 - ssomers:btree_cleanup_1, r=Mark-Sim…

    …ulacrum
    
    BTreeMap: make PartialCmp/PartialEq explicit and tested
    
    Follow-up on a topic raised in rust-lang#77612
    
    r? @Mark-Simulacrum
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    b64b5fa View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#77980 - Manishearth:needs-drop-intra, r=jyn514

    Fix intra doc link for needs_drop
    
    It currently links to itself. Oops.
    
    r? @jyn514
    Dylan-DPC committed Oct 16, 2020
    Configuration menu
    Copy the full SHA
    e688b4d View commit details
    Browse the repository at this point in the history