diff options
| author | bors <bors@rust-lang.org> | 2015-09-09 14:42:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-09-09 14:42:00 +0000 |
| commit | 3a4fb823e26c512d14d97bd86e2ac7b1e7d3d0fa (patch) | |
| tree | 1c2d3e2fec6a51c47b1ae12f44958a79b43d0169 | |
| parent | 7c8ae608dc65665039f3aeb01548d675953a2a68 (diff) | |
| parent | 519a186773c2b972f84fd499f57ce52400bbdcf1 (diff) | |
| download | rust-3a4fb823e26c512d14d97bd86e2ac7b1e7d3d0fa.tar.gz rust-3a4fb823e26c512d14d97bd86e2ac7b1e7d3d0fa.zip | |
Auto merge of #28316 - Manishearth:rollup, r=Manishearth
- Successful merges: #28281, #28283, #28289, #28294, #28295, #28305 - Failed merges:
| -rw-r--r-- | COPYRIGHT | 98 | ||||
| -rw-r--r-- | src/doc/trpl/macros.md | 2 | ||||
| -rw-r--r-- | src/doc/trpl/mutability.md | 6 | ||||
| -rw-r--r-- | src/doc/trpl/references-and-borrowing.md | 8 | ||||
| -rw-r--r-- | src/libstd/macros.rs | 4 |
5 files changed, 10 insertions, 108 deletions
diff --git a/COPYRIGHT b/COPYRIGHT index d4ad98e6e87..0eac7ac9de2 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -22,104 +22,6 @@ The Rust Project includes packages written by third parties. The following third party packages are included, and carry their own copyright notices and license terms: -* Two header files that are part of the Valgrind - package. These files are found at src/rt/valgrind/valgrind.h and - src/rt/valgrind/memcheck.h, within this distribution. These files - are redistributed under the following terms, as noted in - them: - - for src/rt/valgrind/valgrind.h: - - This file is part of Valgrind, a dynamic binary - instrumentation framework. - - Copyright (C) 2000-2010 Julian Seward. All rights - reserved. - - Redistribution and use in source and binary forms, with - or without modification, are permitted provided that the - following conditions are met: - - 1. Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - - 2. The origin of this software must not be - misrepresented; you must not claim that you wrote the - original software. If you use this software in a - product, an acknowledgment in the product - documentation would be appreciated but is not - required. - - 3. Altered source versions must be plainly marked as - such, and must not be misrepresented as being the - original software. - - 4. The name of the author may not be used to endorse or - promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - OF SUCH DAMAGE. - - for src/rt/valgrind/memcheck.h: - - This file is part of MemCheck, a heavyweight Valgrind - tool for detecting memory errors. - - Copyright (C) 2000-2010 Julian Seward. All rights - reserved. - - Redistribution and use in source and binary forms, with - or without modification, are permitted provided that the - following conditions are met: - - 1. Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - - 2. The origin of this software must not be - misrepresented; you must not claim that you wrote the - original software. If you use this software in a - product, an acknowledgment in the product - documentation would be appreciated but is not - required. - - 3. Altered source versions must be plainly marked as - such, and must not be misrepresented as being the - original software. - - 4. The name of the author may not be used to endorse or - promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - OF SUCH DAMAGE. - * The src/rt/miniz.c file, carrying an implementation of RFC1950/RFC1951 DEFLATE, by Rich Geldreich <richgel99@gmail.com>. All uses of this file are diff --git a/src/doc/trpl/macros.md b/src/doc/trpl/macros.md index c13b13b5a07..d74cd6d0d35 100644 --- a/src/doc/trpl/macros.md +++ b/src/doc/trpl/macros.md @@ -313,7 +313,7 @@ fn main() { } ``` -This works because Rust has a [hygienic macro system][https://en.wikipedia.org/wiki/Hygienic_macro]. Each macro expansion +This works because Rust has a [hygienic macro system]. Each macro expansion happens in a distinct ‘syntax context’, and each variable is tagged with the syntax context where it was introduced. It’s as though the variable `state` inside `main` is painted a different "color" from the variable `state` inside diff --git a/src/doc/trpl/mutability.md b/src/doc/trpl/mutability.md index ef569a09e21..2c4316e651a 100644 --- a/src/doc/trpl/mutability.md +++ b/src/doc/trpl/mutability.md @@ -62,7 +62,7 @@ fn foo(mut x: i32) { # Interior vs. Exterior Mutability However, when we say something is ‘immutable’ in Rust, that doesn’t mean that -it’s not able to be changed: We mean something has ‘exterior mutability’. Consider, +it’s not able to be changed: we mean something has ‘exterior mutability’. Consider, for example, [`Arc<T>`][arc]: ```rust @@ -85,8 +85,8 @@ philosophy, memory safety, and the mechanism by which Rust guarantees it, the > You may have one or the other of these two kinds of borrows, but not both at > the same time: > -> * one or more references (`&T`) to a resource. -> * exactly one mutable reference (`&mut T`) +> * one or more references (`&T`) to a resource, +> * exactly one mutable reference (`&mut T`). [ownership]: ownership.html [borrowing]: references-and-borrowing.html#borrowing diff --git a/src/doc/trpl/references-and-borrowing.md b/src/doc/trpl/references-and-borrowing.md index a7a77539f79..50297b266d9 100644 --- a/src/doc/trpl/references-and-borrowing.md +++ b/src/doc/trpl/references-and-borrowing.md @@ -159,8 +159,8 @@ First, any borrow must last for a scope no greater than that of the owner. Second, you may have one or the other of these two kinds of borrows, but not both at the same time: -* one or more references (`&T`) to a resource. -* exactly one mutable reference (`&mut T`) +* one or more references (`&T`) to a resource, +* exactly one mutable reference (`&mut T`). You may notice that this is very similar, though not exactly the same as, @@ -298,8 +298,8 @@ We can’t modify `v` because it’s borrowed by the loop. ### use after free -References must live as long as the resource they refer to. Rust will check the -scopes of your references to ensure that this is true. +References must not live longer than the resource they refer to. Rust will +check the scopes of your references to ensure that this is true. If Rust didn’t check this property, we could accidentally use a reference which was invalid. For example: diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index e4866982176..a0c3f013f2b 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -412,9 +412,9 @@ pub mod builtin { #[macro_export] macro_rules! include_str { ($file:expr) => ({ /* compiler built-in */ }) } - /// Includes a file as a byte slice. + /// Includes a file as a reference to a byte array. /// - /// This macro will yield an expression of type `&'static [u8]` which is + /// This macro will yield an expression of type `&'static [u8; N]` which is /// the contents of the filename specified. The file is located relative to /// the current file (similarly to how modules are found), /// |
