Are consts really allocations?

⚓ Rust    📅 2025-08-17    👤 surdeus    👁️ 3      

surdeus

The standard library documentation says:

Examples of allocations include heap allocations, stack-allocated variables, statics, and consts.

Consts aren't allocations... are they? Each use of one is, I guess, in the sense that all temporaries are allocations.

2 posts - 2 participants

Read full topic

🏷️ Rust_feed