diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-12 10:55:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-12 10:55:24 +0100 |
| commit | 0a8b5b49076869e3b448d6b7d685b3802ec4922a (patch) | |
| tree | b132d4cceaa63e90789323a7dcf9863890692b8e | |
| parent | e234d15724e346624baf2966fb1a740bcfb65944 (diff) | |
| parent | 49e8318b0c4329b668b97b496e3cc044923e4504 (diff) | |
| download | rust-0a8b5b49076869e3b448d6b7d685b3802ec4922a.tar.gz rust-0a8b5b49076869e3b448d6b7d685b3802ec4922a.zip | |
Rollup merge of #57530 - insideoutclub:master, r=estebank
Fixing a typographical error.
| -rw-r--r-- | src/librustc_mir/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/diagnostics.rs b/src/librustc_mir/diagnostics.rs index 7e8ac3fb720..212edaaa1ba 100644 --- a/src/librustc_mir/diagnostics.rs +++ b/src/librustc_mir/diagnostics.rs @@ -2334,7 +2334,7 @@ local variable that already exists, and hence no temporary is created. Temporaries are not always dropped at the end of the enclosing statement. In simple cases where the `&` expression is immediately stored into a variable, the compiler will automatically extend -the lifetime of the temporary until the end of the enclosinb +the lifetime of the temporary until the end of the enclosing block. Therefore, an alternative way to fix the original program is to write `let tmp = &foo()` and not `let tmp = foo()`: |
