Christophe Pedretti
2014-09-11 19:26:16 UTC
Hello,
with 0.11.0, this code was ok
pub struct Cursor<'a, 'b> {
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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140911/58ed4019/attachment.html>
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 aerror : bool
}
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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140911/58ed4019/attachment.html>