Skip to content

Commit fd26b32

Browse files
authored
Rollup merge of #150082 - Enselic:hrtb-fn-pointer, r=fee1-dead
tests/ui/traits/fmt-pointer-trait.rs: Add HRTB fn pointer case Closes #50280 which just **E-needs-test**. See #50280 (comment) for a bisect of the fix. The issue description is quite vague, so in the test I am linking directly to the most descriptive comment #50280 (comment).
2 parents 6965028 + 8825e1f commit fd26b32

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)