summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/enum-method-probe.stderr
blob: 6ed14984f47478928e27837200a7ba96a1ab406c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
error[E0599]: no method named `get` found for enum `Result` in the current scope
  --> $DIR/enum-method-probe.rs:24:9
   |
LL |     res.get();
   |         ^^^ method not found in `Result<Foo, ()>`
   |
note: the method `get` exists on the type `Foo`
  --> $DIR/enum-method-probe.rs:9:5
   |
LL |     fn get(&self) -> u8 {
   |     ^^^^^^^^^^^^^^^^^^^
help: use the `?` operator to extract the `Foo` value, propagating a `Result::Err` value to the caller
   |
LL |     res?.get();
   |        +

error[E0599]: no method named `get` found for enum `Result` in the current scope
  --> $DIR/enum-method-probe.rs:39:9
   |
LL |     res.get();
   |         ^^^ method not found in `Result<Foo, ()>`
   |
note: the method `get` exists on the type `Foo`
  --> $DIR/enum-method-probe.rs:9:5
   |
LL |     fn get(&self) -> u8 {
   |     ^^^^^^^^^^^^^^^^^^^
help: consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
   |
LL |     res.expect("REASON").get();
   |        +++++++++++++++++

error[E0599]: no method named `get` found for enum `Result` in the current scope
  --> $DIR/enum-method-probe.rs:16:9
   |
LL |     res.get();
   |         ^^^ method not found in `Result<Foo, ()>`
   |
note: the method `get` exists on the type `Foo`
  --> $DIR/enum-method-probe.rs:9:5
   |
LL |     fn get(&self) -> u8 {
   |     ^^^^^^^^^^^^^^^^^^^
help: use the `?` operator to extract the `Foo` value, propagating a `Result::Err` value to the caller
   |
LL |     res?.get();
   |        +

error[E0599]: no method named `get` found for enum `Result` in the current scope
  --> $DIR/enum-method-probe.rs:32:9
   |
LL |     res.get();
   |         ^^^ method not found in `Result<Foo, ()>`
   |
note: the method `get` exists on the type `Foo`
  --> $DIR/enum-method-probe.rs:9:5
   |
LL |     fn get(&self) -> u8 {
   |     ^^^^^^^^^^^^^^^^^^^
help: consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
   |
LL |     res.expect("REASON").get();
   |        +++++++++++++++++

error[E0599]: no method named `get` found for enum `Option` in the current scope
  --> $DIR/enum-method-probe.rs:46:9
   |
LL |     res.get();
   |         ^^^ method not found in `Option<Foo>`
   |
note: the method `get` exists on the type `Foo`
  --> $DIR/enum-method-probe.rs:9:5
   |
LL |     fn get(&self) -> u8 {
   |     ^^^^^^^^^^^^^^^^^^^
help: use the `?` operator to extract the `Foo` value, propagating an `Option::None` value to the caller
   |
LL |     res?.get();
   |        +

error[E0599]: no method named `get` found for enum `Option` in the current scope
  --> $DIR/enum-method-probe.rs:54:9
   |
LL |     res.get();
   |         ^^^ method not found in `Option<Foo>`
   |
note: the method `get` exists on the type `Foo`
  --> $DIR/enum-method-probe.rs:9:5
   |
LL |     fn get(&self) -> u8 {
   |     ^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Foo` value, panicking if the value is an `Option::None`
   |
LL |     res.expect("REASON").get();
   |        +++++++++++++++++

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0599`.