-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 #119837
Rollup of 11 pull requests #119837
Conversation
Add a description of a version-sorting algorithm. (This algorithm does not precisely match `strverscmp`; it's intentionally simpler in its handling of leading zeroes, and produces a result easier for humans to easily understand and do by hand.) Change all references to sorting to use version-sorting. Change all references to "ASCIIbetically" to instead say "sort non-lowercase before lowercase".
Treat numeric chunks with equal value but differing numbers of leading zeroes as equal, unless we get to the end of the entire string in which case we use "more leading zeroes in the earliest differing chunk" as a tiebreaker. Treat `_` as a word separator, sorting it before anything other than space. Give more examples.
Co-authored-by: Michael Goulet <michael@errs.io>
Also provide a mechanism to retrieve traits and implementations for a given crate.
Closes rust-lang#96469 @rustbot +T-libs-api
Because the values put into it are functions named `track_diagnostic` and `default_track_diagnostic`.
`is_force_warn` is only possible for diagnostics with `Level::Warning`, but it is currently stored in `Diagnostic::code`, which every diagnostic has. This commit: - removes the boolean `DiagnosticId::Lint::is_force_warn` field; - adds a `ForceWarning` variant to `Level`. Benefits: - The common `Level::Warning` case now has no arguments, replacing lots of `Warning(None)` occurrences. - `rustc_session::lint::Level` and `rustc_errors::Level` are more similar, both having `ForceWarning` and `Warning`.
It's missing but should obviously be included.
To put it next to a similar field.
There are four functions that adjust error and warning counts: - `stash_diagnostic` (increment) - `steal_diagnostic` (decrement) - `emit_stashed_diagnostics) (decrement) - `emit_diagnostic` (increment) The first three all behave similarly, and only update `warn_count` for forced warnings. But the last one updates `warn_count` for both forced and non-forced warnings. Seems like a bug. How should it be fixed? Well, `warn_count` is only used in one place: `DiagCtxtInner::drop`, where it's part of the condition relating to the printing of `good_path_delayed_bugs`. The intention of that condition seems to be "have any errors been printed?" so this commit replaces `warn_count` with `has_printed`, which is set when printing occurs. This is simpler than all the ahead-of-time incrementing and decrementing.
Of the error levels satisfying `is_error`, `Level::Error` is the only one that can be a lint, so there's no need to check for it. (And even if it wasn't, it would make more sense to include non-`Error`-but-`is_error` lints under `lint_err_count` than under `err_count`.)
IANA explicitly documents 192.0.0.9/32, 192.0.0.9/32 and 2001:30::/28 as globally reachable[1][2] and the is_global implementations declare following IANA so let's make this happen. In case of 2002::/16 IANA says N/A so I think it's safe to say we shouldn't return true there either. [1] https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml [2] https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
…rors Use version-sorting for all sorting Add a description of a version-sorting algorithm. (This algorithm does not precisely match `strverscmp`; it's intentionally simpler in its handling of leading zeroes, and produces a result easier for humans to easily understand and do by hand.) Change all references to sorting to use version-sorting. Change all references to "ASCIIbetically" to instead say "sort non-lowercase before lowercase".
Add some comments, add `can_define_opaque_ty` check to `try_normalize_ty_recur` Follow-up from rust-lang#117278, since I was recently re-reviewing this code.
…oli-obk Cleanup things in and around `Diagnostic` These changes all arose when I was looking closely at how to simplify `DiagCtxtInner::emit_diagnostic`. r? `@compiler-errors`
change function name in comments fixes rust-lang#119787 where I believe an incorrect function name is used in the comments
Fix all_trait* methods to return all traits available in StableMIR Also provide a mechanism to retrieve traits and implementations for a given crate. This fixes rust-lang/project-stable-mir#37
…, r=compiler-errors Silence some follow-up errors [1/x] this is one piece of the requested cleanups from rust-lang#117449 When we use `-> impl SomeTrait<_>` as a return type, we are both using the "infer return type suggestion" code path, and the infer opaque type code path within the same function. That can lead to confusing diagnostics, so silence all opaque type diagnostics in that case.
…iper Stabilize mutex_unpoison feature Closes rust-lang#96469 `@rustbot` +T-libs-api
…bot, r=compiler-errors Meta: Add project const traits to triagebot config r? compiler-errors or project-const-traits
@bors r+ rollup=never p=11 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 0a8923361e In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (65b323b): 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 667.616s -> 668.141s (0.08%) |
Successful merges:
can_define_opaque_ty
check totry_normalize_ty_recur
#118915 (Add some comments, addcan_define_opaque_ty
check totry_normalize_ty_recur
)Diagnostic
#119763 (Cleanup things in and aroundDiagnostic
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup