1 error[E0623]: lifetime mismatch
2 --> $DIR/issue-17728.rs:25: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:110:5
15 LL | / match to_parse { //~ ERROR match arms have incompatible types
16 LL | | "w" | "west" => RoomDirection::West,
17 LL | | "e" | "east" => RoomDirection::East,
18 LL | | "n" | "north" => RoomDirection::North,
21 | | ---- match arm with an incompatible type
23 | |_____^ expected enum `RoomDirection`, found enum `std::option::Option`
25 = note: expected type `RoomDirection`
26 found type `std::option::Option<_>`
28 error: aborting due to 2 previous errors
30 Some errors occurred: E0308, E0623.
31 For more information about an error, try `rustc --explain E0308`.