fn drop
Destroys a value immediately (§5.8).
Example:
fn main() io {
let big = [1, 2, 3]
drop(big)
print("dropped early")
}Output
dropped early
@intrinsic("drop") pub(api) fn drop<T>(x: T)Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
x | T |
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/functions.oxl:162