Created
September 26, 2012 23:32
-
-
Save burg/3791287 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/burg/repos/servo/src/servo/layout/box.rs:101:14: 101:18 error: illegal borrow: borrowed value does not live long enough | |
/Users/burg/repos/servo/src/servo/layout/box.rs:101 match self { | |
^~~~ | |
/Users/burg/repos/servo/src/servo/layout/box.rs:100:36: 106:5 note: borrowed pointer must be valid for the lifetime &a as defined on the block at 100:36... | |
/Users/burg/repos/servo/src/servo/layout/box.rs:100 pure fn d() -> &a/RenderBoxData { | |
/Users/burg/repos/servo/src/servo/layout/box.rs:101 match self { | |
/Users/burg/repos/servo/src/servo/layout/box.rs:102 GenericBox(ref d) => d, | |
/Users/burg/repos/servo/src/servo/layout/box.rs:103 ImageBox(ref d, _) => d, | |
/Users/burg/repos/servo/src/servo/layout/box.rs:104 TextBox(ref d, _) => d | |
/Users/burg/repos/servo/src/servo/layout/box.rs:105 } | |
--- | |
enum RenderBox { | |
GenericBox(RenderBoxData), | |
ImageBox(RenderBoxData, ImageHolder), | |
TextBox(RenderBoxData, TextBoxData) | |
} | |
impl RenderBox { | |
fn d() -> &a/RenderBoxData { | |
match self { | |
GenericBox(ref d) => d, | |
ImageBox(ref d, _) => d, | |
TextBox(ref d, _) => d | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment