Hello, with 0.11.0, this code was ok
pub struct Cursor<'a, 'b> { > pStmt : &'b Statement<'a>, > error : bool > } now, with the nighly, i receive a sql\connection.rs:50:1: 53:2 error: in type `&'b sql::connection::Statement<'a>`, reference has a longer lifetime than the data it references sql\connection.rs:50 pub struct Cursor<'a, 'b> { sql\connection.rs:51 pStmt : &'b Statement<'a>, sql\connection.rs:52 error : bool sql\connection.rs:53 } sql\connection.rs:50:1: 53:2 note: the pointer is valid for the lifetime 'b as defined on the struct at 50:0 sql\connection.rs:50 pub struct Cursor<'a, 'b> { sql\connection.rs:51 pStmt : &'b Statement<'a>, sql\connection.rs:52 error : bool sql\connection.rs:53 } sql\connection.rs:50:1: 53:2 note: but the referenced data is only valid for the lifetime 'a as defined on the struct at 50:0 sql\connection.rs:50 pub struct Cursor<'a, 'b> { sql\connection.rs:51 pStmt : &'b Statement<'a>, sql\connection.rs:52 error : bool sql\connection.rs:53 } error: aborting due to previous error why this change ?
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev