-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 8 pull requests #109538
Conversation
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.
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.
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.
…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``
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`.
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.
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
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.
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.
Add parentheses properly for method calls Fixes rust-lang#109436
…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`
@bors r+ rollup=never p=8 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: e216300876 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (1459b31): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
Successful merges:
Error::last_os_error
can be weird #106964 (ClarifyError::last_os_error
can be weird)-Z time-passes-format
to allow specifying a JSON output for-Z time-passes
#107718 (Add-Z time-passes-format
to allow specifying a JSON output for-Z time-passes
)link_cfg
#108549 (Remove issue number forlink_cfg
)try_canonicalize
torustc_fs_util
and use it overfs::canonicalize
#109231 (Addtry_canonicalize
torustc_fs_util
and use it overfs::canonicalize
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup