about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-21 20:59:03 +0000
committerbors <bors@rust-lang.org>2022-10-21 20:59:03 +0000
commit5c8bff74bc1c52bef0c79f3689bb227f51f3e82d (patch)
tree2a7a76815d9db8695c48e24f3be754628627b65d /src/test
parent57e2c06a8df3187980801962015a88657abd033d (diff)
parentefe61dab2148ff0780a85b045052e898fd800492 (diff)
downloadrust-5c8bff74bc1c52bef0c79f3689bb227f51f3e82d.tar.gz
rust-5c8bff74bc1c52bef0c79f3689bb227f51f3e82d.zip
Auto merge of #101263 - lopopolo:lopopolo/c-unwind-fn-ptr-impls, r=thomcc
Add default trait implementations for "c-unwind" ABI function pointers

Following up on #92964, only add default trait implementations for the `c-unwind` family of function pointers. The previous attempt in #92964 added trait implementations for many more ABIs and ran into concerns regarding the increase in size of the libcore rlib.

An attempt to abstract away function pointer types behind a unified trait to reduce the duplication of trait impls is being discussed in #99531 but this change looks to be blocked on a lang MCP.

Following `@RalfJung's` suggestion in https://github.com/rust-lang/rust/pull/99531#issuecomment-1233440142, this commit is another cut at #92964 but it _only_ adds the impls for `extern "C-unwind" fn` and `unsafe extern "C-unwind" fn`.

I am interested in landing this patch to unblock the stabilization of the `c_unwind` feature.

RFC: https://github.com/rust-lang/rfcs/pull/2945
Tracking Issue: https://github.com/rust-lang/rust/issues/74990
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/issues/issue-59488.stderr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr
index 08fe0b35eb7..f9846b62a72 100644
--- a/src/test/ui/issues/issue-59488.stderr
+++ b/src/test/ui/issues/issue-59488.stderr
@@ -99,7 +99,7 @@ LL |     assert_eq!(Foo::Bar, i);
              extern "C" fn(A, B, C, D) -> Ret
              extern "C" fn(A, B, C, D, ...) -> Ret
              extern "C" fn(A, B, C, D, E) -> Ret
-           and 68 others
+           and 118 others
    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
@@ -118,7 +118,7 @@ LL |     assert_eq!(Foo::Bar, i);
              extern "C" fn(A, B, C, D) -> Ret
              extern "C" fn(A, B, C, D, ...) -> Ret
              extern "C" fn(A, B, C, D, E) -> Ret
-           and 68 others
+           and 118 others
    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 10 previous errors