diff options
Diffstat (limited to 'tests/ui/mir/mir_coercion_casts.rs')
| -rw-r--r-- | tests/ui/mir/mir_coercion_casts.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/mir/mir_coercion_casts.rs b/tests/ui/mir/mir_coercion_casts.rs new file mode 100644 index 00000000000..7d761181d80 --- /dev/null +++ b/tests/ui/mir/mir_coercion_casts.rs @@ -0,0 +1,10 @@ +// run-pass +// Tests the coercion casts are handled properly + +fn main() { + // This should produce only a reification of f, + // not a fn -> fn cast as well + let _ = f as fn(&()); +} + +fn f<'a>(_: &'a ()) { } |
