diff options
| author | bors <bors@rust-lang.org> | 2023-04-26 18:32:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-26 18:32:57 +0000 |
| commit | 1c42cb4ef0544fbfaa500216e53382d6b079c001 (patch) | |
| tree | b5a83a2da88f666ea99a61dcb91a8c0a6fd29cef /compiler/rustc_parse/src/errors.rs | |
| parent | 9c044d77a334609513f3b615e0763a40cc02424d (diff) | |
| parent | 63bccced0c96d52ff10ed35eb81abf712aaf7bc1 (diff) | |
| download | rust-1c42cb4ef0544fbfaa500216e53382d6b079c001.tar.gz rust-1c42cb4ef0544fbfaa500216e53382d6b079c001.zip | |
Auto merge of #110852 - matthiaskrgr:rollup-jz3eosr, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #108760 (Add lint to deny diagnostics composed of static strings) - #109444 (Change tidy error message for TODOs) - #110419 (Spelling library) - #110550 (Suggest deref on comparison binop RHS even if type is not Copy) - #110641 (Add new rustdoc book chapter to describe in-doc settings) - #110798 (pass `unused_extern_crates` in `librustdoc::doctest::make_test`) - #110819 (simplify TrustedLen impls) - #110825 (diagnostics: add test case for already-solved issue) - #110835 (Make some region folders a little stricter.) - #110847 (rustdoc-json: Time serialization.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 069217165fa..b0e1189851a 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -2332,3 +2332,92 @@ pub(crate) struct BadReturnTypeNotationDotDot { #[suggestion(code = "", applicability = "maybe-incorrect")] pub span: Span, } + +#[derive(Diagnostic)] +#[diag(parse_bad_assoc_type_bounds)] +pub(crate) struct BadAssocTypeBounds { + #[primary_span] + #[label] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(parse_attr_after_generic)] +pub(crate) struct AttrAfterGeneric { + #[primary_span] + #[label] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(parse_attr_without_generics)] +pub(crate) struct AttrWithoutGenerics { + #[primary_span] + #[label] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(parse_where_generics)] +pub(crate) struct WhereOnGenerics { + #[primary_span] + #[label] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(parse_generics_in_path)] +pub(crate) struct GenericsInPath { + #[primary_span] + pub span: Vec<Span>, +} + +#[derive(Diagnostic)] +#[diag(parse_assoc_lifetime)] +#[help] +pub(crate) struct AssocLifetime { + #[primary_span] + pub span: Span, + #[label] + pub lifetime: Span, +} + +#[derive(Diagnostic)] +#[diag(parse_tilde_const_lifetime)] +pub(crate) struct TildeConstLifetime { + #[primary_span] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(parse_maybe_lifetime)] +pub(crate) struct MaybeLifetime { + #[primary_span] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(parse_parenthesized_lifetime)] +pub(crate) struct ParenthesizedLifetime { + #[primary_span] + pub span: Span, + #[suggestion(style = "short", applicability = "machine-applicable", code = "{snippet}")] + pub sugg: Option<Span>, + pub snippet: String, +} + +#[derive(Diagnostic)] +#[diag(parse_const_bounds_missing_tilde)] +pub(crate) struct ConstMissingTilde { + #[primary_span] + pub span: Span, + #[suggestion(code = "~", applicability = "machine-applicable")] + pub start: Span, +} + +#[derive(Diagnostic)] +#[diag(parse_underscore_literal_suffix)] +pub(crate) struct UnderscoreLiteralSuffix { + #[primary_span] + pub span: Span, +} |
