Skip to content

Commit 8825e1f

Browse files
committed
library/coretests/tests/fmt/mod.rs: Add HRTB fn pointer case
1 parent ec6f622 commit 8825e1f

File tree

1 file changed

+6
-0
lines changed
  • library/coretests/tests/fmt

1 file changed

+6
-0
lines changed

library/coretests/tests/fmt/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ fn test_format_flags() {
3030
assert_eq!(format!("{:p} {:x}", p, 16), format!("{p:p} 10"));
3131

3232
assert_eq!(format!("{: >3}", 'a'), " a");
33+
34+
/// Regression test for <https://github.com/rust-lang/rust/issues/50280#issuecomment-626035934>.
35+
fn show(a: fn() -> f32, b: fn(&Vec<i8>) -> f32) {
36+
println!("the two pointers: {:p} {:p}", a, b);
37+
}
38+
show(|| 1.0, |_| 2.0);
3339
}
3440

3541
#[test]

0 commit comments

Comments
 (0)