about summary refs log tree commit diff
path: root/tests/ui/regions
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-08-28 02:37:38 +0000
committerMichael Goulet <michael@errs.io>2023-08-30 15:09:40 -0700
commitbf66723c0ecbadc3b4b24da44fa02b7ea3cd73bb (patch)
tree3239ecc9f73116928e02f714a72410b16f89854c /tests/ui/regions
parent0100a94231344987bc93998d5975e656bfd7767d (diff)
downloadrust-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/regions')
-rw-r--r--tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr1
-rw-r--r--tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr1
-rw-r--r--tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr1
-rw-r--r--tests/ui/regions/regions-lifetime-bounds-on-fns.stderr1
4 files changed, 0 insertions, 4 deletions
diff --git a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
index f2328cf3b24..a9a92b7a695 100644
--- a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
+++ b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
@@ -8,7 +8,6 @@ LL |     let _: fn(&mut &isize, &mut &isize) = a;
    |
    = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)`
                  found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}`
-   = note: when the arguments and return types match, functions can be coerced to function pointers
 
 error: aborting due to previous error
 
diff --git a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
index 9c5004981d5..e96559937d4 100644
--- a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
+++ b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
@@ -8,7 +8,6 @@ LL |     let _: fn(&mut &isize, &mut &isize, &mut &isize) = a;
    |
    = note: expected fn pointer `for<'a, 'b, 'c, 'd, 'e, 'f> fn(&'a mut &'b isize, &'c mut &'d isize, &'e mut &'f isize)`
                  found fn item `for<'a, 'b, 'c> fn(&'a mut &isize, &'b mut &isize, &'c mut &isize) {a::<'_, '_, '_>}`
-   = note: when the arguments and return types match, functions can be coerced to function pointers
 
 error: aborting due to previous error
 
diff --git a/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr b/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr
index 766a3d0337c..8d82ff958ff 100644
--- a/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr
+++ b/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr
@@ -8,7 +8,6 @@ LL |     want_G(baz);
    |
    = note: expected fn pointer `for<'cx> fn(&'cx S) -> &'static S`
                  found fn item `for<'a> fn(&'a S) -> &'a S {baz}`
-   = note: when the arguments and return types match, functions can be coerced to function pointers
 note: function defined here
   --> $DIR/regions-fn-subtyping-return-static-fail.rs:20:4
    |
diff --git a/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr b/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr
index 2fab2986567..53a5612d24f 100644
--- a/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr
+++ b/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr
@@ -8,7 +8,6 @@ LL |     let _: fn(&mut &isize, &mut &isize) = a;
    |
    = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)`
                  found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}`
-   = note: when the arguments and return types match, functions can be coerced to function pointers
 
 error: aborting due to previous error