props_safety.stderr 674 B

1234567891011121314151617181920
  1. error[E0521]: borrowed data escapes outside of function
  2. --> compile_tests/props_safety.rs:8:5
  3. |
  4. 5 | fn app(cx: Scope) -> Element {
  5. | --
  6. | |
  7. | `cx` is a reference that is only valid in the function body
  8. | has type `&'1 Scoped<'1>`
  9. ...
  10. 8 | / render! {
  11. 9 | | unsafe_child_component {
  12. 10 | | borrowed: count
  13. 11 | | }
  14. 12 | | }
  15. | | ^
  16. | | |
  17. | |_____`cx` escapes the function body here
  18. | argument requires that `'1` must outlive `'static`
  19. |
  20. = note: this error originates in the macro `render` (in Nightly builds, run with -Z macro-backtrace for more info)