[−][src]Macro pui::make_scoped
Create a new scoped identifier with the provided name
this identifier may be used until the end of the scope
for example, this works:
fn pass() { pui::make_scoped!(foo); let _foo_handle = foo.handle(); }
but this fails
ⓘ
fn fail() { { pui::make_scoped!(foo); } let _foo_handle = foo.handle(); }
Note: you cannot intermix different scoped identifiers declared in the same scope
ⓘ
fn fail() { pui::make_scoped!(foo); pui::make_scoped!(bar); assert_eq!(foo, bar); }