Created
November 2, 2012 00:50
-
-
Save eevee/3997934 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
display.rs:21:12: 21:27 error: cannot infer an appropriate lifetime due to conflicting requirements | |
display.rs:21 return @TerminalDisplay{ | |
^~~~~~~~~~~~~~~ | |
display.rs:13:56: 27:1 note: first, the lifetime cannot outlive the anonymous lifetime #4 defined on the block at 13:56... | |
display.rs:13 pub fn TerminalDisplay(game: @Game) -> @TerminalDisplay { | |
display.rs:14 let window = amulet::ll::init_screen(); | |
display.rs:15 window.hide_cursor(); | |
display.rs:16 | |
display.rs:17 // Create persistent status areas | |
display.rs:18 let status_window = amulet::ll::new_window(0, 0, 0, game.map.width()); | |
... | |
display.rs:21:11: 21:27 note: ...due to the following expression | |
display.rs:21 return @TerminalDisplay{ | |
^~~~~~~~~~~~~~~~ | |
display.rs:13:56: 27:1 note: but, the lifetime must be valid for the anonymous lifetime #2 defined on the block at 13:56... | |
display.rs:13 pub fn TerminalDisplay(game: @Game) -> @TerminalDisplay { | |
display.rs:14 let window = amulet::ll::init_screen(); | |
display.rs:15 window.hide_cursor(); | |
display.rs:16 | |
display.rs:17 // Create persistent status areas | |
display.rs:18 let status_window = amulet::ll::new_window(0, 0, 0, game.map.width()); | |
... | |
display.rs:22:14: 22:18 note: ...due to the following expression | |
display.rs:22 game: game, | |
^~~~ | |
world.rs:26:23: 26:37 error: mismatched types: expected `@world::Tile/&` but found `@world::Tile/&self` (lifetimes are not the same) | |
world.rs:26 return self.grid[x][y]; | |
^~~~~~~~~~~~~~ | |
world.rs:23:30: 30:5 note: the lifetime &self as defined on the block at 23:30... | |
world.rs:23 fn player_tile() -> @Tile { | |
world.rs:24 match self.player.location { | |
world.rs:25 OnFloor(copy x, copy y) => { | |
world.rs:26 return self.grid[x][y]; | |
world.rs:27 } | |
world.rs:28 _ => fail, | |
... | |
world.rs:23:30: 30:5 note: ...is not the same lifetime as the anonymous lifetime #2 defined on the block at 23:30 | |
world.rs:23 fn player_tile() -> @Tile { | |
world.rs:24 match self.player.location { | |
world.rs:25 OnFloor(copy x, copy y) => { | |
world.rs:26 return self.grid[x][y]; | |
world.rs:27 } | |
world.rs:28 _ => fail, | |
... | |
error: aborting due to 2 previous errors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment