-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regions
Milestone
Description
class font/& {
let fontbuf: &self.[u8];
new(fontbuf: &self.[u8]) {
self.fontbuf = fontbuf;
}
fn buf() -> &self.[u8] {
self.fontbuf
}
}
fn main() { }
/home/banderson/Dev/rust/src/test/run-pass/test.rs:5:23: 5:30 error: mismatched types: expected `&self.[u8]` but found `&self.[u8]` (references with lifetime &self do not necessarily outlive references with lifetime &self)
/home/banderson/Dev/rust/src/test/run-pass/test.rs:5 self.fontbuf = fontbuf;
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regions