]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17728.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-17728.stderr
1 error[E0623]: lifetime mismatch
2   --> $DIR/issue-17728.rs:25: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:110:5
14    |
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,
19 ...  |
20 LL | |         _ => None
21    | |              ---- match arm with an incompatible type
22 LL | |     }
23    | |_____^ expected enum `RoomDirection`, found enum `std::option::Option`
24    |
25    = note: expected type `RoomDirection`
26               found type `std::option::Option<_>`
27
28 error: aborting due to 2 previous errors
29
30 Some errors occurred: E0308, E0623.
31 For more information about an error, try `rustc --explain E0308`.