Open
Description
I expected to be able to write
const { &Backtrace::disabled() }
but it yields the error
error[E0492]: constants cannot refer to interior mutable data
This is surprising because:
- A disabled Backtrace is an empty enum variant without interior mutable data.
- The error refers to a library implementation detail which is a bit confusing.
- This seems like something I ought to be able to do.
Although there is an easy workaround which is to use a static
.
Rust version: 1.88.0