]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/enum-method-probe.stderr
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / ui / suggestions / enum-method-probe.stderr
1 error[E0599]: no method named `get` found for enum `Result` in the current scope
2   --> $DIR/enum-method-probe.rs:24:9
3    |
4 LL |     res.get();
5    |         ^^^ method not found in `Result<Foo, ()>`
6    |
7 note: the method `get` exists on the type `Foo`
8   --> $DIR/enum-method-probe.rs:9:5
9    |
10 LL |     fn get(&self) -> u8 {
11    |     ^^^^^^^^^^^^^^^^^^^
12 help: use the `?` operator to extract the `Foo` value, propagating a `Result::Err` value to the caller
13    |
14 LL |     res?.get();
15    |        +
16
17 error[E0599]: no method named `get` found for enum `Result` in the current scope
18   --> $DIR/enum-method-probe.rs:39:9
19    |
20 LL |     res.get();
21    |         ^^^ method not found in `Result<Foo, ()>`
22    |
23 note: the method `get` exists on the type `Foo`
24   --> $DIR/enum-method-probe.rs:9:5
25    |
26 LL |     fn get(&self) -> u8 {
27    |     ^^^^^^^^^^^^^^^^^^^
28 help: consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
29    |
30 LL |     res.expect("REASON").get();
31    |        +++++++++++++++++
32
33 error[E0599]: no method named `get` found for enum `Result` in the current scope
34   --> $DIR/enum-method-probe.rs:16:9
35    |
36 LL |     res.get();
37    |         ^^^ method not found in `Result<Foo, ()>`
38    |
39 note: the method `get` exists on the type `Foo`
40   --> $DIR/enum-method-probe.rs:9:5
41    |
42 LL |     fn get(&self) -> u8 {
43    |     ^^^^^^^^^^^^^^^^^^^
44 help: use the `?` operator to extract the `Foo` value, propagating a `Result::Err` value to the caller
45    |
46 LL |     res?.get();
47    |        +
48
49 error[E0599]: no method named `get` found for enum `Result` in the current scope
50   --> $DIR/enum-method-probe.rs:32:9
51    |
52 LL |     res.get();
53    |         ^^^ method not found in `Result<Foo, ()>`
54    |
55 note: the method `get` exists on the type `Foo`
56   --> $DIR/enum-method-probe.rs:9:5
57    |
58 LL |     fn get(&self) -> u8 {
59    |     ^^^^^^^^^^^^^^^^^^^
60 help: consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
61    |
62 LL |     res.expect("REASON").get();
63    |        +++++++++++++++++
64
65 error[E0599]: no method named `get` found for enum `Option` in the current scope
66   --> $DIR/enum-method-probe.rs:46:9
67    |
68 LL |     res.get();
69    |         ^^^ method not found in `Option<Foo>`
70    |
71 note: the method `get` exists on the type `Foo`
72   --> $DIR/enum-method-probe.rs:9:5
73    |
74 LL |     fn get(&self) -> u8 {
75    |     ^^^^^^^^^^^^^^^^^^^
76 help: use the `?` operator to extract the `Foo` value, propagating an `Option::None` value to the caller
77    |
78 LL |     res?.get();
79    |        +
80
81 error[E0599]: no method named `get` found for enum `Option` in the current scope
82   --> $DIR/enum-method-probe.rs:54:9
83    |
84 LL |     res.get();
85    |         ^^^ method not found in `Option<Foo>`
86    |
87 note: the method `get` exists on the type `Foo`
88   --> $DIR/enum-method-probe.rs:9:5
89    |
90 LL |     fn get(&self) -> u8 {
91    |     ^^^^^^^^^^^^^^^^^^^
92 help: consider using `Option::expect` to unwrap the `Foo` value, panicking if the value is an `Option::None`
93    |
94 LL |     res.expect("REASON").get();
95    |        +++++++++++++++++
96
97 error: aborting due to 6 previous errors
98
99 For more information about this error, try `rustc --explain E0599`.