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 7 pull requests #82688

Merged
merged 23 commits into from
Mar 2, 2021
Merged

Commits on Feb 27, 2021

  1. Configuration menu
    Copy the full SHA
    9f1abe8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    25e030b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5ab4d46 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2021

  1. Configuration menu
    Copy the full SHA
    2f8fa01 View commit details
    Browse the repository at this point in the history
  2. Bless some tests

    SkiFire13 committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    6214ef8 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2021

  1. Always compile rustdoc with debug logging enabled when `download-rust…

    …c` is set
    
    Previously, logging at DEBUG or below would always be silenced, because
    rustc compiles tracing with the `static_max_level_info` feature. That
    makes sense for release artifacts, but not for developing rustdoc.
    
    Instead, this compiles two different versions of tracing: one in the
    release artifacts, distributed in the sysroot, and a new version
    compiled by rustdoc. Since `rustc_driver` is always linked to the
    version of sysroot, this copy/pastes `init_env_logging` into rustdoc.
    
    The builds the second version of tracing unconditionally; see the code
    for details on why.
    jyn514 committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    65f0b25 View commit details
    Browse the repository at this point in the history
  2. Remove deleted pass from rustdoc test suite

    `src/test/rustdoc-ui/deprecated-attrs.rs`
    tells rustdoc to run the `collapse-docs` pass, which no longer exists
    (it was removed in rust-lang#80261).
    Rustdoc doesn't actually give a proper diagnostic here; instead it
    prints an `error!` log. Now that tracing is compiled unconditionally,
    the log is now being emitted by default, because it's at the error
    level.
    
    rustdoc shouldn't be using `error!` logging for diagnostics in the first
    place, but in the meantime this change gets the testsuite to pass.
    jyn514 committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    6dc9934 View commit details
    Browse the repository at this point in the history
  3. Remove the dummy cache in DocContext

    The same information is available everywhere; the only reason the dummy
    cache was needed is because it waas previously stored in three different
    places. This consolidates the info a bit so the cache in `DocContext` is
    used throughout. As a bonus, it means `renderinfo` is used much much
    less.
    
    - Return a `Cache` from `run_global_ctxt`, not `RenderInfo`
    - Remove the unused `render_info` from `run_renderer`
    - Remove RefCell around `inlined`
    - Add intra-doc links
    jyn514 committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    4d7a648 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    163b01a View commit details
    Browse the repository at this point in the history
  5. Remove krate.version; fix crate_version in JSON

    Previously, `JsonRenderer::after_krate` called `krate.version.clone()`.
    The problem was it did that after the version was already moved into the
    cache, so it would always be None. The fix was to get the version from
    the cache instead.
    jyn514 committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    be069a6 View commit details
    Browse the repository at this point in the history
  6. Add regression test

    SkiFire13 committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    3c63f67 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5a33f53 View commit details
    Browse the repository at this point in the history
  8. Change twice used large const table to static

    This table is used twice in core::num::dec2flt::algorithm::power_of_ten.
    According to the semantics of const, a separate huge definition of the
    table is inlined at both places.
    
        fn power_of_ten(e: i16) -> Fp {
            assert!(e >= table::MIN_E);
            let i = e - table::MIN_E;
            let sig = table::POWERS.0[i as usize];
            let exp = table::POWERS.1[i as usize];
            Fp { f: sig, e: exp }
        }
    
    Theoretically this gets cleaned up by optimization passes, but in
    practice I am experiencing a miscompile from LTO on this code. Making
    the table a static, which would only be defined a single time and not
    require attention from LTO, eliminates the miscompile and seems
    semantically more appropriate anyway. A separate bug report on the LTO
    bug is forthcoming.
    dtolnay committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    bd51dea View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b0b330f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f6de130 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d20fd62 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#80734 - abonander:ab/issue-66693, r=oli-obk

    check that first arg to `panic!()` in const is `&str`
    
    closes rust-lang#66693
    
    ~~TODO: regression test~~
    
    cc `@RalfJung` for error message wording
    GuillaumeGomez authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    865cf0c View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#81932 - jyn514:rustdoc-logging, r=Mark-Simu…

    …lacrum
    
    Always compile rustdoc with debug logging enabled when `download-rustc` is set
    
    Previously, logging at DEBUG or below would always be silenced, because
    rustc compiles tracing with the `static_max_level_info` feature. That
    makes sense for release artifacts, but not for developing rustdoc.
    
    Instead, this compiles two different versions of tracing: one in the
    release artifacts, distributed in the sysroot, and a new version
    compiled by rustdoc. Since `rustc_driver` is always linked to the
    version of sysroot, this copy/pastes `init_env_logging` into rustdoc.
    
    To avoid compiling an unnecessary version of tracing when
    `download-rustc` isn't set, this adds a new `using-ci-artifacts`
    feature for rustdoc and passes that feature in bootstrap.
    
    Addresses rust-lang#81930. This builds on rust-lang#79540.
    
    r? `@Mark-Simulacrum`
    GuillaumeGomez authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    22ebb86 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#82018 - jyn514:no-dummy-cache, r=camelid,Gu…

    …illaumeGomez
    
    Remove the dummy cache in `DocContext`; delete RenderInfo
    
    The same information is available everywhere; the only reason the dummy
    cache was needed is because it was previously stored in three different
    places. This consolidates the info a bit so the cache in `DocContext` is
    used throughout. As a bonus, it also completely removes `RenderInfo`.
    
    - Return a `Cache` from `run_global_ctxt`, not `RenderInfo`
    - Remove the unused `render_info` from `run_renderer`
    - Remove RenderInfo altogether
    
    Helps with rust-lang#82014. The next step is to move the `populate()` call before the `collect_intra_doc_links` pass, which currently breaks because a) lots of the cache is populated in early passes, and b) intra_doc_links itself sets some info with `register_res`. I'm working on separate PR for that to avoid making too many big changes at once.
    
    r? `@GuillaumeGomez`
    GuillaumeGomez authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    b51272e View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#82598 - GuillaumeGomez:rustdoc-rustc-pass, …

    …r=jyn514
    
    Check stability and feature attributes in rustdoc
    
    Fixes rust-lang#82588.
    
    cc `@Nemo157` `@camelid`
    r? `@jyn514`
    GuillaumeGomez authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    5a82251 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#82655 - SkiFire13:fix-issue-81314, r=estebank

    Highlight identifier span instead of whole pattern span in `unused` lint
    
    Fixes rust-lang#81314
    
    This pretty much just changes the span highlighted in the lint from `pat_sp` to `ident.span`. There's however an exception, which is in patterns with shorthands like `Point { y, ref mut x }`, where a suggestion to change just `x` would be invalid; in those cases I had to keep the pattern span. Another option would be suggesting something like `Point { y, x: ref mut _x }`.
    
    I also added a new test since there weren't any test that checked the `unused` lint with optional patterns.
    GuillaumeGomez authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    d259d1d View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#82662 - GuillaumeGomez:doc-attr-check, r=jy…

    …n514
    
    Warn about unknown doc attributes
    
    Fixes rust-lang#82652.
    
    For the text error, I decided to go for "invalid" instead of "unknown". What do you think?
    
    r? `@jyn514`
    GuillaumeGomez authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    0c6b69a View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#82676 - dtolnay:powers, r=Mark-Simulacrum

    Change twice used large const table to static
    
    This table is used twice in core::num::dec2flt::algorithm::power_of_ten. According to the semantics of const, a separate huge definition of the table is inlined at both places.
    
    https://github.com/rust-lang/rust/blob/5233edcf1c7ee70ac25e4ec1115c3546f53d8a2d/library/core/src/num/dec2flt/algorithm.rs#L16-L22
    
    Theoretically this gets cleaned up by optimization passes, but in practice I am experiencing a miscompile from LTO on this code. Making the table a static, which would only be defined a single time and not require attention from LTO, eliminates the miscompile and seems semantically more appropriate anyway. A separate bug report on the LTO bug is forthcoming.
    
    Original addition of `const` is from rust-lang#27307.
    GuillaumeGomez authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    9a0ac7c View commit details
    Browse the repository at this point in the history