Add the corrections stuff to the 88803 test case
This commit is contained in:
parent
5dab3c5cf5
commit
e5c2412e52
3 changed files with 12 additions and 1 deletions
9
src/test/ui/typeck/issue-88803-call-expr-method.fixed
Normal file
9
src/test/ui/typeck/issue-88803-call-expr-method.fixed
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// run-rustfix
|
||||
|
||||
fn main() {
|
||||
let a = Some(42);
|
||||
println!(
|
||||
"The value is {}.",
|
||||
a.unwrap() //~ERROR [E0615]
|
||||
);
|
||||
}
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
// run-rustfix
|
||||
|
||||
fn main() {
|
||||
let a = Some(42);
|
||||
println!(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0615]: attempted to take value of method `unwrap` on type `Option<{integer}>`
|
||||
--> $DIR/issue-88803-call-expr-method.rs:5:12
|
||||
--> $DIR/issue-88803-call-expr-method.rs:7:12
|
||||
|
|
||||
LL | (a.unwrap)()
|
||||
| ---^^^^^^-
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue