From f8b11acc55744f93a59d4e7655ba3ec1f5dd9987 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 18 Sep 2024 00:51:26 +0200 Subject: [PATCH] Rename `id` files to `retained` to match new name Part of https://github.com/madsmtm/objc2/issues/617 --- Cargo.lock | 2 +- crates/objc2/src/__macro_helpers/mod.rs | 4 +- .../{msg_send_id.rs => msg_send_retained.rs} | 0 crates/objc2/src/rc/mod.rs | 16 ++--- crates/objc2/src/rc/{id.rs => retained.rs} | 0 ..._impls.rs => retained_forwarding_impls.rs} | 0 .../rc/{id_traits.rs => retained_traits.rs} | 0 crates/objc2/src/rc/{weak_id.rs => weak.rs} | 0 ...autoreleased.rs => retain_autoreleased.rs} | 0 .../expected/apple-aarch64.s | 10 +-- .../expected/apple-armv7s.s | 10 +-- .../test_msg_send_error/expected/apple-x86.s | 10 +-- .../expected/apple-x86_64.s | 10 +-- .../expected/gnustep-x86.s | 16 ++--- .../expected/gnustep-x86_64.s | 16 ++--- .../Cargo.toml | 2 +- .../expected/apple-aarch64.s | 16 ++--- .../expected/apple-armv7s.s | 16 ++--- .../expected/apple-x86.s | 16 ++--- .../expected/apple-x86_64.s | 16 ++--- .../expected/gnustep-x86.s | 18 ++--- .../expected/gnustep-x86_64.s | 18 ++--- .../lib.rs | 0 .../expected/apple-aarch64.s | 2 +- .../expected/apple-armv7s.s | 2 +- .../expected/apple-old-x86.s | 2 +- .../expected/apple-x86.s | 2 +- .../expected/apple-x86_64.s | 2 +- .../ui/extern_methods_invalid_receiver.stderr | 4 +- .../ui/extern_methods_invalid_type.stderr | 4 +- ...nt.rs => msg_send_alloc_init_different.rs} | 0 ...r => msg_send_alloc_init_different.stderr} | 4 +- .../test-ui/ui/msg_send_id_invalid_error.rs | 19 ----- .../ui/msg_send_id_invalid_error.stderr | 49 ------------- .../test-ui/ui/msg_send_id_no_return_type.rs | 7 -- .../ui/msg_send_id_no_return_type.stderr | 17 ----- crates/test-ui/ui/msg_send_invalid_error.rs | 18 ++++- .../test-ui/ui/msg_send_invalid_error.stderr | 48 +++++++++++++ ...d_method.rs => msg_send_invalid_method.rs} | 0 ....stderr => msg_send_invalid_method.stderr} | 8 +-- ...ceiver.rs => msg_send_invalid_receiver.rs} | 0 ...tderr => msg_send_invalid_receiver.stderr} | 24 +++---- ...d_return.rs => msg_send_invalid_return.rs} | 0 ....stderr => msg_send_invalid_return.stderr} | 72 +++++++++---------- crates/test-ui/ui/msg_send_no_return_type.rs | 5 +- ...pecified.rs => msg_send_underspecified.rs} | 0 ....stderr => msg_send_underspecified.stderr} | 2 +- ...1.rs => msg_send_underspecified_error1.rs} | 0 ... => msg_send_underspecified_error1.stderr} | 2 +- ...2.rs => msg_send_underspecified_error2.rs} | 0 ... => msg_send_underspecified_error2.stderr} | 2 +- ...3.rs => msg_send_underspecified_error3.rs} | 0 ... => msg_send_underspecified_error3.stderr} | 2 +- ...g_send_id_unwrap.rs => msg_send_unwrap.rs} | 0 ...d_unwrap.stderr => msg_send_unwrap.stderr} | 2 +- 55 files changed, 233 insertions(+), 262 deletions(-) rename crates/objc2/src/__macro_helpers/{msg_send_id.rs => msg_send_retained.rs} (100%) rename crates/objc2/src/rc/{id.rs => retained.rs} (100%) rename crates/objc2/src/rc/{id_forwarding_impls.rs => retained_forwarding_impls.rs} (100%) rename crates/objc2/src/rc/{id_traits.rs => retained_traits.rs} (100%) rename crates/objc2/src/rc/{weak_id.rs => weak.rs} (100%) rename crates/objc2/tests/{id_retain_autoreleased.rs => retain_autoreleased.rs} (100%) rename crates/test-assembly/crates/{test_msg_send_id => test_msg_send_retained}/Cargo.toml (93%) rename crates/test-assembly/crates/{test_msg_send_id => test_msg_send_retained}/expected/apple-aarch64.s (86%) rename crates/test-assembly/crates/{test_msg_send_id => test_msg_send_retained}/expected/apple-armv7s.s (86%) rename crates/test-assembly/crates/{test_msg_send_id => test_msg_send_retained}/expected/apple-x86.s (90%) rename crates/test-assembly/crates/{test_msg_send_id => test_msg_send_retained}/expected/apple-x86_64.s (85%) rename crates/test-assembly/crates/{test_msg_send_id => test_msg_send_retained}/expected/gnustep-x86.s (94%) rename crates/test-assembly/crates/{test_msg_send_id => test_msg_send_retained}/expected/gnustep-x86_64.s (91%) rename crates/test-assembly/crates/{test_msg_send_id => test_msg_send_retained}/lib.rs (100%) rename crates/test-ui/ui/{msg_send_id_alloc_init_different.rs => msg_send_alloc_init_different.rs} (100%) rename crates/test-ui/ui/{msg_send_id_alloc_init_different.stderr => msg_send_alloc_init_different.stderr} (88%) delete mode 100644 crates/test-ui/ui/msg_send_id_invalid_error.rs delete mode 100644 crates/test-ui/ui/msg_send_id_invalid_error.stderr delete mode 100644 crates/test-ui/ui/msg_send_id_no_return_type.rs delete mode 100644 crates/test-ui/ui/msg_send_id_no_return_type.stderr rename crates/test-ui/ui/{msg_send_id_invalid_method.rs => msg_send_invalid_method.rs} (100%) rename crates/test-ui/ui/{msg_send_id_invalid_method.stderr => msg_send_invalid_method.stderr} (91%) rename crates/test-ui/ui/{msg_send_id_invalid_receiver.rs => msg_send_invalid_receiver.rs} (100%) rename crates/test-ui/ui/{msg_send_id_invalid_receiver.stderr => msg_send_invalid_receiver.stderr} (89%) rename crates/test-ui/ui/{msg_send_id_invalid_return.rs => msg_send_invalid_return.rs} (100%) rename crates/test-ui/ui/{msg_send_id_invalid_return.stderr => msg_send_invalid_return.stderr} (82%) rename crates/test-ui/ui/{msg_send_id_underspecified.rs => msg_send_underspecified.rs} (100%) rename crates/test-ui/ui/{msg_send_id_underspecified.stderr => msg_send_underspecified.stderr} (84%) rename crates/test-ui/ui/{msg_send_id_underspecified_error1.rs => msg_send_underspecified_error1.rs} (100%) rename crates/test-ui/ui/{msg_send_id_underspecified_error1.stderr => msg_send_underspecified_error1.stderr} (81%) rename crates/test-ui/ui/{msg_send_id_underspecified_error2.rs => msg_send_underspecified_error2.rs} (100%) rename crates/test-ui/ui/{msg_send_id_underspecified_error2.stderr => msg_send_underspecified_error2.stderr} (80%) rename crates/test-ui/ui/{msg_send_id_underspecified_error3.rs => msg_send_underspecified_error3.rs} (100%) rename crates/test-ui/ui/{msg_send_id_underspecified_error3.stderr => msg_send_underspecified_error3.stderr} (77%) rename crates/test-ui/ui/{msg_send_id_unwrap.rs => msg_send_unwrap.rs} (100%) rename crates/test-ui/ui/{msg_send_id_unwrap.stderr => msg_send_unwrap.stderr} (91%) diff --git a/Cargo.lock b/Cargo.lock index 57a01a44e..685330634 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1426,7 +1426,7 @@ dependencies = [ ] [[package]] -name = "test_msg_send_id" +name = "test_msg_send_retained" version = "0.1.0" dependencies = [ "objc2", diff --git a/crates/objc2/src/__macro_helpers/mod.rs b/crates/objc2/src/__macro_helpers/mod.rs index 194998684..51562c19c 100644 --- a/crates/objc2/src/__macro_helpers/mod.rs +++ b/crates/objc2/src/__macro_helpers/mod.rs @@ -20,7 +20,7 @@ mod image_info; mod method_family; mod module_info; mod msg_send; -mod msg_send_id; +mod msg_send_retained; mod writeback; pub use self::cache::{CachedClass, CachedSel}; @@ -37,7 +37,7 @@ pub use self::method_family::{ }; pub use self::module_info::ModuleInfo; pub use self::msg_send::MsgSend; -pub use self::msg_send_id::{MaybeUnwrap, MsgSendId, MsgSendSuperId}; +pub use self::msg_send_retained::{MaybeUnwrap, MsgSendId, MsgSendSuperId}; /// Disallow using this passed in value in const and statics for forwards /// compatibility (this function is not a `const` function). diff --git a/crates/objc2/src/__macro_helpers/msg_send_id.rs b/crates/objc2/src/__macro_helpers/msg_send_retained.rs similarity index 100% rename from crates/objc2/src/__macro_helpers/msg_send_id.rs rename to crates/objc2/src/__macro_helpers/msg_send_retained.rs diff --git a/crates/objc2/src/rc/mod.rs b/crates/objc2/src/rc/mod.rs index bb7d81e3e..c94849864 100644 --- a/crates/objc2/src/rc/mod.rs +++ b/crates/objc2/src/rc/mod.rs @@ -51,25 +51,25 @@ mod allocated_partial_init; mod autorelease; -mod id; -mod id_forwarding_impls; -mod id_traits; +mod retained; +mod retained_forwarding_impls; +mod retained_traits; #[cfg(test)] mod test_object; -mod weak_id; +mod weak; pub use self::allocated_partial_init::{Allocated, PartialInit}; pub use self::autorelease::{ autoreleasepool, autoreleasepool_leaking, AutoreleasePool, AutoreleaseSafe, }; -pub use self::id::{Id, Retained}; -pub use self::id_traits::{DefaultRetained, RetainedFromIterator, RetainedIntoIterator}; +pub use self::retained::{Id, Retained}; +pub use self::retained_traits::{DefaultRetained, RetainedFromIterator, RetainedIntoIterator}; #[cfg(test)] pub(crate) use self::test_object::{RcTestObject, ThreadTestData}; -pub use self::weak_id::{Weak, WeakId}; +pub use self::weak::{Weak, WeakId}; // Soft-deprecated aliases -pub use self::id_traits::{ +pub use self::retained_traits::{ DefaultRetained as DefaultId, RetainedFromIterator as IdFromIterator, RetainedIntoIterator as IdIntoIterator, }; diff --git a/crates/objc2/src/rc/id.rs b/crates/objc2/src/rc/retained.rs similarity index 100% rename from crates/objc2/src/rc/id.rs rename to crates/objc2/src/rc/retained.rs diff --git a/crates/objc2/src/rc/id_forwarding_impls.rs b/crates/objc2/src/rc/retained_forwarding_impls.rs similarity index 100% rename from crates/objc2/src/rc/id_forwarding_impls.rs rename to crates/objc2/src/rc/retained_forwarding_impls.rs diff --git a/crates/objc2/src/rc/id_traits.rs b/crates/objc2/src/rc/retained_traits.rs similarity index 100% rename from crates/objc2/src/rc/id_traits.rs rename to crates/objc2/src/rc/retained_traits.rs diff --git a/crates/objc2/src/rc/weak_id.rs b/crates/objc2/src/rc/weak.rs similarity index 100% rename from crates/objc2/src/rc/weak_id.rs rename to crates/objc2/src/rc/weak.rs diff --git a/crates/objc2/tests/id_retain_autoreleased.rs b/crates/objc2/tests/retain_autoreleased.rs similarity index 100% rename from crates/objc2/tests/id_retain_autoreleased.rs rename to crates/objc2/tests/retain_autoreleased.rs diff --git a/crates/test-assembly/crates/test_msg_send_error/expected/apple-aarch64.s b/crates/test-assembly/crates/test_msg_send_error/expected/apple-aarch64.s index 5e912030e..c7fde3ac7 100644 --- a/crates/test-assembly/crates/test_msg_send_error/expected/apple-aarch64.s +++ b/crates/test-assembly/crates/test_msg_send_error/expected/apple-aarch64.s @@ -1,6 +1,6 @@ .section __TEXT,__text,regular,pure_instructions .p2align 2 -SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0): +SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0): stp x20, x19, [sp, #-32]! stp x29, x30, [sp, #16] add x29, sp, #16 @@ -85,7 +85,7 @@ Lloh6: adrp x1, l_anon.[ID].4@PAGE Lloh7: add x1, x1, l_anon.[ID].4@PAGEOFF - bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov x1, x0 mov w0, #1 b LBB3_2 @@ -113,7 +113,7 @@ Lloh8: adrp x1, l_anon.[ID].5@PAGE Lloh9: add x1, x1, l_anon.[ID].5@PAGEOFF - bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov x1, x0 mov w0, #1 b LBB4_2 @@ -141,7 +141,7 @@ Lloh10: adrp x1, l_anon.[ID].6@PAGE Lloh11: add x1, x1, l_anon.[ID].6@PAGEOFF - bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov x1, x0 mov w0, #1 b LBB5_2 @@ -173,7 +173,7 @@ Lloh12: adrp x1, l_anon.[ID].7@PAGE Lloh13: add x1, x1, l_anon.[ID].7@PAGEOFF - bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov x1, x0 mov w0, #1 b LBB6_2 diff --git a/crates/test-assembly/crates/test_msg_send_error/expected/apple-armv7s.s b/crates/test-assembly/crates/test_msg_send_error/expected/apple-armv7s.s index 5d8a3da92..2db4bfd24 100644 --- a/crates/test-assembly/crates/test_msg_send_error/expected/apple-armv7s.s +++ b/crates/test-assembly/crates/test_msg_send_error/expected/apple-armv7s.s @@ -2,7 +2,7 @@ .syntax unified .p2align 2 .code 32 -SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0): +SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0): push {r4, r7, lr} add r7, sp, #4 mov r4, r1 @@ -87,7 +87,7 @@ LBB3_2: movt r1, :upper16:(l_anon.[ID].4-(LPC3_0+8)) LPC3_0: add r1, pc, r1 - bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov r1, r0 mov r4, #1 mov r0, r4 @@ -117,7 +117,7 @@ LBB4_2: movt r1, :upper16:(l_anon.[ID].5-(LPC4_0+8)) LPC4_0: add r1, pc, r1 - bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov r1, r0 mov r4, #1 mov r0, r4 @@ -147,7 +147,7 @@ LBB5_2: movt r1, :upper16:(l_anon.[ID].6-(LPC5_0+8)) LPC5_0: add r1, pc, r1 - bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov r1, r0 mov r4, #1 mov r0, r4 @@ -181,7 +181,7 @@ LBB6_2: movt r1, :upper16:(l_anon.[ID].7-(LPC6_0+8)) LPC6_0: add r1, pc, r1 - bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + bl SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov r1, r0 mov r4, #1 mov r0, r4 diff --git a/crates/test-assembly/crates/test_msg_send_error/expected/apple-x86.s b/crates/test-assembly/crates/test_msg_send_error/expected/apple-x86.s index 3ac275a2f..18b2919c5 100644 --- a/crates/test-assembly/crates/test_msg_send_error/expected/apple-x86.s +++ b/crates/test-assembly/crates/test_msg_send_error/expected/apple-x86.s @@ -1,7 +1,7 @@ .section __TEXT,__text,regular,pure_instructions .intel_syntax noprefix .p2align 4, 0x90 -SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0): +SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0): push ebp mov ebp, esp push edi @@ -121,7 +121,7 @@ L3$pb: LBB3_2: mov ecx, dword ptr [ebp - 8] lea edx, [esi + l_anon.[ID].4-L3$pb] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov edx, eax mov eax, 1 add esp, 4 @@ -160,7 +160,7 @@ L4$pb: LBB4_2: mov ecx, dword ptr [ebp - 8] lea edx, [esi + l_anon.[ID].5-L4$pb] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov edx, eax mov eax, 1 add esp, 4 @@ -199,7 +199,7 @@ L5$pb: LBB5_2: mov ecx, dword ptr [ebp - 8] lea edx, [esi + l_anon.[ID].6-L5$pb] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov edx, eax mov eax, 1 add esp, 4 @@ -247,7 +247,7 @@ L6$pb: LBB6_2: mov ecx, dword ptr [ebp - 8] lea edx, [esi + l_anon.[ID].7-L6$pb] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov edx, eax mov eax, 1 add esp, 4 diff --git a/crates/test-assembly/crates/test_msg_send_error/expected/apple-x86_64.s b/crates/test-assembly/crates/test_msg_send_error/expected/apple-x86_64.s index cec70d15e..539ac12b5 100644 --- a/crates/test-assembly/crates/test_msg_send_error/expected/apple-x86_64.s +++ b/crates/test-assembly/crates/test_msg_send_error/expected/apple-x86_64.s @@ -1,7 +1,7 @@ .section __TEXT,__text,regular,pure_instructions .intel_syntax noprefix .p2align 4, 0x90 -SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0): +SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0): push rbp mov rbp, rsp push rbx @@ -76,7 +76,7 @@ _error_new: LBB3_2: mov rdi, qword ptr [rbp - 8] lea rsi, [rip + l_anon.[ID].4] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov rdx, rax mov eax, 1 add rsp, 16 @@ -102,7 +102,7 @@ _error_init: LBB4_2: mov rdi, qword ptr [rbp - 8] lea rsi, [rip + l_anon.[ID].5] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov rdx, rax mov eax, 1 add rsp, 16 @@ -128,7 +128,7 @@ _error_copy: LBB5_2: mov rdi, qword ptr [rbp - 8] lea rsi, [rip + l_anon.[ID].6] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov rdx, rax mov eax, 1 add rsp, 16 @@ -161,7 +161,7 @@ _error_autoreleased: LBB6_2: mov rdi, qword ptr [rbp - 8] lea rsi, [rip + l_anon.[ID].7] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov rdx, rax mov eax, 1 add rsp, 16 diff --git a/crates/test-assembly/crates/test_msg_send_error/expected/gnustep-x86.s b/crates/test-assembly/crates/test_msg_send_error/expected/gnustep-x86.s index 29935bec2..08acddc0e 100644 --- a/crates/test-assembly/crates/test_msg_send_error/expected/gnustep-x86.s +++ b/crates/test-assembly/crates/test_msg_send_error/expected/gnustep-x86.s @@ -1,9 +1,9 @@ .text .intel_syntax noprefix - .section .text.unlikely.SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0),"ax",@progbits + .section .text.unlikely.SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0),"ax",@progbits .p2align 4, 0x90 - .type SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0),@function -SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0): + .type SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0),@function +SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0): push ebx push esi push eax @@ -31,7 +31,7 @@ SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0), .Lfunc_end0-SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + .size SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0), .Lfunc_end0-SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) .section .text.unlikely.SYM(objc2[CRATE_ID]::__macro_helpers::msg_send::encountered_error::, 0),"ax",@progbits .p2align 4, 0x90 @@ -154,7 +154,7 @@ error_new: .LBB3_2: mov ecx, dword ptr [esp + 12] lea edx, [ebx + .Lanon.[ID].4@GOTOFF] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov edx, eax mov eax, 1 jmp .LBB3_3 @@ -208,7 +208,7 @@ error_init: mov ecx, dword ptr [esp + 12] .LBB4_5: lea edx, [ebx + .Lanon.[ID].5@GOTOFF] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov edx, eax mov eax, 1 jmp .LBB4_6 @@ -256,7 +256,7 @@ error_copy: .LBB5_2: mov ecx, dword ptr [esp + 12] lea edx, [ebx + .Lanon.[ID].6@GOTOFF] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov edx, eax mov eax, 1 jmp .LBB5_3 @@ -307,7 +307,7 @@ error_autoreleased: .LBB6_2: mov ecx, dword ptr [esp + 12] lea edx, [ebx + .Lanon.[ID].7@GOTOFF] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov edx, eax mov eax, 1 jmp .LBB6_3 diff --git a/crates/test-assembly/crates/test_msg_send_error/expected/gnustep-x86_64.s b/crates/test-assembly/crates/test_msg_send_error/expected/gnustep-x86_64.s index b113fc90c..2403ff1c1 100644 --- a/crates/test-assembly/crates/test_msg_send_error/expected/gnustep-x86_64.s +++ b/crates/test-assembly/crates/test_msg_send_error/expected/gnustep-x86_64.s @@ -1,9 +1,9 @@ .text .intel_syntax noprefix - .section .text.unlikely.SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0),"ax",@progbits + .section .text.unlikely.SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0),"ax",@progbits .p2align 4, 0x90 - .type SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0),@function -SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0): + .type SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0),@function +SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0): push rbx mov rbx, rsi call qword ptr [rip + objc_retain@GOTPCREL] @@ -17,7 +17,7 @@ SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0), .Lfunc_end0-SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + .size SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0), .Lfunc_end0-SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) .section .text.unlikely.SYM(objc2[CRATE_ID]::__macro_helpers::msg_send::encountered_error::, 0),"ax",@progbits .p2align 4, 0x90 @@ -99,7 +99,7 @@ error_new: .LBB3_2: mov rdi, qword ptr [rsp] lea rsi, [rip + .Lanon.[ID].4] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov rdx, rax mov eax, 1 add rsp, 8 @@ -142,7 +142,7 @@ error_init: mov rdi, qword ptr [rsp] .LBB4_5: lea rsi, [rip + .Lanon.[ID].5] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov rdx, rax mov eax, 1 add rsp, 8 @@ -179,7 +179,7 @@ error_copy: .LBB5_2: mov rdi, qword ptr [rsp] lea rsi, [rip + .Lanon.[ID].6] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov rdx, rax mov eax, 1 add rsp, 8 @@ -218,7 +218,7 @@ error_autoreleased: .LBB6_2: mov rdi, qword ptr [rsp] lea rsi, [rip + .Lanon.[ID].7] - call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_id::encountered_error::, 0) + call SYM(objc2[CRATE_ID]::__macro_helpers::msg_send_retained::encountered_error::, 0) mov rdx, rax mov eax, 1 add rsp, 8 diff --git a/crates/test-assembly/crates/test_msg_send_id/Cargo.toml b/crates/test-assembly/crates/test_msg_send_retained/Cargo.toml similarity index 93% rename from crates/test-assembly/crates/test_msg_send_id/Cargo.toml rename to crates/test-assembly/crates/test_msg_send_retained/Cargo.toml index 20668fab7..edbbdc651 100644 --- a/crates/test-assembly/crates/test_msg_send_id/Cargo.toml +++ b/crates/test-assembly/crates/test_msg_send_retained/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "test_msg_send_id" +name = "test_msg_send_retained" version = "0.1.0" edition.workspace = true publish = false diff --git a/crates/test-assembly/crates/test_msg_send_id/expected/apple-aarch64.s b/crates/test-assembly/crates/test_msg_send_retained/expected/apple-aarch64.s similarity index 86% rename from crates/test-assembly/crates/test_msg_send_id/expected/apple-aarch64.s rename to crates/test-assembly/crates/test_msg_send_retained/expected/apple-aarch64.s index c1ba91800..ad9d1c324 100644 --- a/crates/test-assembly/crates/test_msg_send_id/expected/apple-aarch64.s +++ b/crates/test-assembly/crates/test_msg_send_retained/expected/apple-aarch64.s @@ -24,7 +24,7 @@ Lloh1: add x2, x2, l_anon.[ID].1@PAGEOFF mov x0, x20 mov x1, x19 - bl SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + bl SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .loh AdrpAdd Lloh0, Lloh1 .globl _handle_alloc @@ -57,7 +57,7 @@ Lloh3: add x2, x2, l_anon.[ID].2@PAGEOFF mov x0, x20 mov x1, x19 - bl SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + bl SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .loh AdrpAdd Lloh2, Lloh3 .globl _handle_alloc_init @@ -115,7 +115,7 @@ Lloh4: adrp x0, l_anon.[ID].3@PAGE Lloh5: add x0, x0, l_anon.[ID].3@PAGEOFF - bl SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + bl SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .loh AdrpAdd Lloh4, Lloh5 .globl _handle_autoreleased @@ -167,7 +167,7 @@ Lloh7: add x2, x2, l_anon.[ID].4@PAGEOFF mov x0, x20 mov x1, x19 - bl SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + bl SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .loh AdrpAdd Lloh6, Lloh7 .globl _handle_with_out_param @@ -202,21 +202,21 @@ l_anon.[ID].0: .p2align 3, 0x0 l_anon.[ID].1: .quad l_anon.[ID].0 - .asciz "3\000\000\000\000\000\000\000\r\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\000\r\000\000\000\005\000\000" .p2align 3, 0x0 l_anon.[ID].2: .quad l_anon.[ID].0 - .asciz "3\000\000\000\000\000\000\000\034\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\000\034\000\000\000\005\000\000" .p2align 3, 0x0 l_anon.[ID].3: .quad l_anon.[ID].0 - .asciz "3\000\000\000\000\000\000\0008\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\0008\000\000\000\005\000\000" .p2align 3, 0x0 l_anon.[ID].4: .quad l_anon.[ID].0 - .asciz "3\000\000\000\000\000\000\000L\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\000L\000\000\000\005\000\000" .subsections_via_symbols diff --git a/crates/test-assembly/crates/test_msg_send_id/expected/apple-armv7s.s b/crates/test-assembly/crates/test_msg_send_retained/expected/apple-armv7s.s similarity index 86% rename from crates/test-assembly/crates/test_msg_send_id/expected/apple-armv7s.s rename to crates/test-assembly/crates/test_msg_send_retained/expected/apple-armv7s.s index 35d3183ed..767128eb6 100644 --- a/crates/test-assembly/crates/test_msg_send_id/expected/apple-armv7s.s +++ b/crates/test-assembly/crates/test_msg_send_retained/expected/apple-armv7s.s @@ -25,7 +25,7 @@ LPC1_0: mov r0, r5 mov r1, r4 mov lr, pc - b SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + b SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_alloc .p2align 2 @@ -58,7 +58,7 @@ LPC4_0: mov r0, r5 mov r1, r4 mov lr, pc - b SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + b SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_alloc_init .p2align 2 @@ -116,7 +116,7 @@ LBB9_1: LPC9_0: add r0, pc, r0 mov lr, pc - b SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + b SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_autoreleased .p2align 2 @@ -168,7 +168,7 @@ LPC12_0: mov r0, r5 mov r1, r4 mov lr, pc - b SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + b SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_with_out_param .p2align 2 @@ -199,21 +199,21 @@ l_anon.[ID].0: .p2align 2, 0x0 l_anon.[ID].1: .long l_anon.[ID].0 - .asciz "3\000\000\000\r\000\000\000\005\000\000" + .asciz "9\000\000\000\r\000\000\000\005\000\000" .p2align 2, 0x0 l_anon.[ID].2: .long l_anon.[ID].0 - .asciz "3\000\000\000\034\000\000\000\005\000\000" + .asciz "9\000\000\000\034\000\000\000\005\000\000" .p2align 2, 0x0 l_anon.[ID].3: .long l_anon.[ID].0 - .asciz "3\000\000\0008\000\000\000\005\000\000" + .asciz "9\000\000\0008\000\000\000\005\000\000" .p2align 2, 0x0 l_anon.[ID].4: .long l_anon.[ID].0 - .asciz "3\000\000\000L\000\000\000\005\000\000" + .asciz "9\000\000\000L\000\000\000\005\000\000" .subsections_via_symbols diff --git a/crates/test-assembly/crates/test_msg_send_id/expected/apple-x86.s b/crates/test-assembly/crates/test_msg_send_retained/expected/apple-x86.s similarity index 90% rename from crates/test-assembly/crates/test_msg_send_id/expected/apple-x86.s rename to crates/test-assembly/crates/test_msg_send_retained/expected/apple-x86.s index c33ee9625..ecf0166a3 100644 --- a/crates/test-assembly/crates/test_msg_send_id/expected/apple-x86.s +++ b/crates/test-assembly/crates/test_msg_send_retained/expected/apple-x86.s @@ -41,7 +41,7 @@ LBB1_2: push eax push edi push esi - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_alloc .p2align 4, 0x90 @@ -92,7 +92,7 @@ LBB4_2: push eax push edi push esi - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_alloc_init .p2align 4, 0x90 @@ -187,7 +187,7 @@ L9$pb: LBB9_2: lea eax, [esi + l_anon.[ID].3-L9$pb] mov dword ptr [esp], eax - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_autoreleased .p2align 4, 0x90 @@ -278,7 +278,7 @@ LBB12_2: push eax push edi push esi - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_with_out_param .p2align 4, 0x90 @@ -325,21 +325,21 @@ l_anon.[ID].0: .p2align 2, 0x0 l_anon.[ID].1: .long l_anon.[ID].0 - .asciz "3\000\000\000\r\000\000\000\005\000\000" + .asciz "9\000\000\000\r\000\000\000\005\000\000" .p2align 2, 0x0 l_anon.[ID].2: .long l_anon.[ID].0 - .asciz "3\000\000\000\034\000\000\000\005\000\000" + .asciz "9\000\000\000\034\000\000\000\005\000\000" .p2align 2, 0x0 l_anon.[ID].3: .long l_anon.[ID].0 - .asciz "3\000\000\0008\000\000\000\005\000\000" + .asciz "9\000\000\0008\000\000\000\005\000\000" .p2align 2, 0x0 l_anon.[ID].4: .long l_anon.[ID].0 - .asciz "3\000\000\000L\000\000\000\005\000\000" + .asciz "9\000\000\000L\000\000\000\005\000\000" .subsections_via_symbols diff --git a/crates/test-assembly/crates/test_msg_send_id/expected/apple-x86_64.s b/crates/test-assembly/crates/test_msg_send_retained/expected/apple-x86_64.s similarity index 85% rename from crates/test-assembly/crates/test_msg_send_id/expected/apple-x86_64.s rename to crates/test-assembly/crates/test_msg_send_retained/expected/apple-x86_64.s index 26b1c9cd1..fda3de16d 100644 --- a/crates/test-assembly/crates/test_msg_send_id/expected/apple-x86_64.s +++ b/crates/test-assembly/crates/test_msg_send_retained/expected/apple-x86_64.s @@ -28,7 +28,7 @@ LBB1_2: lea rdx, [rip + l_anon.[ID].1] mov rdi, r14 mov rsi, rbx - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_alloc .p2align 4, 0x90 @@ -66,7 +66,7 @@ LBB4_2: lea rdx, [rip + l_anon.[ID].2] mov rdi, r14 mov rsi, rbx - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_alloc_init .p2align 4, 0x90 @@ -132,7 +132,7 @@ _handle_copy_fallible: ret LBB9_2: lea rdi, [rip + l_anon.[ID].3] - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_autoreleased .p2align 4, 0x90 @@ -194,7 +194,7 @@ LBB12_2: lea rdx, [rip + l_anon.[ID].4] mov rdi, r14 mov rsi, rbx - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _handle_with_out_param .p2align 4, 0x90 @@ -235,21 +235,21 @@ l_anon.[ID].0: .p2align 3, 0x0 l_anon.[ID].1: .quad l_anon.[ID].0 - .asciz "3\000\000\000\000\000\000\000\r\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\000\r\000\000\000\005\000\000" .p2align 3, 0x0 l_anon.[ID].2: .quad l_anon.[ID].0 - .asciz "3\000\000\000\000\000\000\000\034\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\000\034\000\000\000\005\000\000" .p2align 3, 0x0 l_anon.[ID].3: .quad l_anon.[ID].0 - .asciz "3\000\000\000\000\000\000\0008\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\0008\000\000\000\005\000\000" .p2align 3, 0x0 l_anon.[ID].4: .quad l_anon.[ID].0 - .asciz "3\000\000\000\000\000\000\000L\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\000L\000\000\000\005\000\000" .subsections_via_symbols diff --git a/crates/test-assembly/crates/test_msg_send_id/expected/gnustep-x86.s b/crates/test-assembly/crates/test_msg_send_retained/expected/gnustep-x86.s similarity index 94% rename from crates/test-assembly/crates/test_msg_send_id/expected/gnustep-x86.s rename to crates/test-assembly/crates/test_msg_send_retained/expected/gnustep-x86.s index d5b7e059f..a8b9640cc 100644 --- a/crates/test-assembly/crates/test_msg_send_id/expected/gnustep-x86.s +++ b/crates/test-assembly/crates/test_msg_send_retained/expected/gnustep-x86.s @@ -67,7 +67,7 @@ handle_new_fallible: push eax push edi push esi - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0)@PLT + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0)@PLT .Lfunc_end1: .size handle_new_fallible, .Lfunc_end1-handle_new_fallible @@ -179,7 +179,7 @@ handle_init_fallible: push eax push edi push esi - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0)@PLT + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0)@PLT .Lfunc_end4: .size handle_init_fallible, .Lfunc_end4-handle_init_fallible @@ -370,7 +370,7 @@ handle_copy_fallible: .LBB9_2: lea eax, [ebx + .Lanon.[ID].3@GOTOFF] mov dword ptr [esp], eax - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0)@PLT + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0)@PLT .Lfunc_end9: .size handle_copy_fallible, .Lfunc_end9-handle_copy_fallible @@ -484,7 +484,7 @@ handle_autoreleased_fallible: push eax push edi push esi - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0)@PLT + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0)@PLT .Lfunc_end12: .size handle_autoreleased_fallible, .Lfunc_end12-handle_autoreleased_fallible @@ -536,14 +536,14 @@ handle_with_out_param: .section .rodata..Lanon.[ID].0,"a",@progbits .Lanon.[ID].0: .ascii "crates/$DIR/lib.rs" - .size .Lanon.[ID].0, 51 + .size .Lanon.[ID].0, 57 .type .Lanon.[ID].1,@object .section .data.rel.ro..Lanon.[ID].1,"aw",@progbits .p2align 2, 0x0 .Lanon.[ID].1: .long .Lanon.[ID].0 - .asciz "3\000\000\000\r\000\000\000\005\000\000" + .asciz "9\000\000\000\r\000\000\000\005\000\000" .size .Lanon.[ID].1, 16 .type .Lanon.[ID].2,@object @@ -551,7 +551,7 @@ handle_with_out_param: .p2align 2, 0x0 .Lanon.[ID].2: .long .Lanon.[ID].0 - .asciz "3\000\000\000\034\000\000\000\005\000\000" + .asciz "9\000\000\000\034\000\000\000\005\000\000" .size .Lanon.[ID].2, 16 .type .Lanon.[ID].3,@object @@ -559,7 +559,7 @@ handle_with_out_param: .p2align 2, 0x0 .Lanon.[ID].3: .long .Lanon.[ID].0 - .asciz "3\000\000\0008\000\000\000\005\000\000" + .asciz "9\000\000\0008\000\000\000\005\000\000" .size .Lanon.[ID].3, 16 .type .Lanon.[ID].4,@object @@ -567,7 +567,7 @@ handle_with_out_param: .p2align 2, 0x0 .Lanon.[ID].4: .long .Lanon.[ID].0 - .asciz "3\000\000\000L\000\000\000\005\000\000" + .asciz "9\000\000\000L\000\000\000\005\000\000" .size .Lanon.[ID].4, 16 .section ".note.GNU-stack","",@progbits diff --git a/crates/test-assembly/crates/test_msg_send_id/expected/gnustep-x86_64.s b/crates/test-assembly/crates/test_msg_send_retained/expected/gnustep-x86_64.s similarity index 91% rename from crates/test-assembly/crates/test_msg_send_id/expected/gnustep-x86_64.s rename to crates/test-assembly/crates/test_msg_send_retained/expected/gnustep-x86_64.s index 2d89f8e6d..9b508bbe5 100644 --- a/crates/test-assembly/crates/test_msg_send_id/expected/gnustep-x86_64.s +++ b/crates/test-assembly/crates/test_msg_send_retained/expected/gnustep-x86_64.s @@ -44,7 +44,7 @@ handle_new_fallible: lea rdx, [rip + .Lanon.[ID].1] mov rdi, r14 mov rsi, rbx - call qword ptr [rip + SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0)@GOTPCREL] + call qword ptr [rip + SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0)@GOTPCREL] .Lfunc_end1: .size handle_new_fallible, .Lfunc_end1-handle_new_fallible @@ -121,7 +121,7 @@ handle_init_fallible: lea rdx, [rip + .Lanon.[ID].2] mov rdi, r14 mov rsi, rbx - call qword ptr [rip + SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0)@GOTPCREL] + call qword ptr [rip + SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0)@GOTPCREL] .Lfunc_end4: .size handle_init_fallible, .Lfunc_end4-handle_init_fallible @@ -260,7 +260,7 @@ handle_copy_fallible: ret .LBB9_2: lea rdi, [rip + .Lanon.[ID].3] - call qword ptr [rip + SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0)@GOTPCREL] + call qword ptr [rip + SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0)@GOTPCREL] .Lfunc_end9: .size handle_copy_fallible, .Lfunc_end9-handle_copy_fallible @@ -336,7 +336,7 @@ handle_autoreleased_fallible: lea rdx, [rip + .Lanon.[ID].4] mov rdi, r14 mov rsi, rbx - call qword ptr [rip + SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0)@GOTPCREL] + call qword ptr [rip + SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0)@GOTPCREL] .Lfunc_end12: .size handle_autoreleased_fallible, .Lfunc_end12-handle_autoreleased_fallible @@ -378,14 +378,14 @@ handle_with_out_param: .section .rodata..Lanon.[ID].0,"a",@progbits .Lanon.[ID].0: .ascii "crates/$DIR/lib.rs" - .size .Lanon.[ID].0, 51 + .size .Lanon.[ID].0, 57 .type .Lanon.[ID].1,@object .section .data.rel.ro..Lanon.[ID].1,"aw",@progbits .p2align 3, 0x0 .Lanon.[ID].1: .quad .Lanon.[ID].0 - .asciz "3\000\000\000\000\000\000\000\r\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\000\r\000\000\000\005\000\000" .size .Lanon.[ID].1, 24 .type .Lanon.[ID].2,@object @@ -393,7 +393,7 @@ handle_with_out_param: .p2align 3, 0x0 .Lanon.[ID].2: .quad .Lanon.[ID].0 - .asciz "3\000\000\000\000\000\000\000\034\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\000\034\000\000\000\005\000\000" .size .Lanon.[ID].2, 24 .type .Lanon.[ID].3,@object @@ -401,7 +401,7 @@ handle_with_out_param: .p2align 3, 0x0 .Lanon.[ID].3: .quad .Lanon.[ID].0 - .asciz "3\000\000\000\000\000\000\0008\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\0008\000\000\000\005\000\000" .size .Lanon.[ID].3, 24 .type .Lanon.[ID].4,@object @@ -409,7 +409,7 @@ handle_with_out_param: .p2align 3, 0x0 .Lanon.[ID].4: .quad .Lanon.[ID].0 - .asciz "3\000\000\000\000\000\000\000L\000\000\000\005\000\000" + .asciz "9\000\000\000\000\000\000\000L\000\000\000\005\000\000" .size .Lanon.[ID].4, 24 .section ".note.GNU-stack","",@progbits diff --git a/crates/test-assembly/crates/test_msg_send_id/lib.rs b/crates/test-assembly/crates/test_msg_send_retained/lib.rs similarity index 100% rename from crates/test-assembly/crates/test_msg_send_id/lib.rs rename to crates/test-assembly/crates/test_msg_send_retained/lib.rs diff --git a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-aarch64.s b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-aarch64.s index fddd7048b..25d32d288 100644 --- a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-aarch64.s +++ b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-aarch64.s @@ -36,7 +36,7 @@ Lloh6: add x2, x2, l_anon.[ID].1@PAGEOFF mov x0, x19 mov x1, x20 - bl SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + bl SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .loh AdrpLdrGotLdr Lloh2, Lloh3, Lloh4 .loh AdrpAdd Lloh5, Lloh6 diff --git a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-armv7s.s b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-armv7s.s index 16944dd3f..1a415a8d7 100644 --- a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-armv7s.s +++ b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-armv7s.s @@ -35,7 +35,7 @@ LPC1_1: mov r0, r4 mov r1, r5 mov lr, pc - b SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + b SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _use_generic .p2align 2 diff --git a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-old-x86.s b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-old-x86.s index e6de56955..5475917dc 100644 --- a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-old-x86.s +++ b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-old-x86.s @@ -57,7 +57,7 @@ LBB1_2: push eax push ebx push esi - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _use_generic .p2align 4, 0x90 diff --git a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-x86.s b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-x86.s index b2a346e3f..3e4a8802d 100644 --- a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-x86.s +++ b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-x86.s @@ -55,7 +55,7 @@ LBB1_2: push eax push ebx push esi - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _use_generic .p2align 4, 0x90 diff --git a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-x86_64.s b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-x86_64.s index 2c22d9fef..0cb03da45 100644 --- a/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-x86_64.s +++ b/crates/test-assembly/crates/test_msg_send_static_sel/expected/apple-x86_64.s @@ -33,7 +33,7 @@ LBB1_2: lea rdx, [rip + l_anon.[ID].1] mov rdi, rbx mov rsi, r14 - call SYM( as objc2::__macro_helpers::msg_send_id::MsgSendIdFailed>::failed::GENERATED_ID, 0) + call SYM( as objc2::__macro_helpers::msg_send_retained::MsgSendIdFailed>::failed::GENERATED_ID, 0) .globl _use_generic .p2align 4, 0x90 diff --git a/crates/test-ui/ui/extern_methods_invalid_receiver.stderr b/crates/test-ui/ui/extern_methods_invalid_receiver.stderr index 45afbbbfc..c4182981b 100644 --- a/crates/test-ui/ui/extern_methods_invalid_receiver.stderr +++ b/crates/test-ui/ui/extern_methods_invalid_receiver.stderr @@ -15,7 +15,7 @@ error[E0308]: mismatched types = note: expected struct `Allocated<_>` found mutable reference `&mut MyObject` note: associated function defined here - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^ @@ -38,7 +38,7 @@ error[E0308]: mismatched types = note: expected struct `Allocated<_>` found enum `Option>` note: associated function defined here - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^ diff --git a/crates/test-ui/ui/extern_methods_invalid_type.stderr b/crates/test-ui/ui/extern_methods_invalid_type.stderr index 513ca7f4c..d399ad606 100644 --- a/crates/test-ui/ui/extern_methods_invalid_type.stderr +++ b/crates/test-ui/ui/extern_methods_invalid_type.stderr @@ -47,7 +47,7 @@ error[E0277]: the trait bound `i32: MaybeUnwrap` is not satisfied Option> Retained note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` @@ -136,7 +136,7 @@ error[E0277]: the trait bound `Result, Retained>: M Option> Retained note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` diff --git a/crates/test-ui/ui/msg_send_id_alloc_init_different.rs b/crates/test-ui/ui/msg_send_alloc_init_different.rs similarity index 100% rename from crates/test-ui/ui/msg_send_id_alloc_init_different.rs rename to crates/test-ui/ui/msg_send_alloc_init_different.rs diff --git a/crates/test-ui/ui/msg_send_id_alloc_init_different.stderr b/crates/test-ui/ui/msg_send_alloc_init_different.stderr similarity index 88% rename from crates/test-ui/ui/msg_send_id_alloc_init_different.stderr rename to crates/test-ui/ui/msg_send_alloc_init_different.stderr index d2e18309f..d9f01b07b 100644 --- a/crates/test-ui/ui/msg_send_id_alloc_init_different.stderr +++ b/crates/test-ui/ui/msg_send_alloc_init_different.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving ` as MaybeUnwrap>::Input == Option>` - --> ui/msg_send_id_alloc_init_different.rs + --> ui/msg_send_alloc_init_different.rs | | let _: Retained = unsafe { msg_send_id![obj, init] }; | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Option>`, found `Option>` @@ -7,7 +7,7 @@ error[E0271]: type mismatch resolving ` as MaybeUnwrap>::Inp = note: expected enum `Option>` found enum `Option>` note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` diff --git a/crates/test-ui/ui/msg_send_id_invalid_error.rs b/crates/test-ui/ui/msg_send_id_invalid_error.rs deleted file mode 100644 index ba2461662..000000000 --- a/crates/test-ui/ui/msg_send_id_invalid_error.rs +++ /dev/null @@ -1,19 +0,0 @@ -//! Test that msg_send_id! error handling works correctly. -use objc2::rc::{Allocated, Retained}; -use objc2::runtime::{AnyObject, NSObject}; -use objc2::{msg_send_id, ClassType}; - -fn main() { - let obj: &NSObject; - - // Basic bad return type - let _: () = unsafe { msg_send_id![obj, a: _] }; - - // Bad return type from init - let _: Result, Retained> = - unsafe { msg_send_id![NSObject::alloc(), initWithError: _] }; - - // Erroring `alloc` is not supported automatically. - let _: Result, Retained> = - unsafe { msg_send_id![NSObject::class(), allocWithError: _] }; -} diff --git a/crates/test-ui/ui/msg_send_id_invalid_error.stderr b/crates/test-ui/ui/msg_send_id_invalid_error.stderr deleted file mode 100644 index 7ad4711a9..000000000 --- a/crates/test-ui/ui/msg_send_id_invalid_error.stderr +++ /dev/null @@ -1,49 +0,0 @@ -error[E0308]: mismatched types - --> ui/msg_send_id_invalid_error.rs - | - | let _: () = unsafe { msg_send_id![obj, a: _] }; - | ^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `Result, Retained<_>>` - | - = note: expected unit type `()` - found enum `Result, Retained<_>>` - = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0599]: no function or associated item named `alloc` found for struct `NSObject` in the current scope - --> ui/msg_send_id_invalid_error.rs - | - | unsafe { msg_send_id![NSObject::alloc(), initWithError: _] }; - | ^^^^^ function or associated item not found in `NSObject` - | - = help: items from traits can only be used if the trait is in scope -help: trait `AllocAnyThread` which provides `alloc` is implemented but not in scope; perhaps you want to import it - | -2 + use objc2::AllocAnyThread; - | - -error[E0271]: type mismatch resolving `> as MaybeUnwrap>::Input == Allocated<_>` - --> ui/msg_send_id_invalid_error.rs - | - | unsafe { msg_send_id![NSObject::class(), allocWithError: _] }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Allocated<_>`, found `Option>` - | - = note: expected struct `Allocated<_>` - found enum `Option>` -note: required by a bound in `send_message_id_error` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs - | - | unsafe fn send_message_id_error(obj: T, sel: Sel, args: A) -> Result> - | --------------------- required by a bound in this associated function -... - | Option: MaybeUnwrap, - | ^^^^^^^^^ required by this bound in `MsgSendId::send_message_id_error` - = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0308]: mismatched types - --> ui/msg_send_id_invalid_error.rs - | - | unsafe { msg_send_id![NSObject::class(), allocWithError: _] }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result, ...>`, found `Result, Retained<_>>` - | - = note: expected enum `Result, Retained>` - found enum `Result, Retained<_>>` - = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/test-ui/ui/msg_send_id_no_return_type.rs b/crates/test-ui/ui/msg_send_id_no_return_type.rs deleted file mode 100644 index 07b4e427c..000000000 --- a/crates/test-ui/ui/msg_send_id_no_return_type.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! Test that forgetting to annotate the return type fails -use objc2::runtime::NSObject; -use objc2::{msg_send_id, ClassType}; - -fn main() { - unsafe { msg_send_id![NSObject::class(), new] }; -} diff --git a/crates/test-ui/ui/msg_send_id_no_return_type.stderr b/crates/test-ui/ui/msg_send_id_no_return_type.stderr deleted file mode 100644 index 2aca33621..000000000 --- a/crates/test-ui/ui/msg_send_id_no_return_type.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0283]: type annotations needed - --> ui/msg_send_id_no_return_type.rs - | - | unsafe { msg_send_id![NSObject::class(), new] }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type - | - = note: cannot satisfy `_: MaybeUnwrap` - = help: the following types implement trait `MaybeUnwrap`: - Allocated - Option> - Retained -note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs - | - | unsafe fn send_message_id>( - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` - = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/test-ui/ui/msg_send_invalid_error.rs b/crates/test-ui/ui/msg_send_invalid_error.rs index d08b0204b..d18069d2b 100644 --- a/crates/test-ui/ui/msg_send_invalid_error.rs +++ b/crates/test-ui/ui/msg_send_invalid_error.rs @@ -1,6 +1,7 @@ -//! Test that msg_send! error handling works correctly. -use objc2::rc::Retained; -use objc2::{msg_send, ClassType}; +//! Test that message sending with error handling works correctly. +use objc2::rc::{Allocated, Retained}; +use objc2::runtime::{AnyObject, NSObject}; +use objc2::{msg_send, msg_send_id, AllocAnyThread, ClassType}; use objc2_foundation::NSString; fn main() { @@ -16,4 +17,15 @@ fn main() { let _: () = unsafe { msg_send![obj, e: obj, f: _] }; let _: () = unsafe { msg_send![super(obj), g: _] }; let _: () = unsafe { msg_send![super(obj, NSString::class()), h: _] }; + + // Basic bad return type for msg_send_id! + let _: () = unsafe { msg_send_id![obj, a: _] }; + + // Bad return type from init + let _: Result, Retained> = + unsafe { msg_send_id![NSObject::alloc(), initWithError: _] }; + + // Erroring `alloc` is not supported automatically. + let _: Result, Retained> = + unsafe { msg_send_id![NSObject::class(), allocWithError: _] }; } diff --git a/crates/test-ui/ui/msg_send_invalid_error.stderr b/crates/test-ui/ui/msg_send_invalid_error.stderr index 4d4e8aa16..a6021b81e 100644 --- a/crates/test-ui/ui/msg_send_invalid_error.stderr +++ b/crates/test-ui/ui/msg_send_invalid_error.stderr @@ -103,3 +103,51 @@ help: consider using `Result::expect` to unwrap the `Result<(), Retained<_>>` va | | ($crate::__msg_send_helper.expect("REASON")) | +++++++++++++++++ + +error[E0308]: mismatched types + --> ui/msg_send_invalid_error.rs + | + | let _: () = unsafe { msg_send_id![obj, a: _] }; + | ^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `Result, Retained<_>>` + | + = note: expected unit type `()` + found enum `Result, Retained<_>>` + = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0308]: mismatched types + --> ui/msg_send_invalid_error.rs + | + | unsafe { msg_send_id![NSObject::alloc(), initWithError: _] }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result, ...>`, found `Result, ...>` + | + = note: expected enum `Result, Retained>` + found enum `Result, Retained<_>>` + = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0271]: type mismatch resolving `> as MaybeUnwrap>::Input == Allocated<_>` + --> ui/msg_send_invalid_error.rs + | + | unsafe { msg_send_id![NSObject::class(), allocWithError: _] }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Allocated<_>`, found `Option>` + | + = note: expected struct `Allocated<_>` + found enum `Option>` +note: required by a bound in `send_message_id_error` + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs + | + | unsafe fn send_message_id_error(obj: T, sel: Sel, args: A) -> Result> + | --------------------- required by a bound in this associated function +... + | Option: MaybeUnwrap, + | ^^^^^^^^^ required by this bound in `MsgSendId::send_message_id_error` + = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0308]: mismatched types + --> ui/msg_send_invalid_error.rs + | + | unsafe { msg_send_id![NSObject::class(), allocWithError: _] }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result, ...>`, found `Result, Retained<_>>` + | + = note: expected enum `Result, Retained>` + found enum `Result, Retained<_>>` + = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/test-ui/ui/msg_send_id_invalid_method.rs b/crates/test-ui/ui/msg_send_invalid_method.rs similarity index 100% rename from crates/test-ui/ui/msg_send_id_invalid_method.rs rename to crates/test-ui/ui/msg_send_invalid_method.rs diff --git a/crates/test-ui/ui/msg_send_id_invalid_method.stderr b/crates/test-ui/ui/msg_send_invalid_method.stderr similarity index 91% rename from crates/test-ui/ui/msg_send_id_invalid_method.stderr rename to crates/test-ui/ui/msg_send_invalid_method.stderr index 247f1c5d2..4982d16cf 100644 --- a/crates/test-ui/ui/msg_send_id_invalid_method.stderr +++ b/crates/test-ui/ui/msg_send_invalid_method.stderr @@ -1,5 +1,5 @@ error: msg_send_id![obj, retain] is not supported. Use `Retained::retain` instead - --> ui/msg_send_id_invalid_method.rs + --> ui/msg_send_invalid_method.rs | | unsafe { msg_send_id![object, retain] }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ error: msg_send_id![obj, retain] is not supported. Use `Retained::retain` instea = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error: msg_send_id![obj, release] is not supported. Drop an `Retained` instead - --> ui/msg_send_id_invalid_method.rs + --> ui/msg_send_invalid_method.rs | | unsafe { msg_send_id![object, release] }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ error: msg_send_id![obj, release] is not supported. Drop an `Retained` instead = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error: msg_send_id![obj, autorelease] is not supported. Use `Retained::autorelease` - --> ui/msg_send_id_invalid_method.rs + --> ui/msg_send_invalid_method.rs | | unsafe { msg_send_id![object, autorelease] }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ error: msg_send_id![obj, autorelease] is not supported. Use `Retained::autorelea = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error: msg_send_id![obj, dealloc] is not supported. Drop an `Retained` instead - --> ui/msg_send_id_invalid_method.rs + --> ui/msg_send_invalid_method.rs | | unsafe { msg_send_id![object, dealloc] }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/test-ui/ui/msg_send_id_invalid_receiver.rs b/crates/test-ui/ui/msg_send_invalid_receiver.rs similarity index 100% rename from crates/test-ui/ui/msg_send_id_invalid_receiver.rs rename to crates/test-ui/ui/msg_send_invalid_receiver.rs diff --git a/crates/test-ui/ui/msg_send_id_invalid_receiver.stderr b/crates/test-ui/ui/msg_send_invalid_receiver.stderr similarity index 89% rename from crates/test-ui/ui/msg_send_id_invalid_receiver.stderr rename to crates/test-ui/ui/msg_send_invalid_receiver.stderr index 3f7cf7521..56a086d5f 100644 --- a/crates/test-ui/ui/msg_send_id_invalid_receiver.stderr +++ b/crates/test-ui/ui/msg_send_invalid_receiver.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> ui/msg_send_id_invalid_receiver.rs + --> ui/msg_send_invalid_receiver.rs | | let _: Allocated = unsafe { msg_send_id![obj, alloc] }; | -------------^^^-------- @@ -10,13 +10,13 @@ error[E0308]: mismatched types = note: expected reference `&AnyClass` found reference `&NSObject` note: associated function defined here - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | pub unsafe fn send_message_id_alloc>>( | ^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> ui/msg_send_id_invalid_receiver.rs + --> ui/msg_send_invalid_receiver.rs | | let _: Retained = unsafe { msg_send_id![obj, init] }; | -------------^^^------- @@ -27,13 +27,13 @@ error[E0308]: mismatched types = note: expected struct `Allocated<_>` found reference `&NSObject` note: associated function defined here - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> ui/msg_send_id_invalid_receiver.rs + --> ui/msg_send_invalid_receiver.rs | | let _: Retained = unsafe { msg_send_id![cls, init] }; | -------------^^^------- @@ -44,13 +44,13 @@ error[E0308]: mismatched types = note: expected struct `Allocated<_>` found reference `&AnyClass` note: associated function defined here - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> ui/msg_send_id_invalid_receiver.rs + --> ui/msg_send_invalid_receiver.rs | | let _: Retained = unsafe { msg_send_id![obj, init] }; | -------------^^^------- @@ -61,13 +61,13 @@ error[E0308]: mismatched types = note: expected struct `Allocated<_>` found struct `Retained` note: associated function defined here - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> ui/msg_send_id_invalid_receiver.rs + --> ui/msg_send_invalid_receiver.rs | | let _: Retained = unsafe { msg_send_id![obj, init] }; | -------------^^^------- @@ -78,13 +78,13 @@ error[E0308]: mismatched types = note: expected struct `Allocated<_>` found enum `Option>` note: associated function defined here - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^ error[E0277]: the trait bound `Retained: MessageReceiver` is not satisfied - --> ui/msg_send_id_invalid_receiver.rs + --> ui/msg_send_invalid_receiver.rs | | let _: Retained = unsafe { msg_send_id![obj, new] }; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `MessageReceiver` is not implemented for `Retained`, which is required by `RetainSemantics<1>: MsgSendId<_, _>` @@ -102,7 +102,7 @@ error[E0277]: the trait bound `Retained: MessageReceiver` is not satis = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Retained: MessageReceiver` is not satisfied - --> ui/msg_send_id_invalid_receiver.rs + --> ui/msg_send_invalid_receiver.rs | | let _: Retained = unsafe { msg_send_id![obj, copy] }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `MessageReceiver` is not implemented for `Retained`, which is required by `RetainSemantics<4>: MsgSendId<_, _>` diff --git a/crates/test-ui/ui/msg_send_id_invalid_return.rs b/crates/test-ui/ui/msg_send_invalid_return.rs similarity index 100% rename from crates/test-ui/ui/msg_send_id_invalid_return.rs rename to crates/test-ui/ui/msg_send_invalid_return.rs diff --git a/crates/test-ui/ui/msg_send_id_invalid_return.stderr b/crates/test-ui/ui/msg_send_invalid_return.stderr similarity index 82% rename from crates/test-ui/ui/msg_send_id_invalid_return.stderr rename to crates/test-ui/ui/msg_send_invalid_return.stderr index bb597c62a..9783acd01 100644 --- a/crates/test-ui/ui/msg_send_id_invalid_return.stderr +++ b/crates/test-ui/ui/msg_send_invalid_return.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: &AnyObject = unsafe { msg_send_id![cls, new] }; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `MaybeUnwrap` is not implemented for `&AnyObject` @@ -9,14 +9,14 @@ error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied Option> Retained note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `AnyClass: Message` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: Retained = unsafe { msg_send_id![cls, new] }; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Message` is not implemented for `AnyClass`, which is required by `RetainSemantics<1>: MsgSendId<_, _>` @@ -31,7 +31,7 @@ error[E0277]: the trait bound `AnyClass: Message` is not satisfied = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `AnyClass: Message` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: Option> = unsafe { msg_send_id![cls, new] }; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Message` is not implemented for `AnyClass`, which is required by `RetainSemantics<1>: MsgSendId<_, _>` @@ -46,7 +46,7 @@ error[E0277]: the trait bound `AnyClass: Message` is not satisfied = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: &AnyObject = unsafe { msg_send_id![cls, alloc] }; | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MaybeUnwrap` is not implemented for `&AnyObject` @@ -55,15 +55,15 @@ error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied Allocated Option> Retained -note: required by a bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs +note: required by a bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | pub unsafe fn send_message_id_alloc>>( - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `AnyClass: Message` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: Allocated = unsafe { msg_send_id![cls, alloc] }; | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Message` is not implemented for `AnyClass` @@ -74,59 +74,59 @@ error[E0277]: the trait bound `AnyClass: Message` is not satisfied NSObject ProtocolObject

