]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17728.stderr
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-17728.stderr
1 error[E0623]: lifetime mismatch
2   --> $DIR/issue-17728.rs:15:28
3    |
4 LL |     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 ...
9 LL |             Some(entry) => Ok(entry),
10    |                            ^^^^^^^^^ ...but data from `room` is returned here
11
12 error[E0308]: match arms have incompatible types
13   --> $DIR/issue-17728.rs:109:14
14    |
15 LL | /     match to_parse {
16 LL | |         "w" | "west" => RoomDirection::West,
17 LL | |         "e" | "east" => RoomDirection::East,
18 LL | |         "n" | "north" => RoomDirection::North,
19 ...  |
20 LL | |         "down" => RoomDirection::Down,
21    | |                   ------------------- this and all prior arms are found to be of type `RoomDirection`
22 LL | |         _ => None
23    | |              ^^^^ expected enum `RoomDirection`, found enum `std::option::Option`
24 LL | |     }
25    | |_____- `match` arms have incompatible types
26    |
27    = note: expected type `RoomDirection`
28               found type `std::option::Option<_>`
29
30 error: aborting due to 2 previous errors
31
32 For more information about this error, try `rustc --explain E0308`.