about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2024-04-10 10:15:26 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2024-05-04 19:26:51 +0000
commitd223ba6233455544818e0998d3352de8e237c896 (patch)
tree1a023edd9d2ac7e365b877f7af24b39a46577ff1
parent9aec5c5bcecad566a76fc7dbb819aa0e58a23671 (diff)
downloadrust-d223ba6233455544818e0998d3352de8e237c896.tar.gz
rust-d223ba6233455544818e0998d3352de8e237c896.zip
Document test.
-rw-r--r--tests/ui/mir/static_fnptr.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/mir/static_fnptr.rs b/tests/ui/mir/static_fnptr.rs
index 571dcf4463e..6b1ec021629 100644
--- a/tests/ui/mir/static_fnptr.rs
+++ b/tests/ui/mir/static_fnptr.rs
@@ -1,3 +1,10 @@
+//! Verify that we correctly handle fn pointer provenance in MIR optimizations.
+//! By asking to inline `static_fnptr::bar`, we have two copies of `static_fnptr::foo`, one in the
+//! auxiliary crate and one in the local crate CGU.
+//! `baz` must only consider the versions from upstream crate, and not try to compare with the
+//! address of the CGU-local copy.
+//! Related issue: #123670
+
 //@ run-pass
 //@ compile-flags:-Cno-prepopulate-passes -Copt-level=0
 //@ aux-build:static_fnptr.rs