Skip to content

Commit 0365205

Browse files
reference to a *type*
1 parent 4867fa7 commit 0365205

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

posts/inside-rust/2019-11-23-const-if-match.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ fn main() {
123123
}
124124
```
125125

126-
However, it is sometimes okay for a `const` to contain a *type* that allows
127-
interior mutability, as long as we can prove that the actual *value* of that
128-
type does not. This is particularly useful for `enum`s with a "unit variant"
129-
(e.g., `Option::None`).
126+
However, it is sometimes okay for a `const` to contain a reference to a *type*
127+
that may have interior mutability, as long as we can prove that the actual
128+
*value* of that type does not. This is particularly useful for `enum`s with a
129+
"unit variant" (e.g., `Option::None`).
130130

131131
```rust
132132
const NO_CELL: Option<&std::cell::Cell<i32>> = None; // OK

0 commit comments

Comments
 (0)