diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2020-02-16 10:17:01 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2020-02-17 09:18:33 -0500 |
| commit | f6bfdc95445180aee579dcacc6e6bdc4e6ecf56f (patch) | |
| tree | 6fe6da3b410876a8212136d6795de6e247529f2c /src/test/rustdoc-ui/coverage/json.rs | |
| parent | 34ef8f5441d5335c4177abd622383ed34a6e9315 (diff) | |
| download | rust-f6bfdc95445180aee579dcacc6e6bdc4e6ecf56f.tar.gz rust-f6bfdc95445180aee579dcacc6e6bdc4e6ecf56f.zip | |
Move the show_usize marker function to a static
Currently, function items are always tagged unnamed_addr, which means that casting a function to a function pointer is not guaranteed to produce a deterministic address. However, once a function pointer is created, we do expect that to remain stable. So, this changes the show_usize function to a static containing a function pointer and uses that for comparisons. Notably, a *static* may have 'unstable' address, but the function pointer within it must be constant. Resolves issue 58320.
Diffstat (limited to 'src/test/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions
