|
| 1 | +error[E0502]: cannot borrow `c` as mutable because it is also borrowed as immutable |
| 2 | + --> tests/ui/thindom.rs:10:9 |
| 3 | + | |
| 4 | +9 | for _ in c.root_children() { |
| 5 | + | ----------------- |
| 6 | + | | |
| 7 | + | immutable borrow occurs here |
| 8 | + | immutable borrow later used here |
| 9 | +10 | c.append_root_child(alpha); |
| 10 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here |
| 11 | + |
| 12 | +error[E0502]: cannot borrow `c` as mutable because it is also borrowed as immutable |
| 13 | + --> tests/ui/thindom.rs:22:9 |
| 14 | + | |
| 15 | +21 | for _ in c.element_children(alpha) { |
| 16 | + | ------------------------- |
| 17 | + | | |
| 18 | + | immutable borrow occurs here |
| 19 | + | immutable borrow later used here |
| 20 | +22 | c.append_element_child(alpha, beta); |
| 21 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here |
| 22 | + |
| 23 | +error[E0502]: cannot borrow `c` as mutable because it is also borrowed as immutable |
| 24 | + --> tests/ui/thindom.rs:34:9 |
| 25 | + | |
| 26 | +33 | for _ in c.element_preceding_siblings(alpha) { |
| 27 | + | ----------------------------------- |
| 28 | + | | |
| 29 | + | immutable borrow occurs here |
| 30 | + | immutable borrow later used here |
| 31 | +34 | c.append_element_child(alpha, beta); |
| 32 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here |
| 33 | + |
| 34 | +error[E0597]: `s` does not live long enough |
| 35 | + --> tests/ui/thindom.rs:44:9 |
| 36 | + | |
| 37 | +41 | let _node = { |
| 38 | + | ----- borrow later stored here |
| 39 | +42 | let (s, _) = package.as_thin_document(); |
| 40 | + | - binding `s` declared here |
| 41 | +43 | |
| 42 | +44 | s.create_element("hello") |
| 43 | + | ^ borrowed value does not live long enough |
| 44 | +45 | }; |
| 45 | + | - `s` dropped here while still borrowed |
0 commit comments