Closed
Description
Travis failed to build one of conrod's examples using the latest nightly due to the following error.
examples/all_widgets.rs:330:24: 330:54 error: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements [E0495]
examples/all_widgets.rs:330 let elem = &mut app.bool_matrix[col][row];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
examples/all_widgets.rs:313:5: 314:20 note: first, the lifetime cannot outlive the method call at 313:4...
examples/all_widgets.rs:313 WidgetMatrix::new(cols, rows)
examples/all_widgets.rs:314 .down(20.0)
examples/all_widgets.rs:313:5: 313:34 note: ...so that method receiver is valid for the method call
examples/all_widgets.rs:313 WidgetMatrix::new(cols, rows)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
examples/all_widgets.rs:330:24: 330:54 note: but, the lifetime must be valid for the expression at 330:23...
examples/all_widgets.rs:330 let elem = &mut app.bool_matrix[col][row];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
examples/all_widgets.rs:330:24: 330:54 note: ...so that reference is valid at the time of borrow
examples/all_widgets.rs:330 let elem = &mut app.bool_matrix[col][row];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The area of the example code that fails is here.
It was able to build this same example without any problems using the rustc 1.5 stable.