1 error[E0425]: cannot find function `foo` in this scope
2 --> $DIR/method-access-to-range-literal-typo.rs:26:22
4 LL | self.option..foo().get(0)
5 | ^^^ not found in this scope
7 help: you might have meant to write `.` instead of `..`
9 LL - self.option..foo().get(0)
10 LL + self.option.foo().get(0)
13 error[E0308]: mismatched types
14 --> $DIR/method-access-to-range-literal-typo.rs:22:9
16 LL | fn method(&self) -> Option<&Vec<u8>> {
17 | ---------------- expected `Option<&Vec<u8>>` because of return type
18 LL | self.option..as_ref().map(|x| x)
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<&Vec<u8>>`, found `Range<Option<Vec<u8>>>`
21 = note: expected enum `Option<&Vec<u8>>`
22 found struct `std::ops::Range<Option<Vec<u8>>>`
23 help: you likely meant to write a method call instead of a range
25 LL - self.option..as_ref().map(|x| x)
26 LL + self.option.as_ref().map(|x| x)
29 error[E0308]: mismatched types
30 --> $DIR/method-access-to-range-literal-typo.rs:26:9
32 LL | fn method2(&self) -> Option<&u8> {
33 | ----------- expected `Option<&u8>` because of return type
34 LL | self.option..foo().get(0)
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<&u8>`, found `Range<Option<Vec<u8>>>`
37 = note: expected enum `Option<&u8>`
38 found struct `std::ops::Range<Option<Vec<u8>>>`
39 help: you likely meant to write a method call instead of a range
41 LL - self.option..foo().get(0)
42 LL + self.option.foo().get(0)
45 error: aborting due to 3 previous errors
47 Some errors have detailed explanations: E0308, E0425.
48 For more information about an error, try `rustc --explain E0308`.