Tracking issue for cfg_match · Issue #115585 · rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@c410-f3r

Description

@c410-f3r

Provides a native way to easily manage multiple conditional flags without having to rewrite each clause multiple times.

Public API

cfg_match! { unix => { fn foo() { /* unix specific functionality / } } target_pointer_width = "32" => { fn foo() { / non-unix, 32-bit functionality / } } _ => { fn foo() { / fallback implementation */ } } }

Steps / History

Unresolved Questions

References