From d416c68114e11309b4a1a41cd267afa31a5b02c1 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Mon, 31 Jan 2022 19:55:34 +0100 Subject: [PATCH 1/3] Ensure that queries only return Copy types. --- src/common.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.rs b/src/common.rs index 3b6025c73d1..79d85554514 100644 --- a/src/common.rs +++ b/src/common.rs @@ -274,7 +274,7 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for FunctionCx<'_, '_, 'tcx> { #[inline] fn handle_fn_abi_err( &self, - err: FnAbiError<'tcx>, + err: &'tcx FnAbiError<'tcx>, span: Span, fn_abi_request: FnAbiRequest<'tcx>, ) -> ! { @@ -396,7 +396,7 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> { #[inline] fn handle_fn_abi_err( &self, - err: FnAbiError<'tcx>, + err: &'tcx FnAbiError<'tcx>, span: Span, fn_abi_request: FnAbiRequest<'tcx>, ) -> ! { From cf9c65bb585a9bf73d32055ceff4d5c809385879 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Tue, 1 Feb 2022 18:44:45 +0100 Subject: [PATCH 2/3] Make FnAbiError Copy. --- src/common.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.rs b/src/common.rs index 79d85554514..3b6025c73d1 100644 --- a/src/common.rs +++ b/src/common.rs @@ -274,7 +274,7 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for FunctionCx<'_, '_, 'tcx> { #[inline] fn handle_fn_abi_err( &self, - err: &'tcx FnAbiError<'tcx>, + err: FnAbiError<'tcx>, span: Span, fn_abi_request: FnAbiRequest<'tcx>, ) -> ! { @@ -396,7 +396,7 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> { #[inline] fn handle_fn_abi_err( &self, - err: &'tcx FnAbiError<'tcx>, + err: FnAbiError<'tcx>, span: Span, fn_abi_request: FnAbiRequest<'tcx>, ) -> ! { From 4e39cde7f3584b5bf5017346b53f8493f32de7f8 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Thu, 10 Feb 2022 18:27:18 +0100 Subject: [PATCH 3/3] Unconditionally update symbols All paths to an ArchiveBuilder::build call update_symbols first. --- src/archive.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/archive.rs b/src/archive.rs index b0eb3864d80..a099e8b3a6a 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -105,8 +105,6 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> { Ok(()) } - fn update_symbols(&mut self) {} - fn build(mut self) { enum BuilderKind { Bsd(ar::Builder),