__NSProxy -note: required by a bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs +note: required by a bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | pub unsafe fn send_message_id_alloc>>( - | ^^^^^^^ required by this bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` + | ^^^^^^^ required by this bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0271]: type mismatch resolving ` as MaybeUnwrap>::Input == Allocated<_>` - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: Retained = unsafe { msg_send_id![cls, alloc] }; | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `Allocated<_>`, found `Option>` | = note: expected struct `Allocated<_>` found enum `Option>` -note: required by a bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs +note: required by a bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | pub unsafe fn send_message_id_alloc>>( - | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` + | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Option>: MaybeUnwrap` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: Option> = unsafe { msg_send_id![cls, alloc] }; | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MaybeUnwrap` is not implemented for `Option>` | = help: the trait `MaybeUnwrap` is implemented for `Option>` -note: required by a bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs +note: required by a bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | pub unsafe fn send_message_id_alloc>>( - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0271]: type mismatch resolving `> as MaybeUnwrap>::Input == Allocated<_>` - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: Retained> = unsafe { msg_send_id![cls, alloc] }; | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `Allocated<_>`, found `Option>>` | = note: expected struct `Allocated<_>` found enum `Option>>` -note: required by a bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs +note: required by a bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | pub unsafe fn send_message_id_alloc>>( - | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `__macro_helpers::msg_send_id::>::send_message_id_alloc` + | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `__macro_helpers::msg_send_retained::>::send_message_id_alloc` = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: &AnyObject = unsafe { msg_send_id![obj, init] }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `MaybeUnwrap` is not implemented for `&AnyObject` @@ -136,14 +136,14 @@ error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied Option> Retained note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0271]: type mismatch resolving ` as MaybeUnwrap>::Input == Option>` - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: Retained = unsafe { msg_send_id![obj, init] }; | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Option>`, found `Option>` @@ -151,14 +151,14 @@ error[E0271]: type mismatch resolving ` as MaybeUnwrap>::Inpu = note: expected enum `Option>` found enum `Option>` note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0271]: type mismatch resolving ` as MaybeUnwrap>::Input == Option>` - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: Retained = unsafe { msg_send_id![obj, init] }; | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Option>`, found `Option>` @@ -166,14 +166,14 @@ error[E0271]: type mismatch resolving ` as MaybeUnwrap>::Inpu = note: expected enum `Option>` found enum `Option>` note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` = note: this error originates in the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: &AnyObject = unsafe { msg_send_id![obj, copy] }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `MaybeUnwrap` is not implemented for `&AnyObject` @@ -183,14 +183,14 @@ error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied Option> Retained note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: &AnyObject = unsafe { msg_send_id![obj, description] }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MaybeUnwrap` is not implemented for `&AnyObject` @@ -200,21 +200,21 @@ error[E0277]: the trait bound `&AnyObject: MaybeUnwrap` is not satisfied Option> Retained note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` = note: this error originates in the macro `$crate::__msg_send_id_helper` which comes from the expansion of the macro `msg_send_id` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Option<&AnyObject>: MaybeUnwrap` is not satisfied - --> ui/msg_send_id_invalid_return.rs + --> ui/msg_send_invalid_return.rs | | let _: Option<&AnyObject> = unsafe { msg_send_id![obj, description] }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MaybeUnwrap` is not implemented for `Option<&AnyObject>` | = help: the trait `MaybeUnwrap` is implemented for `Option>` note: required by a bound in `send_message_id` - --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_id.rs + --> $WORKSPACE/crates/objc2/src/__macro_helpers/msg_send_retained.rs | | unsafe fn send_message_id>( | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `MsgSendId::send_message_id` diff --git a/crates/test-ui/ui/msg_send_no_return_type.rs b/crates/test-ui/ui/msg_send_no_return_type.rs index bf2eb967a..81836d29b 100644 --- a/crates/test-ui/ui/msg_send_no_return_type.rs +++ b/crates/test-ui/ui/msg_send_no_return_type.rs @@ -1,8 +1,11 @@ //! Test that forgetting to annotate the return type fails //! See https://github.com/SSheldon/rust-objc/issues/62 -use objc2::{class, msg_send}; +use objc2::{class, msg_send, msg_send_id}; fn main() { let cls = class!(NSObject); + unsafe { msg_send![cls, new] }; + + unsafe { msg_send_id![cls, new] }; } diff --git a/crates/test-ui/ui/msg_send_id_underspecified.rs b/crates/test-ui/ui/msg_send_underspecified.rs similarity index 100% rename from crates/test-ui/ui/msg_send_id_underspecified.rs rename to crates/test-ui/ui/msg_send_underspecified.rs diff --git a/crates/test-ui/ui/msg_send_id_underspecified.stderr b/crates/test-ui/ui/msg_send_underspecified.stderr similarity index 84% rename from crates/test-ui/ui/msg_send_id_underspecified.stderr rename to crates/test-ui/ui/msg_send_underspecified.stderr index 10800fb6a..c6859b570 100644 --- a/crates/test-ui/ui/msg_send_id_underspecified.stderr +++ b/crates/test-ui/ui/msg_send_underspecified.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> ui/msg_send_id_underspecified.rs + --> ui/msg_send_underspecified.rs | | let _: &NSObject = &*unsafe { msg_send_id![obj, description] }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type diff --git a/crates/test-ui/ui/msg_send_id_underspecified_error1.rs b/crates/test-ui/ui/msg_send_underspecified_error1.rs similarity index 100% rename from crates/test-ui/ui/msg_send_id_underspecified_error1.rs rename to crates/test-ui/ui/msg_send_underspecified_error1.rs diff --git a/crates/test-ui/ui/msg_send_id_underspecified_error1.stderr b/crates/test-ui/ui/msg_send_underspecified_error1.stderr similarity index 81% rename from crates/test-ui/ui/msg_send_id_underspecified_error1.stderr rename to crates/test-ui/ui/msg_send_underspecified_error1.stderr index 0f2f15c4f..045fe1b36 100644 --- a/crates/test-ui/ui/msg_send_id_underspecified_error1.stderr +++ b/crates/test-ui/ui/msg_send_underspecified_error1.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> ui/msg_send_id_underspecified_error1.rs + --> ui/msg_send_underspecified_error1.rs | | let _: Result, _> = unsafe { msg_send_id![obj, error: _] }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type diff --git a/crates/test-ui/ui/msg_send_id_underspecified_error2.rs b/crates/test-ui/ui/msg_send_underspecified_error2.rs similarity index 100% rename from crates/test-ui/ui/msg_send_id_underspecified_error2.rs rename to crates/test-ui/ui/msg_send_underspecified_error2.rs diff --git a/crates/test-ui/ui/msg_send_id_underspecified_error2.stderr b/crates/test-ui/ui/msg_send_underspecified_error2.stderr similarity index 80% rename from crates/test-ui/ui/msg_send_id_underspecified_error2.stderr rename to crates/test-ui/ui/msg_send_underspecified_error2.stderr index 7e46546d8..86230ce1a 100644 --- a/crates/test-ui/ui/msg_send_id_underspecified_error2.stderr +++ b/crates/test-ui/ui/msg_send_underspecified_error2.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> ui/msg_send_id_underspecified_error2.rs + --> ui/msg_send_underspecified_error2.rs | | let _: Result<_, Retained> = unsafe { msg_send_id![obj, error: _] }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type diff --git a/crates/test-ui/ui/msg_send_id_underspecified_error3.rs b/crates/test-ui/ui/msg_send_underspecified_error3.rs similarity index 100% rename from crates/test-ui/ui/msg_send_id_underspecified_error3.rs rename to crates/test-ui/ui/msg_send_underspecified_error3.rs diff --git a/crates/test-ui/ui/msg_send_id_underspecified_error3.stderr b/crates/test-ui/ui/msg_send_underspecified_error3.stderr similarity index 77% rename from crates/test-ui/ui/msg_send_id_underspecified_error3.stderr rename to crates/test-ui/ui/msg_send_underspecified_error3.stderr index 44ac1de4d..dadfb21b0 100644 --- a/crates/test-ui/ui/msg_send_id_underspecified_error3.stderr +++ b/crates/test-ui/ui/msg_send_underspecified_error3.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> ui/msg_send_id_underspecified_error3.rs + --> ui/msg_send_underspecified_error3.rs | | let _: Result<_, _> = unsafe { msg_send_id![obj, error: _] }; | ^^^^^^^^^^^^ cannot infer type diff --git a/crates/test-ui/ui/msg_send_id_unwrap.rs b/crates/test-ui/ui/msg_send_unwrap.rs similarity index 100% rename from crates/test-ui/ui/msg_send_id_unwrap.rs rename to crates/test-ui/ui/msg_send_unwrap.rs diff --git a/crates/test-ui/ui/msg_send_id_unwrap.stderr b/crates/test-ui/ui/msg_send_unwrap.stderr similarity index 91% rename from crates/test-ui/ui/msg_send_id_unwrap.stderr rename to crates/test-ui/ui/msg_send_unwrap.stderr index 87d976633..fcbd3d8c7 100644 --- a/crates/test-ui/ui/msg_send_id_unwrap.stderr +++ b/crates/test-ui/ui/msg_send_unwrap.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> ui/msg_send_id_unwrap.rs + --> ui/msg_send_unwrap.rs | | let _: Retained = unsafe { msg_send_id![cls, new].unwrap() }; | ^^^^^^^^^^^^^^^^^^^^^^ cannot infer type