1 error[E0623]: lifetime mismatch
2 --> $DIR/issue-17728.rs:15:28
4 LL | fn attemptTraverse(&self, room: &Room, directionStr: &str) -> Result<&Room, &str> {
5 | ----- -------------------
7 | this parameter and the return type are declared with different lifetimes...
9 LL | Some(entry) => Ok(entry),
10 | ^^^^^^^^^ ...but data from `room` is returned here
12 error[E0308]: match arms have incompatible types
13 --> $DIR/issue-17728.rs:109:14
15 LL | / match to_parse {
16 LL | | "w" | "west" => RoomDirection::West,
17 LL | | "e" | "east" => RoomDirection::East,
18 LL | | "n" | "north" => RoomDirection::North,
20 LL | | "down" => RoomDirection::Down,
21 | | ------------------- this and all prior arms are found to be of type `RoomDirection`
23 | | ^^^^ expected enum `RoomDirection`, found enum `std::option::Option`
25 | |_____- `match` arms have incompatible types
27 = note: expected type `RoomDirection`
28 found type `std::option::Option<_>`
30 error: aborting due to 2 previous errors
32 For more information about this error, try `rustc --explain E0308`.