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 8 pull requests #109538

Merged
merged 23 commits into from
Mar 23, 2023
Merged

Rollup of 8 pull requests #109538

merged 23 commits into from
Mar 23, 2023

Commits on Jan 17, 2023

  1. Explain the "no-error" io::Error case

    Fundamentally, querying the OS for error codes is a process
    that is deeply subject to the whims of chance and fortune.
    We can account for OS, but not for every combination of platform APIs.
    A compiled binary may not recognize new errors introduced years later.
    We should clarify a few especially odd situations, and what they mean:
    We can effectively promise nothing.
    
    This allows removing mention of ErrorKind::Uncategorized.
    That error variant is hidden quite deliberately, so we
    should not explicitly mention it.
    workingjubilee committed Jan 17, 2023
    Configuration menu
    Copy the full SHA
    2d927cc View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2023

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

Commits on Mar 1, 2023

  1. Add check for errant {{produces}} marker.

    If a lint example has an `ignore` tag, but the lint author also includes
    the {{produces}} marker, then the output will just contain the text
    `{{produces}}`. This adds a check for this mistake and provides help on
    how the lint docs should be written.
    ehuss committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    c6cba68 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    15450b1 View commit details
    Browse the repository at this point in the history
  3. Collect all matching messages for a lint.

    Some examples may contain multiple lines which trigger the lint.
    Previously it would only display the first message.
    This updates it so that all matching instances of the lint are displayed.
    ehuss committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    ab2508a View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2023

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

Commits on Mar 17, 2023

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

Commits on Mar 19, 2023

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

Commits on Mar 21, 2023

  1. Reduce output spam

    Zoxc committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    b0dc15c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f60d2eb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6c57dda View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. Configuration menu
    Copy the full SHA
    20f3f43 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    825f088 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e03b13c View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. Configuration menu
    Copy the full SHA
    2580348 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#106964 - workingjubilee:crouching-ioerror-h…

    …idden-documentation, r=ChrisDenton
    
    Clarify `Error::last_os_error` can be weird
    
    Fundamentally, querying the OS for error codes is a process that is deeply subject to the whims of chance and fortune. We can account for OS, but not for every combination of platform APIs. A compiled binary may not recognize new errors introduced years later. We should clarify a few especially odd situations, and what they mean: We can effectively promise nothing... if you ask for Rust to decode errors where none have occurred.
    
    This allows removing mention of ErrorKind::Uncategorized.
    That error variant is hidden deliberately, so we should not explicitly mention it.
    
    This fixes rust-lang#106937.
    
    Since you had an opinion also: Does this solution seem acceptable?
    r? ``@ChrisDenton``
    matthiaskrgr authored Mar 23, 2023
    Configuration menu
    Copy the full SHA
    aeabe34 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#107718 - Zoxc:z-time, r=nnethercote

    Add `-Z time-passes-format` to allow specifying a JSON output for `-Z time-passes`
    
    This adds back the `-Z time` option as that is useful for [my rustc benchmark tool](https://github.com/Zoxc/rcb), reverting rust-lang#102725. It now uses nanoseconds and bytes as the units so it is renamed to `time-precise`.
    matthiaskrgr authored Mar 23, 2023
    Configuration menu
    Copy the full SHA
    acd7f87 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#107880 - jieyouxu:issue-107563, r=petrochenkov

    Lint ambiguous glob re-exports
    
    Attempts to fix rust-lang#107563.
    
    We currently already emit errors for ambiguous re-exports when two names are re-exported *specifically*, i.e. not from glob exports. This PR attempts to emit deny-by-default lints for ambiguous glob re-exports.
    matthiaskrgr authored Mar 23, 2023
    Configuration menu
    Copy the full SHA
    bacf059 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#108549 - clubby789:fix-link-cfg-issue, r=eholk

    Remove issue number for `link_cfg`
    
    Fixes rust-lang#72059
    
    Per rust-lang#37406 and its [unstable book entry](https://doc.rust-lang.org/beta/unstable-book/language-features/link-cfg.html), this is an internal feature, and therefore perma-unstable and not being tracked
    matthiaskrgr authored Mar 23, 2023
    Configuration menu
    Copy the full SHA
    5a017d3 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#108588 - ehuss:lint-docs-produces, r=eholk

    Fix the ffi_unwind_calls lint documentation
    
    This fixes the [`ffi_unwind_calls`](https://doc.rust-lang.org/nightly/rustc/lints/listing/allowed-by-default.html#ffi-unwind-calls) documentation to show its output correctly. Currently it is showing the text `{{produces}}` which is not how it should look.
    
    This fixes it by not ignoring the example. I'm not sure why it was ignored, as the way the lint currently works it doesn't seem to require external linkage. This also fixes several mistakes in the example:
    
    * There is no `ffi_unwind_calls` feature.
    * Denies the lint (which is otherwise allow be default).
    * Removes the `mod impl` which is not valid Rust syntax, and doesn't appear to be needed anyways.
    
    The output now looks like:
    
    ```
    warning: call to foreign function with FFI-unwind ABI
      --> lint_example.rs:10:14
       |
    10 |     unsafe { foo(); }
       |              ^^^^^ call to foreign function with FFI-unwind ABI
       |
    note: the lint level is defined here
      --> lint_example.rs:2:9
       |
    2  | #![warn(ffi_unwind_calls)]
       |         ^^^^^^^^^^^^^^^^
    
    warning: call to function pointer with FFI-unwind ABI
      --> lint_example.rs:12:14
       |
    12 |     unsafe { ptr(); }
       |              ^^^^^ call to function pointer with FFI-unwind ABI
    
    ```
    
    This also includes some updates to the lint-docs tool to help with this issue:
    
    * Adds a check if a lint documentation has `{{produces}}` with an ignored example, and generates an error.
    * All instances of a lint are now displayed. Previously it only showed the first time the lint fires. Some examples may trigger a lint multiple times, and they are all now displayed.
    matthiaskrgr authored Mar 23, 2023
    Configuration menu
    Copy the full SHA
    fc5516b View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#109231 - Zoxc:fs-non-canon, r=eholk

    Add `try_canonicalize` to `rustc_fs_util` and use it over `fs::canonicalize`
    
    This adds `try_canonicalize` which tries to call `fs::canonicalize`, but falls back to `std::path::absolute` if it fails. Existing `canonicalize` calls are replaced with it. `fs::canonicalize` is not guaranteed to work on Windows.
    matthiaskrgr authored Mar 23, 2023
    Configuration menu
    Copy the full SHA
    2a39cf5 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#109472 - MU001999:patch-3, r=eholk

    Add parentheses properly for method calls
    
    Fixes rust-lang#109436
    matthiaskrgr authored Mar 23, 2023
    Configuration menu
    Copy the full SHA
    dddede4 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#109487 - GuillaumeGomez:move-useless-reexpo…

    …rt-check, r=petrochenkov
    
    Move useless_anynous_reexport lint into unused_imports
    
    As mentioned in rust-lang#109003, this check should have been merged with `unused_imports` in the start.
    
    r? `@petrochenkov`
    matthiaskrgr authored Mar 23, 2023
    Configuration menu
    Copy the full SHA
    3961ef5 View commit details
    Browse the repository at this point in the history