Skip to content

Commit f62ad7d

Browse files
committed
remove stuff about #define
This obscures more than it helps. Fixes #25573
1 parent 7b0f2af commit f62ad7d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/doc/trpl/const-and-static.md

-4
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,3 @@ Almost always, if you can choose between the two, choose `const`. It’s pretty
7878
rare that you actually want a memory location associated with your constant,
7979
and using a const allows for optimizations like constant propagation not only
8080
in your crate but downstream crates.
81-
82-
A const can be thought of as a `#define` in C: it has metadata overhead but it
83-
has no runtime overhead. “Should I use a #define or a static in C,” is largely
84-
the same question as whether you should use a const or a static in Rust.

0 commit comments

Comments
 (0)