Skip to content

Commit 13035ba

Browse files
committed
Workaround rust nightly borrowcheck error (rust-lang#1860)
Surprisingly, this fixes the error filed at rust-lang#1860! This seems suspicious, perhaps indicative of a bug in Rust's non-lexical lifetime handling? The lifetimes in the `handlebars::Renderable::render` method signature are quite complicated, and its unclear to me whether or not Rust is catching some new safety edge-case that wasn't previously handled correctly... Possibly related to `drop` order, which I *think* is related to the order of binding statements?
1 parent 92afe9b commit 13035ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderer/html_handlebars/helpers/navigation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ fn render(
149149
_h.template()
150150
.ok_or_else(|| RenderError::new("Error with the handlebars template"))
151151
.and_then(|t| {
152-
let mut local_rc = rc.clone();
153152
let local_ctx = Context::wraps(&context)?;
153+
let mut local_rc = rc.clone();
154154
t.render(r, &local_ctx, &mut local_rc, out)
155155
})?;
156156

0 commit comments

Comments
 (0)