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