Skip to content

Commit f5b9ea7

Browse files
mitchmindtreesteffahn
authored andcommitted
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 e0136aa commit f5b9ea7

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
@@ -150,8 +150,8 @@ fn render(
150150
_h.template()
151151
.ok_or_else(|| RenderError::new("Error with the handlebars template"))
152152
.and_then(|t| {
153-
let mut local_rc = rc.clone();
154153
let local_ctx = Context::wraps(&context)?;
154+
let mut local_rc = rc.clone();
155155
t.render(r, &local_ctx, &mut local_rc, out)
156156
})?;
157157

0 commit comments

Comments
 (0)