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