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 11 pull requests #80350

Closed
wants to merge 33 commits into from

Commits on Dec 5, 2020

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

    GuillaumeGomez committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    9b62936 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2020

  1. Refactored verbose print into a function

    Also handle Tuple and Array separately, which was not explicitly checked.
    
    Fixes rust-lang#79799.
    hencrice committed Dec 13, 2020
    Configuration menu
    Copy the full SHA
    b66eb69 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2020

  1. Add a new lint to rustdoc for invalid codeblocks

    This will make rustdoc behave properly when -Dwarnings is given
    poliorcetics committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    0e0ae47 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2020

  1. Remap instrument-coverage line numbers in doctests

    This uses the `SourceMap::doctest_offset_line` method to re-map line
    numbers from doctests. Remapping columns is not yet done.
    
    Part of issue rust-lang#79417.
    Swatinem committed Dec 19, 2020
    Configuration menu
    Copy the full SHA
    830ceaa View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2020

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

Commits on Dec 21, 2020

  1. Configuration menu
    Copy the full SHA
    087101e View commit details
    Browse the repository at this point in the history
  2. Implemented a compiler diagnostic for move async mistake

    Ran the tidy check
    
    Following the diagnostic guide better
    
    Diagnostic generation is now relegated to its own function in the diagnostics module.
    Added tests
    
    Fixed the ui test
    diondokter committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    a272d62 View commit details
    Browse the repository at this point in the history
  3. Rename rustc_middle::lint::LintSource

    Rename rustc_middle::lint::LintSource to rustc_middle::lint::LintLevelSource.
    pierwill committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    aec3575 View commit details
    Browse the repository at this point in the history
  4. Document rustc_middle::lint::LevelSource

    This is to clarify the difference between `LevelSource`
    and `LintLevelSource`.
    
    Appease x.py fmt.
    pierwill committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    d3900d3 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2020

  1. Configuration menu
    Copy the full SHA
    163f5da View commit details
    Browse the repository at this point in the history
  2. Revert "Remove missing_fragment_specifier lint"

    This reverts commit 5ba9610.
    wesleywiser committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    9414f0b View commit details
    Browse the repository at this point in the history
  3. Revert "Promote missing_fragment_specifier to hard error"

    This reverts commit 02eae43.
    wesleywiser committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    f1eb88b View commit details
    Browse the repository at this point in the history
  4. Add example to lint docs

    wesleywiser committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    56154a1 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2020

  1. Configuration menu
    Copy the full SHA
    a6d377d View commit details
    Browse the repository at this point in the history
  2. Exclude unnecessary info from CodegenResults

    `foreign_module` and `wasm_import_module` are not needed for linking,
    and hence can be removed from CodegenResults.
    Victor Ding committed Dec 23, 2020
    Configuration menu
    Copy the full SHA
    732afd4 View commit details
    Browse the repository at this point in the history
  3. Add a test that rustc compiles and links separately

    Victor Ding committed Dec 23, 2020
    Configuration menu
    Copy the full SHA
    e8a564e View commit details
    Browse the repository at this point in the history
  4. Improvements to NatVis support

    NatVis files describe how to display types in some Windows debuggers,
    such as Visual Studio, WinDbg, and VS Code.
    
    This commit makes several improvements:
    
    * Adds visualizers for Rc<T>, Weak<T>, and Arc<T>.
    
    * Changes [size] to [len], for consistency with the Rust API.
      Visualizers often use [size] to mirror the size() method on C++ STL
      collections.
    
    * Several visualizers used the PVOID and ULONG typedefs. These are part
      of the Windows API; they are not guaranteed to always be defined in a
      pure Rust DLL/EXE. I converted PVOID to `void*` and `ULONG` to
      `unsigned long`.
    
    * Cosmetic change: Removed {} braces around the visualized display
      for `Option` types. They now display simply as `Some(value)` or
      `None`, which reflects what is written in source code.
    
    * The visualizer for `alloc::string::String` makes assumptions about
      the layout of `String` (it casts `String*` to another type), rather
      than using symbolic expressions. This commit changes the visualizer
      so that it simply uses symbolic expressions to access the string
      data and string length.
    Arlie Davis committed Dec 23, 2020
    Configuration menu
    Copy the full SHA
    1a30823 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    619c200 View commit details
    Browse the repository at this point in the history
  6. Addressed feedbacks

    Also updated the mir-opt test output files.
    hencrice committed Dec 23, 2020
    Configuration menu
    Copy the full SHA
    f459b0f View commit details
    Browse the repository at this point in the history
  7. Fixed formatting

    hencrice committed Dec 23, 2020
    Configuration menu
    Copy the full SHA
    ecba49c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    152d4e7 View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2020

  1. Rollup merge of rust-lang#79742 - GuillaumeGomez:move-tooltips-messag…

    …es-out-of-html, r=Nemo157
    
    Move tooltips messages out of html
    
    First thing first: nothing in the output has changed. You still have the "i" on the left of code blocks examples when they have `ignore`, `compile_fail`, `should_panic` and `edition`. The behavior also remains the same: when you hover the "i", you have the corresponding message showing up.
    
    So now, why this PR then? I realized recently that we were actually generating those messages into the HTML every time whereas all messages are the same (except for the edition ones, I'll come back to it later). So instead of generating more content, I simply moved it inside the CSS thanks to pseudo elements (`::before` and `::after`). The message is now inside `::after` and we use the `::before` to have the small triangle on the left of the message. So now, we have less HTML generated which is seems pretty nice.
    
    So now, back to the `edition` change: the message is globally the same, but the "edition" itself can be different (2015 or 2018 currently, I expect 2021 to arrive not too far in the future). So the only difference for it is that I added a new attribute on the tooltip called `edition` which contains this information. Then, the `::after` uses it inside its `content` (you can get the content of an element's attribute by using `attr` and concat different strings by simply having them after the other).
    
    Don't hesitate if a part of my explanations isn't clear.
    
    r? ``@jyn514``
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    9a043da View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#79762 - Swatinem:remap-doctest-coverage, r=…

    …Swatinem
    
    Remap instrument-coverage line numbers in doctests
    
    This uses the `SourceMap::doctest_offset_line` method to re-map line
    numbers from doctests. Remapping columns is not yet done, and rustdoc
    still does not output the correct filename when running doctests in a
    workspace.
    
    Part of rust-lang#79417 although I dont consider that fixed until both filenames
    and columns are mapped correctly.
    
    r? ``@richkadel``
    
    I might jump on zulip the comming days. Still need to figure out how to properly write tests for this, and deal with other doctest issues in the meantime.
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    3a2086e View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#79816 - poliorcetics:rustdoc-fail-on-deny, …

    …r=jyn514
    
    Declare a new lint to properly deny warnings in rustdoc
    
    This declares a new lint: `INVALID_RUST_CODEBLOCK` that is used by `rustdoc` to properly follow `-D warnings` instead of unconditionally emitting a warning.
    
    ## Todo List
    
    - [x] Declare lint.
    - [x] Document lint (file: `src/doc/rustdoc/src/lints.md`).
    - [x] Use lint in `rustdoc` (file: `src/librustdoc/passes/check_code_block_syntax.rs`, maybe others).
    - [x] Write tests.
      - [x] Note: one for the behaviour of the new lint when the error is in a dependency, not the crate being tested (rust-lang#79816 (comment))
    - [x] Refactor things.
    
    ## Questions
    
    - How/where are lints tested ?
    - Where are lints for `rustdoc` tested ?
    
    Fix rust-lang#79792.
    
    ``@rustbot`` label T-rustdoc A-lint
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    9816b29 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#79999 - hencrice:yenlinc/79799, r=oli-obk

    Refactored verbose print into a function
    
    Also handle Tuple and Array separately, which was not explicitly checked.
    
    Fixes rust-lang#79799.
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    77dc8d2 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#80160 - diondokter:move_async_fix, r=davidtwco

    Implemented a compiler diagnostic for move async mistake
    
    Fixes rust-lang#79694
    
    First time contributing, so I hope I'm doing everything right.
    (If not, please correct me!)
    
    This code performs a check when a move capture clause is parsed. The check is to detect if the user has reversed the async move keywords and to provide a diagnostic with a suggestion to fix it.
    
    Checked code:
    ```rust
    fn main() {
        move async { };
    }
    ```
    
    Previous output:
    ```txt
    PS C:\Repos\move_async_test> cargo build
       Compiling move_async_test v0.1.0 (C:\Repos\move_async_test)
    error: expected one of `|` or `||`, found keyword `async`
     --> src\main.rs:2:10
      |
    2 |     move async { };
      |          ^^^^^ expected one of `|` or `||`
    
    error: aborting due to previous error
    
    error: could not compile `move_async_test`
    ```
    
    New output:
    ```txt
    PS C:\Repos\move_async_test> cargo +dev build
       Compiling move_async_test v0.1.0 (C:\Repos\move_async_test)
    error: the order of `move` and `async` is incorrect
     --> src\main.rs:2:13
      |
    2 |     let _ = move async { };
      |             ^^^^^^^^^^
      |
    help: try switching the order
      |
    2 |     let _ = async move { };
      |             ^^^^^^^^^^
    
    error: aborting due to previous error
    
    error: could not compile `move_async_test`
    ```
    
    Is there a file/module where these kind of things are tested?
    Would love some feedback 😄
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    e97321e View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#80187 - 0dvictor:nativelib, r=bjorn3

    Exclude unnecessary info from CodegenResults
    
    `foreign_module` and `wasm_import_module` are not needed for linking, and hence can be removed from CodegenResults.
    
    Fixes rust-lang#77857
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    22d4da8 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#80274 - pierwill:lintlevelsource, r=petroch…

    …enkov
    
    Rename rustc_middle::lint::LintSource
    
    Rename [`rustc_middle::lint::LintSource`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/lint/enum.LintSource.html) to `rustc_middle::lint::LintLevelSource`.
    
    This enum represents the source of a *lint level*, not a lint. This should improve code readability.
    
    Update: Also documents `rustc_middle::lint::LevelSource` to clarify.
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    a864212 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#80280 - pierwill:x-readme, r=Mark-Simulacrum

    Add installation commands to `x` tool README
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    8d1ad54 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#80296 - wesleywiser:revert_missing_fragment…

    …_specifier_hard_error, r=Mark-Simulacrum
    
    Revert missing fragment specifier hard error
    
    Closes rust-lang#76605
    
    Reopens rust-lang#40107
    
    r? `@Mark-Simulacrum`
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    2f3f5f0 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#80311 - sivadeilra:natvis, r=petrochenkov

    Improvements to NatVis support
    
    NatVis files describe how to display types in some Windows debuggers,
    such as Visual Studio, WinDbg, and VS Code.
    
    This commit makes several improvements:
    
    * Adds visualizers for Rc<T>, Weak<T>, and Arc<T>.
    
    * Changes [size] to [len], for consistency with the Rust API.
      Visualizers often use [size] to mirror the size() method on C++ STL
      collections.
    
    * Several visualizers used the PVOID and ULONG typedefs. These are part
      of the Windows API; they are not guaranteed to always be defined in a
      pure Rust DLL/EXE. I converted PVOID to `void*` and `ULONG` to
      `unsigned long`.
    
    * Cosmetic change: Removed {} braces around the visualized display
      for `Option` types. They now display simply as `Some(value)` or
      `None`, which reflects what is written in source code.
    
    * The visualizer for `alloc::string::String` makes assumptions about
      the layout of `String` (it casts `String*` to another type), rather
      than using symbolic expressions. This commit changes the visualizer
      so that it simply uses symbolic expressions to access the string
      data and string length.
    
    * The visualizers for `str` and `String` now place the character data
      array under a synthetic `[chars]` node. When expanding a `String`
      node, users rarely want to see an array of characters. This just places
      them behind one expansion node / level.
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    001b889 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#80316 - ehuss:rustdoc-index, r=Mark-Simulacrum

    Include rustdoc in the compiler docs index.
    
    This should help ensure that the index page at https://doc.rust-lang.org/nightly/nightly-rustc/ includes a link to the rustdoc docs as well.
    
    Fixes rust-lang#80307
    Dylan-DPC committed Dec 24, 2020
    Configuration menu
    Copy the full SHA
    ffda29c View commit details
    Browse the repository at this point in the history