diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-03-31 14:01:48 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-03-31 14:01:48 +0000 |
| commit | 7d891166f9f3f3bf084209b4e8fd5caedd2c33a3 (patch) | |
| tree | eb5352704ad6b1f000ef074a994247ff0553c396 | |
| parent | de08218f24998eb977170723dc0e334798494d85 (diff) | |
Add regression test
| -rw-r--r-- | tests/ui/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs b/tests/ui/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs new file mode 100644 index 00000000000..1726cf82e2b --- /dev/null +++ b/tests/ui/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs @@ -0,0 +1,8 @@ +// check-pass + +type I32Cmp = fn(&i32, &i32) -> core::cmp::Ordering; +pub const fn min_by_i32() -> fn(i32, i32, I32Cmp) -> i32 { + core::cmp::min_by +} + +fn main() {} |
