Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jonathan Turner
committed
May 23, 2016
1 parent
9e55748
commit 4280992
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
fn main() { | ||
let mut op = Some(2); | ||
match op { | ||
Some(ref v) => { let a = &mut v; }, | ||
//~^ ERROR:cannot borrow immutable | ||
//~| use `ref mut v` here to make mutable | ||
None => {}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
error: mismatched types [--explain E0308] | ||
--> $DIR/main.rs:14:18 | ||
|> | ||
14 |> let x: u32 = ( | ||
|> ^ expected u32, found () | ||
note: expected type `u32` | ||
note: found type `()` | ||
|
||
|
||
error: aborting due to previous error |