Merge pull request #203 from ykomatsu/text

Change the type of output messages
This commit is contained in:
Carol (Nichols || Goulding) 2016-08-19 10:28:11 -04:00 committed by GitHub
commit b7e4ce81bb
2 changed files with 10 additions and 10 deletions

View File

@ -580,7 +580,7 @@ fn change(some_string: &String) {
Heres the error:
```text
```bash
error: cannot borrow immutable borrowed content `*some_string` as mutable
--> error.rs:8:5
|
@ -622,7 +622,7 @@ let r2 = &mut s;
Heres the error:
```text
```bash
error[E0499]: cannot borrow `s` as mutable more than once at a time
--> borrow_twice.rs:5:19
|
@ -666,7 +666,7 @@ let r3 = &mut s; // BIG PROBLEM
Heres the error:
```text
```bash
error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immutable
--> borrow_thrice.rs:6:19
|
@ -707,7 +707,7 @@ fn dangle() -> &String {
Heres the error:
```text
```bash
error[E0106]: missing lifetime specifier
--> dangle.rs:5:16
|
@ -725,7 +725,7 @@ This error message refers to a feature we havent learned about yet,
lifetimes. The message does contain the key to why this code is a problem,
though:
```text
```bash
this functions return type contains a borrowed value, but there is no value
for it to be borrowed from
```

View File

@ -106,7 +106,7 @@ fn change(some_string: &String) {
Heres the error:
```text
```bash
error: cannot borrow immutable borrowed content `*some_string` as mutable
--> error.rs:8:5
|
@ -148,7 +148,7 @@ let r2 = &mut s;
Heres the error:
```text
```bash
error[E0499]: cannot borrow `s` as mutable more than once at a time
--> borrow_twice.rs:5:19
|
@ -192,7 +192,7 @@ let r3 = &mut s; // BIG PROBLEM
Heres the error:
```text
```bash
error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immutable
--> borrow_thrice.rs:6:19
|
@ -233,7 +233,7 @@ fn dangle() -> &String {
Heres the error:
```text
```bash
error[E0106]: missing lifetime specifier
--> dangle.rs:5:16
|
@ -251,7 +251,7 @@ This error message refers to a feature we havent learned about yet,
lifetimes. The message does contain the key to why this code is a problem,
though:
```text
```bash
this functions return type contains a borrowed value, but there is no value
for it to be borrowed from
```