diff options
| author | bors <bors@rust-lang.org> | 2022-12-14 09:33:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-14 09:33:57 +0000 |
| commit | 7bdda8f801818c1e9455725a964a3fa4f02c2bb8 (patch) | |
| tree | f268342a5b1928e4db7774273cbce7be199e45e2 /compiler/rustc_parse/src/errors.rs | |
| parent | dc30b92cc576ed9e097db7fece0af13662de8d8d (diff) | |
| parent | 01469693de40f8318766904278f3ad21f7a7db75 (diff) | |
| download | rust-7bdda8f801818c1e9455725a964a3fa4f02c2bb8.tar.gz rust-7bdda8f801818c1e9455725a964a3fa4f02c2bb8.zip | |
Auto merge of #105686 - matthiaskrgr:rollup-bedfk3j, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #103644 (Add docs for question mark operator for Option) - #105161 (Refine when invalid prefix case error arises) - #105491 (Illegal sized bounds: only suggest mutability change if needed) - #105502 (Suggest impl in the scenario of typo with fn) - #105523 (Suggest `collect`ing into `Vec<_>`) - #105595 (Suggest dereferencing receiver arguments properly) - #105611 (fold instead of obliterating args) 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 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 9875cde4a05..18a0bee9c2e 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -1221,3 +1221,11 @@ pub(crate) struct UnexpectedIfWithIf( #[suggestion(applicability = "machine-applicable", code = " ", style = "verbose")] pub Span, ); + +#[derive(Diagnostic)] +#[diag(parse_maybe_fn_typo_with_impl)] +pub(crate) struct FnTypoWithImpl { + #[primary_span] + #[suggestion(applicability = "maybe-incorrect", code = "impl", style = "verbose")] + pub fn_span: Span, +} |
