Skip to main content

max / quasi

592 B · 22 lines History Blame Raw
1 //! The remedy the refusal names, which has to keep compiling.
2 //!
3 //! `given` expands to a real `match`, so its arms are exclusive and a value
4 //! moved in one is fine. Amendment 14 is what makes this spellable for the
5 //! boolean case R4(b) describes: `pattern` gained `true` and `false`, so a
6 //! complementary pair has a dispatch to become.
7
8 use quasi_declare::declare;
9
10 declare! {
11 shape panel(label: String, compact: bool) -> Node;
12
13 region "panel" as Pane {
14 given compact {
15 true -> text label;
16 false -> text label;
17 }
18 }
19 }
20
21 fn main() {}
22