diff options
| author | bors <bors@rust-lang.org> | 2024-07-04 16:37:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-04 16:37:39 +0000 |
| commit | 8a9cccb1004e9fa8a189e3288a92e998cefdd3c6 (patch) | |
| tree | 047e49067e968e998874d688b4edbd8fe57772a6 /compiler/rustc_hir_analysis/src/errors.rs | |
| parent | 9f877c9cd2c3f8f2f64df1e0c1804ad0682416d0 (diff) | |
| parent | dd42f7a0a6158738e7321ac489591d9694a71fcc (diff) | |
| download | rust-8a9cccb1004e9fa8a189e3288a92e998cefdd3c6.tar.gz rust-8a9cccb1004e9fa8a189e3288a92e998cefdd3c6.zip | |
Auto merge of #127326 - matthiaskrgr:rollup-kz7vd3w, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #123043 (Disable dead variant removal for `#[repr(C)]` enums.) - #126405 (Migrate some rustc_builtin_macros to SessionDiagnostic) - #127037 (Remove some duplicated tests) - #127283 (Reject SmartPointer constructions not serving the purpose) - #127301 (Tweak some structured suggestions to be more verbose and accurate) - #127307 (Allow to have different types for arguments of `Rustc::remap_path_prefix`) - #127309 (jsondocck: add `$FILE` built-in variable) - #127314 (Trivial update on tidy bless note) - #127319 (Remove a use of `StructuredDiag`, which is incompatible with automatic error tainting and error translations) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/errors.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs index 3ffb51fa992..7d44ac458de 100644 --- a/compiler/rustc_hir_analysis/src/errors.rs +++ b/compiler/rustc_hir_analysis/src/errors.rs @@ -453,12 +453,11 @@ impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for MissingTypeParams { } else { // The user wrote `Iterator`, so we don't have a type we can suggest, but at // least we can clue them to the correct syntax `Iterator<Type>`. - err.span_suggestion( - self.span, + err.span_suggestion_verbose( + self.span.shrink_to_hi(), fluent::hir_analysis_suggestion, format!( - "{}<{}>", - snippet, + "<{}>", self.missing_type_params .iter() .map(|n| n.to_string()) @@ -708,15 +707,6 @@ pub(crate) struct PassToVariadicFunction<'tcx, 'a> { } #[derive(Diagnostic)] -#[diag(hir_analysis_cast_thin_pointer_to_fat_pointer, code = E0607)] -pub(crate) struct CastThinPointerToFatPointer<'tcx> { - #[primary_span] - pub span: Span, - pub expr_ty: Ty<'tcx>, - pub cast_ty: String, -} - -#[derive(Diagnostic)] #[diag(hir_analysis_invalid_union_field, code = E0740)] pub(crate) struct InvalidUnionField { #[primary_span] |
