diff options
| author | bors <bors@rust-lang.org> | 2024-01-13 16:09:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-13 16:09:45 +0000 |
| commit | c6c4abf58499d89000e333627237e63dbca24437 (patch) | |
| tree | 074da426f6d67f7cfbf0a8c7a524eebf67037ea2 /compiler/rustc_hir_analysis/src | |
| parent | 1d8d7b16cbcd048e98359cd0d42b03bc1710cca8 (diff) | |
| parent | f53caa1106e3c7c3b231540d1afb6acb626813e8 (diff) | |
| download | rust-c6c4abf58499d89000e333627237e63dbca24437.tar.gz rust-c6c4abf58499d89000e333627237e63dbca24437.zip | |
Auto merge of #119927 - matthiaskrgr:rollup-885ws57, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #119587 (Varargs support for system ABI) - #119891 (rename `reported_signature_mismatch` to reflect its use) - #119894 (Allow `~const` on associated type bounds again) - #119896 (Taint `_` placeholder types in trait impl method signatures) - #119898 (Remove unused `ErrorReporting` variant from overflow handling) - #119902 (fix typo in `fn()` docs) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/astconv/mod.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/lib.rs | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/astconv/mod.rs b/compiler/rustc_hir_analysis/src/astconv/mod.rs index 78740ac33ca..9f4f1413650 100644 --- a/compiler/rustc_hir_analysis/src/astconv/mod.rs +++ b/compiler/rustc_hir_analysis/src/astconv/mod.rs @@ -2659,7 +2659,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { self.suggest_trait_fn_ty_for_impl_fn_infer(hir_id, Some(i)) { infer_replacements.push((a.span, suggested_ty.to_string())); - return suggested_ty; + return Ty::new_error_with_message( + self.tcx(), + a.span, + suggested_ty.to_string(), + ); } } @@ -2677,7 +2681,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { self.suggest_trait_fn_ty_for_impl_fn_infer(hir_id, None) { infer_replacements.push((output.span, suggested_ty.to_string())); - suggested_ty + Ty::new_error_with_message(self.tcx(), output.span, suggested_ty.to_string()) } else { visitor.visit_ty(output); self.ast_ty_to_ty(output) diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs index dfc54ac5b23..d4f08b12a18 100644 --- a/compiler/rustc_hir_analysis/src/lib.rs +++ b/compiler/rustc_hir_analysis/src/lib.rs @@ -116,7 +116,8 @@ use rustc_hir::def::DefKind; rustc_fluent_macro::fluent_messages! { "../messages.ftl" } fn require_c_abi_if_c_variadic(tcx: TyCtxt<'_>, decl: &hir::FnDecl<'_>, abi: Abi, span: Span) { - const CONVENTIONS_UNSTABLE: &str = "`C`, `cdecl`, `aapcs`, `win64`, `sysv64` or `efiapi`"; + const CONVENTIONS_UNSTABLE: &str = + "`C`, `cdecl`, `system`, `aapcs`, `win64`, `sysv64` or `efiapi`"; const CONVENTIONS_STABLE: &str = "`C` or `cdecl`"; const UNSTABLE_EXPLAIN: &str = "using calling conventions other than `C` or `cdecl` for varargs functions is unstable"; |
