diff options
| author | bors <bors@rust-lang.org> | 2022-09-25 08:09:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-25 08:09:02 +0000 |
| commit | 5bd3b569dc282e3cf78aeec3cecb0bca64280140 (patch) | |
| tree | a81bd14261a7d0b8e3b0e4303ecc12eaed6e8ce9 /tests/ui | |
| parent | 8b1ad17e5c9931097240b659e9f596985ad5ba45 (diff) | |
| parent | 1141c553d8b443bdebc95e2fc13b04bd02031733 (diff) | |
| download | rust-5bd3b569dc282e3cf78aeec3cecb0bca64280140.tar.gz rust-5bd3b569dc282e3cf78aeec3cecb0bca64280140.zip | |
Auto merge of #9531 - Jarcho:ice_9459, r=llogiq
Fix ICE in `needless_pass_by_value` with unsized `dyn Fn` fixes #9459 Not really sure why a query for a type implementing `FnOnce` even works since the trait if `FnOnce<T>`, but it seems to. I would have expected it to crash like it does when passing `dyn FnOnce()` as the type. changelog: [`needless_pass_by_value`](https://rust-lang.github.io/rust-clippy/master/#needless_pass_by_value) Fix ICE in with unsized `dyn Fn` argument
Diffstat (limited to 'tests/ui')
| -rw-r--r-- | tests/ui/crashes/ice-9459.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/crashes/ice-9459.rs b/tests/ui/crashes/ice-9459.rs new file mode 100644 index 00000000000..55615124fcf --- /dev/null +++ b/tests/ui/crashes/ice-9459.rs @@ -0,0 +1,5 @@ +#![feature(unsized_fn_params)] + +pub fn f0(_f: dyn FnOnce()) {} + +fn main() {} |
