-
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 5 pull requests #98970
Rollup of 5 pull requests #98970
Commits on Jul 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e3d6320 - Browse repository at this point
Copy the full SHA e3d6320View commit details
Commits on Jul 5, 2022
-
macros: fix documentation link for diag derive
Signed-off-by: David Wood <david.wood@huawei.com>
Configuration menu - View commit details
-
Copy full SHA for 84ec777 - Browse repository at this point
Copy the full SHA 84ec777View commit details -
lint:
LintDiagnosticBuilder
intorustc_errors
Signed-off-by: David Wood <david.wood@huawei.com>
Configuration menu - View commit details
-
Copy full SHA for 2874f09 - Browse repository at this point
Copy the full SHA 2874f09View commit details -
errors: introduce
DecorateLint
Add a new trait to be generated by diagnostic derives which uses a `LintDiagnosticBuilder`. Signed-off-by: David Wood <david.wood@huawei.com>
Configuration menu - View commit details
-
Copy full SHA for 540eaf9 - Browse repository at this point
Copy the full SHA 540eaf9View commit details -
macros: introduce
build_field_mapping
Move the logic for building a field mapping (which is used by the building of format strings in `suggestion` annotations) into a helper function. Signed-off-by: David Wood <david.wood@huawei.com>
Configuration menu - View commit details
-
Copy full SHA for 406579a - Browse repository at this point
Copy the full SHA 406579aView commit details -
macros: move
sess
out of builder`sess` field of `SessionDiagnosticDeriveBuilder` is never actually used in the builder's member functions, so it doesn't need to be a field. Signed-off-by: David Wood <david.wood@huawei.com>
Configuration menu - View commit details
-
Copy full SHA for 7f9d848 - Browse repository at this point
Copy the full SHA 7f9d848View commit details -
macros: add diagnostic derive for lints
`SessionDiagnostic` isn't suitable for use on lints as whether or not it creates an error or a warning is decided at compile-time by the macro, whereas lints decide this at runtime based on the location of the lint being reported (as it will depend on the user's `allow`/`deny` attributes, etc). Re-using most of the machinery for `SessionDiagnostic`, this macro introduces a `LintDiagnostic` derive which implements a `DecorateLint` trait, taking a `LintDiagnosticBuilder` and adding to the lint according to the diagnostic struct.
Configuration menu - View commit details
-
Copy full SHA for 9d864c8 - Browse repository at this point
Copy the full SHA 9d864c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 974b1e3 - Browse repository at this point
Copy the full SHA 974b1e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4687afa - Browse repository at this point
Copy the full SHA 4687afaView commit details
Commits on Jul 6, 2022
-
fix typo in note about multiple inaccessible type aliases
Mainly intended as a small typo fix ("aliass" -> "aliases") for the case where a type cannot be found in scope, and there are multiple inaccessible type aliases that match the missing type. In general this change would use the correct plural form in this scenario for words that end with 's'.
Configuration menu - View commit details
-
Copy full SHA for 503c669 - Browse repository at this point
Copy the full SHA 503c669View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f867c5 - Browse repository at this point
Copy the full SHA 8f867c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a1a718 - Browse repository at this point
Copy the full SHA 2a1a718View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3162986 - Browse repository at this point
Copy the full SHA 3162986View commit details -
Rollup merge of rust-lang#98881 - cjgillot:q-def-kind, r=fee1-dead
Only compute DefKind through the query.
Configuration menu - View commit details
-
Copy full SHA for 707c0d9 - Browse repository at this point
Copy the full SHA 707c0d9View commit details -
Rollup merge of rust-lang#98884 - davidtwco:translation-on-lints-deri…
…ve, r=oli-obk macros: `LintDiagnostic` derive - Move `LintDiagnosticBuilder` into `rustc_errors` so that a diagnostic derive can refer to it. - Introduce a `DecorateLint` trait, which is equivalent to `SessionDiagnostic` or `AddToDiagnostic` but for lints. Necessary without making more changes to the lint infrastructure as `DecorateLint` takes a `LintDiagnosticBuilder` and re-uses all of the existing logic for determining what type of diagnostic a lint should be emitted as (e.g. error/warning). - Various refactorings of the diagnostic derive machinery (extracting `build_field_mapping` helper and moving `sess` field out of the `DiagnosticDeriveBuilder`). - Introduce a `LintDiagnostic` derive macro that works almost exactly like the `SessionDiagnostic` derive macro except that it derives a `DecorateLint` implementation instead. A new derive is necessary for this because `SessionDiagnostic` is intended for when the generated code creates the diagnostic. `AddToDiagnostic` could have been used but it would have required more changes to the lint machinery. ~~At time of opening this pull request, ignore all of the commits from rust-lang#98624, it's just the last few commits that are new.~~ r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for df1f415 - Browse repository at this point
Copy the full SHA df1f415View commit details -
Rollup merge of rust-lang#98964 - RalfJung:typo, r=Dylan-DPC
fix typo in function name I don't know what I was doing when I named that function... follow-up to rust-lang#98888 r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for 56667b5 - Browse repository at this point
Copy the full SHA 56667b5View commit details -
Rollup merge of rust-lang#98967 - ClementTsang:fix_inaccessible_type_…
…alias_plural_typo, r=lcnr fix typo in note about multiple inaccessible type aliases Mainly intended as a small typo fix ("aliass" -> "aliases") for the case where a type cannot be found in scope but there are multiple inaccessible type aliases that match the missing type. In general this change would use the correct plural form in this scenario for base words that end with 's'.
Configuration menu - View commit details
-
Copy full SHA for 41e30e3 - Browse repository at this point
Copy the full SHA 41e30e3View commit details -
Rollup merge of rust-lang#98968 - RalfJung:scalar-sanity, r=oli-obk
assert Scalar sanity With rust-lang#96814 having landed, finally our `Scalar` layouts have the invariants they deserve. :)
Configuration menu - View commit details
-
Copy full SHA for 7f62a71 - Browse repository at this point
Copy the full SHA 7f62a71View commit details