diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2025-08-30 05:00:00 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2025-08-30 05:00:00 +0000 |
| commit | d269d234e033e2b52722ea78767fe10898184993 (patch) | |
| tree | f3ccfe3fdc0af4ed3cda4e0352ba5743c1c10536 /tests/ui/function-pointer | |
| parent | 435de36225382f763cc7ce6d744365c75c318596 (diff) | |
| parent | e004014d1bf4c29928a0f0f9f7d0964d43606cbd (diff) | |
| download | rust-d269d234e033e2b52722ea78767fe10898184993.tar.gz rust-d269d234e033e2b52722ea78767fe10898184993.zip | |
Merge ref 'e004014d1bf4' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: e004014d1bf4c29928a0f0f9f7d0964d43606cbd Filtered ref: d62798e442c1c6ec461725b87dacc87c285259c8 This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'tests/ui/function-pointer')
| -rw-r--r-- | tests/ui/function-pointer/function-pointer-comparison-54696.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/function-pointer/function-pointer-comparison-54696.rs b/tests/ui/function-pointer/function-pointer-comparison-54696.rs new file mode 100644 index 00000000000..2e28dfeaaf8 --- /dev/null +++ b/tests/ui/function-pointer/function-pointer-comparison-54696.rs @@ -0,0 +1,11 @@ +// https://github.com/rust-lang/rust/issues/54696 +//@ run-pass + +#![allow(unpredictable_function_pointer_comparisons)] + +fn main() { + // We shouldn't promote this + let _ = &(main as fn() == main as fn()); + // Also check nested case + let _ = &(&(main as fn()) == &(main as fn())); +} |
