From 5363f350887b1e5b5dd21a86f88c8af9d7fea6da Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:25 +0200 Subject: Merging upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- src/test/codegen/avr/avr-func-addrspace.rs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/test/codegen/avr/avr-func-addrspace.rs') diff --git a/src/test/codegen/avr/avr-func-addrspace.rs b/src/test/codegen/avr/avr-func-addrspace.rs index a038dfe76..cbbcfad3e 100644 --- a/src/test/codegen/avr/avr-func-addrspace.rs +++ b/src/test/codegen/avr/avr-func-addrspace.rs @@ -19,6 +19,8 @@ pub trait Sized { } pub trait Copy { } #[lang = "receiver"] pub trait Receiver { } +#[lang = "tuple_trait"] +pub trait Tuple { } pub struct Result { _a: T, _b: E } @@ -29,7 +31,7 @@ impl Copy for &usize {} pub unsafe fn drop_in_place(_: *mut T) {} #[lang = "fn_once"] -pub trait FnOnce { +pub trait FnOnce { #[lang = "fn_once_output"] type Output; @@ -37,24 +39,16 @@ pub trait FnOnce { } #[lang = "fn_mut"] -pub trait FnMut : FnOnce { +pub trait FnMut : FnOnce { extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; } #[lang = "fn"] -pub trait Fn: FnOnce { +pub trait Fn: FnOnce { /// Performs the call operation. extern "rust-call" fn call(&self, args: Args) -> Self::Output; } -impl<'a, A, R> FnOnce for &'a fn(A) -> R { - type Output = R; - - extern "rust-call" fn call_once(self, args: A) -> R { - (*self)(args) - } -} - pub static mut STORAGE_FOO: fn(&usize, &mut u32) -> Result<(), ()> = arbitrary_black_box; pub static mut STORAGE_BAR: u32 = 12; -- cgit v1.2.3