diff options
| author | Michael Goulet <michael@errs.io> | 2023-08-28 02:37:38 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-08-30 15:09:40 -0700 |
| commit | bf66723c0ecbadc3b4b24da44fa02b7ea3cd73bb (patch) | |
| tree | 3239ecc9f73116928e02f714a72410b16f89854c /tests/ui/rfcs | |
| parent | 0100a94231344987bc93998d5975e656bfd7767d (diff) | |
| download | rust-bf66723c0ecbadc3b4b24da44fa02b7ea3cd73bb.tar.gz rust-bf66723c0ecbadc3b4b24da44fa02b7ea3cd73bb.zip | |
Test and note unsafe ctor to fn ptr coercion
Also remove a note that I don't consider to be very useful in context.
Diffstat (limited to 'tests/ui/rfcs')
| -rw-r--r-- | tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr | 1 | ||||
| -rw-r--r-- | tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr index b0ac5dc44ad..e08ffe42d6a 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr @@ -13,7 +13,6 @@ LL | let foo: fn() = foo; found fn item `fn() {foo}` = note: fn items are distinct from fn pointers = note: functions with `#[target_feature]` can only be coerced to `unsafe` function pointers - = note: when the arguments and return types match, functions can be coerced to function pointers help: consider casting to a fn pointer | LL | let foo: fn() = foo as fn(); diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr index b0ac5dc44ad..e08ffe42d6a 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr @@ -13,7 +13,6 @@ LL | let foo: fn() = foo; found fn item `fn() {foo}` = note: fn items are distinct from fn pointers = note: functions with `#[target_feature]` can only be coerced to `unsafe` function pointers - = note: when the arguments and return types match, functions can be coerced to function pointers help: consider casting to a fn pointer | LL | let foo: fn() = foo as fn(); |
