]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #31700 - oli-obk:skip_double_ended, r=alexcrichton
bors [Sat, 5 Mar 2016 16:58:20 +0000 (16:58 +0000)]
Auto merge of #31700 - oli-obk:skip_double_ended, r=alexcrichton

[Playground Example](https://play.rust-lang.org/?gist=66fdb4fe1cf4d8aa2ad4&version=stable)

8 years agoAuto merge of #32046 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 4 Mar 2016 21:01:14 +0000 (21:01 +0000)]
Auto merge of #32046 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #32002, #32017, #32027, #32035, #32036
- Failed merges:

8 years agoRollup merge of #32036 - Seeker14491:patch-1, r=steveklabnik
Steve Klabnik [Fri, 4 Mar 2016 19:17:29 +0000 (14:17 -0500)]
Rollup merge of #32036 - Seeker14491:patch-1, r=steveklabnik

To me it was unclear whether 'it' referred to the fold function, or the closure.

8 years agoRollup merge of #32035 - ubsan:master, r=bluss
Steve Klabnik [Fri, 4 Mar 2016 19:17:29 +0000 (14:17 -0500)]
Rollup merge of #32035 - ubsan:master, r=bluss

Just take out the `NOTE` and the `#[allow(improper_ctypes)]`

8 years agoRollup merge of #32027 - japaric:rustbuild-mips, r=alexcrichton
Steve Klabnik [Fri, 4 Mar 2016 19:17:29 +0000 (14:17 -0500)]
Rollup merge of #32027 - japaric:rustbuild-mips, r=alexcrichton

These targets don't link statically to libunwind or libc

---

r? @alexcrichton

8 years agoRollup merge of #32017 - brson:ignoretest, r=nikomatsakis
Steve Klabnik [Fri, 4 Mar 2016 19:17:28 +0000 (14:17 -0500)]
Rollup merge of #32017 - brson:ignoretest, r=nikomatsakis

8 years agoRollup merge of #32002 - srinivasreddy:vector_doc, r=Manishearth
Steve Klabnik [Fri, 4 Mar 2016 19:17:28 +0000 (14:17 -0500)]
Rollup merge of #32002 - srinivasreddy:vector_doc, r=Manishearth

Issue here : https://github.com/rust-lang/rust/issues/31991

8 years agoAuto merge of #32039 - arielb1:pat-enum, r=nagisa
bors [Fri, 4 Mar 2016 17:19:40 +0000 (17:19 +0000)]
Auto merge of #32039 - arielb1:pat-enum, r=nagisa

Fixes #32004

r? @eddyb

8 years agoAuto merge of #32032 - arielb1:load-const, r=eddyb
bors [Fri, 4 Mar 2016 15:33:10 +0000 (15:33 +0000)]
Auto merge of #32032 - arielb1:load-const, r=eddyb

Fixes #30891

r? @eddyb

8 years agodon't treat unit patterns as wildcard patterns
Ariel Ben-Yehuda [Fri, 4 Mar 2016 13:34:28 +0000 (15:34 +0200)]
don't treat unit patterns as wildcard patterns

Fixes #32004

8 years agoAuto merge of #32022 - gohyda:master, r=alexcrichton
bors [Fri, 4 Mar 2016 13:47:02 +0000 (13:47 +0000)]
Auto merge of #32022 - gohyda:master, r=alexcrichton

- Empty `.sidebar .location` caused "grey line" on top of the documentation page (under 700px) fixed.
- `.sidebar .location` appearance improvement in responsive mode.

8 years agoclean up check_pat_enum
Ariel Ben-Yehuda [Fri, 4 Mar 2016 00:26:42 +0000 (02:26 +0200)]
clean up check_pat_enum

8 years agomake skip a double ended iterator
Oliver Schneider [Fri, 4 Mar 2016 09:22:55 +0000 (10:22 +0100)]
make skip a double ended iterator

8 years agoClarify ambiguous wording in fold() docs
Brian Bowman [Fri, 4 Mar 2016 07:09:23 +0000 (01:09 -0600)]
Clarify ambiguous wording in fold() docs

To me it was unclear whether 'it' referred to the fold function, or the closure.

8 years agoAuto merge of #32006 - jseyfried:fix_expanded_mod_path, r=nikomatsakis
bors [Fri, 4 Mar 2016 06:55:11 +0000 (06:55 +0000)]
Auto merge of #32006 - jseyfried:fix_expanded_mod_path, r=nikomatsakis

This PR changes the search paths for macro-expanded non-inline modules so that they match ordinary non-inline modules (fixes #31624). This is a [breaking-change].

Right now, the search paths for a macro-expanded non-inline module are computed as if the module were declared in the top level of the file in which the macro was defined.
For example, consider `./foo/mod.rs`:
```rust
mod inconsequential { // moving the macro outside this module wouldn't change anything
    macro_rules! mod_decl {
        ($i:ident) => { mod $i; }
    }
}
```
and `./lib.rs`:
```rust
mod foo;

mod bar {
    mod_decl!(baz);
    //^ Now, rustc expects `./foo/baz.rs` (or `./foo/baz/mod.rs`)
    //| After this PR, rustc will expect `./bar/baz.rs` (or `./bar/baz/mod.rs`)
}
```
r? @alexcrichton

8 years agoAuto merge of #31945 - sfackler:net2, r=alexcrichton
bors [Fri, 4 Mar 2016 04:19:30 +0000 (04:19 +0000)]
Auto merge of #31945 - sfackler:net2, r=alexcrichton

I have these tagged as stable in 1.9, so this shouldn't merge until the 1.8 beta's cut.

8 years ago`usize` is now a proper ctype, so fix cmp_slice
ubsan [Fri, 4 Mar 2016 03:53:31 +0000 (19:53 -0800)]
`usize` is now a proper ctype, so fix cmp_slice

8 years agotruncate i8-s to i1-s when loading constants
Ariel Ben-Yehuda [Thu, 3 Mar 2016 23:05:31 +0000 (01:05 +0200)]
truncate i8-s to i1-s when loading constants

Fixes #30891

8 years agoAuto merge of #31671 - ranma42:printcfg, r=alexcrichton
bors [Thu, 3 Mar 2016 21:37:18 +0000 (21:37 +0000)]
Auto merge of #31671 - ranma42:printcfg, r=alexcrichton

Show `cfg` as possible argument to `--print` and make it so that `--print cfg` also outputs the `target_feature`s.

Should I also extend `src/test/run-make/print-cfg/Makefile` to check that `target_feature`s are actually printed?

8 years agoAuto merge of #31797 - apasel422:issue-28950, r=alexcrichton
bors [Thu, 3 Mar 2016 19:52:11 +0000 (19:52 +0000)]
Auto merge of #31797 - apasel422:issue-28950, r=alexcrichton

Closes #28950.

r? @eddyb

8 years ago[rustbuild] fix cross compilation of std for mips(el)-linux-musl
Jorge Aparicio [Thu, 3 Mar 2016 19:50:28 +0000 (14:50 -0500)]
[rustbuild] fix cross compilation of std for mips(el)-linux-musl

These targets don't link statically to libunwind or libc

8 years agoFix netbsd
Steven Fackler [Thu, 3 Mar 2016 17:54:15 +0000 (09:54 -0800)]
Fix netbsd

8 years agoAuto merge of #32007 - nikomatsakis:compiletest-incremental, r=alexcrichton
bors [Thu, 3 Mar 2016 17:41:13 +0000 (17:41 +0000)]
Auto merge of #32007 - nikomatsakis:compiletest-incremental, r=alexcrichton

This PR extends compiletest to support **test revisions** and with a preliminary **incremental testing harness**. run-pass, compile-fail, and run-fail tests may be tagged with

```
// revisions: a b c d
```

This will cause the test to be re-run four times with `--cfg {a,b,c,d}` in turn. This means you can write very closely related things using `cfg`. You can also configure the headers/expected-errors by writing `//[foo] header: value` or `//[foo]~ ERROR bar`, where `foo` is the name of your revision. See the changes to `coherence-cow.rs` as a proof of concept.

The main point of this work is to support the incremental testing harness. This PR contains an initial, unused version. The code that uses it will land later. The incremental testing harness compiles each revision in turn, and requires that the revisions have particular names (e.g., `rpass2`, `cfail3`), which tell it whether a particular revision is expected to compile or not.

Two questions:

- Is there compiletest documentation anywhere I can update?
- Should I hold off on landing the incremental testing harness until I have the code to exercise it? (That will come in a separate PR, still fixing a few details)

r? @alexcrichton
cc @rust-lang/compiler <-- new testing capabilities

8 years agoadded ignore
srinivasreddy [Thu, 3 Mar 2016 16:24:21 +0000 (21:54 +0530)]
added ignore

8 years agoFix android build
Steven Fackler [Thu, 3 Mar 2016 16:11:07 +0000 (08:11 -0800)]
Fix android build

8 years agomention caveat about should-fail in docs
Niko Matsakis [Thu, 3 Mar 2016 16:18:42 +0000 (11:18 -0500)]
mention caveat about should-fail in docs

8 years agomake pretty printer tests understand revisions, and make them ignore the
Niko Matsakis [Thu, 3 Mar 2016 16:17:32 +0000 (11:17 -0500)]
make pretty printer tests understand revisions, and make them ignore the
should-fail annotation

8 years agoAuto merge of #31979 - jseyfried:rename_ctxt, r=eddyb
bors [Thu, 3 Mar 2016 10:22:41 +0000 (10:22 +0000)]
Auto merge of #31979 - jseyfried:rename_ctxt, r=eddyb

r? @eddyb

8 years agoDo not assert revisions list is empty for pretty printing tests
Niko Matsakis [Thu, 3 Mar 2016 09:17:39 +0000 (04:17 -0500)]
Do not assert revisions list is empty for pretty printing tests

8 years agoHide gated cfg attributes from the output of `--print cfg`
Andrea Canciani [Thu, 3 Mar 2016 09:06:09 +0000 (10:06 +0100)]
Hide gated cfg attributes from the output of `--print cfg`

Gated cfg attributes are not available on the stable and beta release
channels, therefore they should not be presented to users of those
channels in order to avoid confusion.

8 years agoAuto merge of #32012 - bluss:more-drop-in-place, r=alexcrichton
bors [Thu, 3 Mar 2016 08:35:51 +0000 (08:35 +0000)]
Auto merge of #32012 - bluss:more-drop-in-place, r=alexcrichton

Use `drop_in_place` in Vec and VecDeque

We can use drop_in_place's DST capabilities directly in Vec::drop and similarly in VecDeque::drop. I verfied this has the same effect as the previous `needs_drop` code; `drop_in_place` it itself an intrinsic.

The VecDeque replacement should be more efficient too, even in release mode (slice iteration makes a more efficient loop than the deque iterator).

8 years agoRename middle::ty::ctxt to TyCtxt
Jeffrey Seyfried [Mon, 29 Feb 2016 23:36:51 +0000 (23:36 +0000)]
Rename middle::ty::ctxt to TyCtxt

8 years agoFix comments and OSX build
Steven Fackler [Thu, 3 Mar 2016 06:05:14 +0000 (22:05 -0800)]
Fix comments and OSX build

8 years agoResponsive layout correction.
gohyda [Thu, 3 Mar 2016 03:46:30 +0000 (04:46 +0100)]
Responsive layout correction.

8 years agoAuto merge of #31824 - jseyfried:privacy_in_resolve, r=nikomatsakis
bors [Thu, 3 Mar 2016 02:21:28 +0000 (02:21 +0000)]
Auto merge of #31824 - jseyfried:privacy_in_resolve, r=nikomatsakis

This PR privacy checks paths as they are resolved instead of in `librustc_privacy` (fixes #12334 and fixes #31779). This removes the need for the `LastPrivate` system introduced in PR #9735, the limitations of which cause #31779.

This PR also reports privacy violations in paths to intra- and inter-crate items the same way -- it always reports the first inaccessible segment of the path.

Since it fixes #31779, this is a [breaking-change]. For example, the following code would break:
```rust
mod foo {
    pub use foo::bar::S;
    mod bar { // `bar` should be private to `foo`
        pub struct S;
    }
}

impl foo::S {
    fn f() {}
}

fn main() {
    foo::bar::S::f(); // This is now a privacy error
}
```

r? @alexcrichton

8 years agoIgnore a rustdoc test that does not work on beta
Brian Anderson [Thu, 3 Mar 2016 00:34:18 +0000 (00:34 +0000)]
Ignore a rustdoc test that does not work on beta

8 years agoAdd test
Jeffrey Seyfried [Tue, 1 Mar 2016 12:17:12 +0000 (12:17 +0000)]
Add test

8 years agoFix the search paths for macro-expanded non-inline modules
Jeffrey Seyfried [Tue, 1 Mar 2016 09:28:42 +0000 (09:28 +0000)]
Fix the search paths for macro-expanded non-inline modules

8 years agoAdd `filename` to Parser
Jeffrey Seyfried [Wed, 2 Mar 2016 01:40:15 +0000 (01:40 +0000)]
Add `filename` to Parser

8 years agoAuto merge of #32005 - vegai:31686, r=Manishearth
bors [Wed, 2 Mar 2016 22:15:51 +0000 (22:15 +0000)]
Auto merge of #32005 - vegai:31686, r=Manishearth

Fix note for type alias in trait position

Fixes #31686

8 years agoBuild the same configuration when compiling and for `--print cfg`
Andrea Canciani [Wed, 2 Mar 2016 21:07:03 +0000 (22:07 +0100)]
Build the same configuration when compiling and for `--print cfg`

The configuration returned by `config::build_configuration` needs to
be modified with `target_features::add_configuration` in order to also
contain the target features. This is already done for the
configuration used when compiling and when creating the documentation,
but was missing in the `cfg` printing code.

8 years agoAdd usage documentation for `--print cfg`
Andrea Canciani [Sun, 14 Feb 2016 22:09:44 +0000 (23:09 +0100)]
Add usage documentation for `--print cfg`

The `--print` flag was extended in #31278 to accept `cfg`, but the
usage message was not updated.

8 years agoType defined here note added to test
vegai [Wed, 2 Mar 2016 20:29:54 +0000 (22:29 +0200)]
Type defined here note added to test

8 years agoadd a run-fail meta test
Niko Matsakis [Wed, 2 Mar 2016 19:25:25 +0000 (14:25 -0500)]
add a run-fail meta test

8 years agorename should-panic to should-fail, per acrichto's suggestion
Niko Matsakis [Wed, 2 Mar 2016 19:20:55 +0000 (14:20 -0500)]
rename should-panic to should-fail, per acrichto's suggestion

8 years agomake it possible for a test to declare `should-panic`
Niko Matsakis [Wed, 2 Mar 2016 16:34:46 +0000 (11:34 -0500)]
make it possible for a test to declare `should-panic`
and write a really basic "meta test" of the compilertest framework

8 years agoUpdate `COMPILER_TESTS.md` documentation to discuss revisions
Niko Matsakis [Wed, 2 Mar 2016 15:59:47 +0000 (10:59 -0500)]
Update `COMPILER_TESTS.md` documentation to discuss revisions

8 years agoAuto merge of #31996 - gandro:update-libc, r=alexcrichton
bors [Wed, 2 Mar 2016 17:41:00 +0000 (17:41 +0000)]
Auto merge of #31996 - gandro:update-libc, r=alexcrichton

This fixes the `x86_64-rumprun-netbsd` target.

r? @alexcrichton

8 years agoFix test to reflect new note
vegai [Wed, 2 Mar 2016 17:27:56 +0000 (19:27 +0200)]
Fix test to reflect new note

8 years agoUse ptr::drop_in_place in VecDeque::drop
Ulrik Sverdrup [Wed, 2 Mar 2016 16:54:43 +0000 (17:54 +0100)]
Use ptr::drop_in_place in VecDeque::drop

Just like for Vec. This should benefit both non-optimized and optimized
performance. Non-optimized since the intrinsic drop_in_place is easily
removed, and optimized because iterating the slices is more efficient
than using the VecDeque iterators.

8 years agoUse ptr::drop_in_place in Vec::truncate
Ulrik Sverdrup [Wed, 2 Mar 2016 16:48:50 +0000 (17:48 +0100)]
Use ptr::drop_in_place in Vec::truncate

8 years agoUse ptr::drop_in_place in Vec::drop
Ulrik Sverdrup [Wed, 2 Mar 2016 16:46:54 +0000 (17:46 +0100)]
Use ptr::drop_in_place in Vec::drop

Directly use the drop glue for [T]. Still optimizes out in -O1 like with
the `needs_drop` intrinsic.

8 years agomade print message similar across two loops
srinivasreddy [Wed, 2 Mar 2016 15:12:26 +0000 (20:42 +0530)]
made print message similar across two loops

8 years agoaddressed review comments - grammar corrections, space additions
srinivasreddy [Wed, 2 Mar 2016 15:01:26 +0000 (20:31 +0530)]
addressed review comments - grammar corrections, space additions

8 years agoAuto merge of #32000 - xaocon:master, r=steveklabnik
bors [Wed, 2 Mar 2016 14:35:33 +0000 (14:35 +0000)]
Auto merge of #32000 - xaocon:master, r=steveklabnik

Vectors come up in sections dedicated to ownership with the assumption that we know something about it but we haven't seen it yet. On the other hand, you need not know anything about ownership or lifetimes to understand the basics of vectors covered in the vector section of the book. Additionally, by moving it where it is there is a natural progression from loops to an iterative type which discusses for loops. This kind of interaction is generally better for learning.

I would like to have moved the struct section as well but I'm less confident about how to handle it since the ownership sections discuss structs and the structs section talks about mutable borrow.

8 years agothread revision identifier around in test output
Niko Matsakis [Wed, 2 Mar 2016 09:16:30 +0000 (04:16 -0500)]
thread revision identifier around in test output

8 years agoconvert coherence-cow to use revisions
Niko Matsakis [Wed, 2 Mar 2016 03:05:54 +0000 (22:05 -0500)]
convert coherence-cow to use revisions

8 years agorefactor and generalize revisions
Niko Matsakis [Wed, 2 Mar 2016 03:05:39 +0000 (22:05 -0500)]
refactor and generalize revisions

8 years agoAuto merge of #31937 - petrochenkov:field, r=eddyb
bors [Wed, 2 Mar 2016 08:42:38 +0000 (08:42 +0000)]
Auto merge of #31937 - petrochenkov:field, r=eddyb

The names are "0", "1", "2" etc, the same as used in field access.

This generally make things simpler and potentially allows to reuse braced struct machinery (struct patterns, struct expressions) for tuple structs.

I haven't touched the AST for stability reasons, but I intend to do it later.

r? @eddyb

8 years agoAdd test (fixes #27340)
Vadim Petrochenkov [Sun, 28 Feb 2016 11:25:26 +0000 (14:25 +0300)]
Add test (fixes #27340)

8 years agoMove span into `StructField`
Vadim Petrochenkov [Sat, 27 Feb 2016 08:34:29 +0000 (11:34 +0300)]
Move span into `StructField`

+ some cleanup in rustdoc

8 years agoUse numeric field `Name`s ("0", "1" etc) for positional fields
Vadim Petrochenkov [Sat, 27 Feb 2016 00:05:14 +0000 (03:05 +0300)]
Use numeric field `Name`s ("0", "1" etc) for positional fields

8 years agoGet rid of hir::StructFieldKind
Vadim Petrochenkov [Fri, 26 Feb 2016 20:59:35 +0000 (23:59 +0300)]
Get rid of hir::StructFieldKind

8 years agoAdd a span note on type definition spot
vegai [Wed, 2 Mar 2016 05:06:22 +0000 (07:06 +0200)]
Add a span note on type definition spot

8 years agoExplained the difference between ownership iteration and reference iteration
srinivasreddy [Wed, 2 Mar 2016 04:06:30 +0000 (09:36 +0530)]
Explained the difference between ownership iteration and reference iteration

8 years agoAuto merge of #32001 - Manishearth:rollup, r=Manishearth
bors [Wed, 2 Mar 2016 02:40:07 +0000 (02:40 +0000)]
Auto merge of #32001 - Manishearth:rollup, r=Manishearth

- Successful merges: #31919, #31982, #31985, #31989, #31999
- Failed merges:

8 years agointroduce the notion of revisions, currently unused
Niko Matsakis [Wed, 2 Mar 2016 02:10:36 +0000 (21:10 -0500)]
introduce the notion of revisions, currently unused

a test file may specify `// revisions: foo bar baz`

headers and expected errors may be made specific to a revision
by writing `//[foo] header` or `//[foo]~ ERROR`

8 years agochange compile_flags to eagerly split into a vector on whitespace
Niko Matsakis [Wed, 2 Mar 2016 02:09:36 +0000 (21:09 -0500)]
change compile_flags to eagerly split into a vector on whitespace

8 years agoRollup merge of #31999 - bluss:fundamental-raw-ptr, r=eddyb
Manish Goregaokar [Wed, 2 Mar 2016 01:31:16 +0000 (07:01 +0530)]
Rollup merge of #31999 - bluss:fundamental-raw-ptr, r=eddyb

Use raw pointer casts for slice, str's .as_ptr()

We can now use raw pointer casts `*const [T] as *const T` and
`*const str as *const u8` instead of .repr() for getting the
pointer out of a slice.

8 years agoRollup merge of #31989 - Kimundi:more_flexible_str_pattern_indirection, r=bluss
Manish Goregaokar [Wed, 2 Mar 2016 01:31:15 +0000 (07:01 +0530)]
Rollup merge of #31989 - Kimundi:more_flexible_str_pattern_indirection, r=bluss

This allows a bit more flexibility in how to use it, see the included test case.

8 years agoRollup merge of #31985 - ashleysommer:libbackgrace_emscripten_fix, r=alexcrichton
Manish Goregaokar [Wed, 2 Mar 2016 01:31:15 +0000 (07:01 +0530)]
Rollup merge of #31985 - ashleysommer:libbackgrace_emscripten_fix, r=alexcrichton

Was getting error:
```
running: "sh" "/home/flubba86/rust/src/libstd/../libbacktrace/configure" "--with-pic" "--disable-multilib" "--disable-shared" "--disable-host-shared" "--host=asmjs-unknown-emscripten" "--build=x86_64-unknown-linux-gnu"
...
Invalid configuration `asmjs-unknown-emscripten': system `emscripten' not recognized
```
This commit adds the emscripten target to the libbacktrace configure script so it is no longer unrecognized.

8 years agoRollup merge of #31982 - apasel422:sync, r=alexcrichton
Manish Goregaokar [Wed, 2 Mar 2016 01:31:15 +0000 (07:01 +0530)]
Rollup merge of #31982 - apasel422:sync, r=alexcrichton

These types were already `!Sync`, but this improves error messages when they are used in contexts that require `Sync`, aligning them with conventions used with `Rc`, among others.

r? @alexcrichton

8 years agoRollup merge of #31919 - petrochenkov:blockpub, r=nikomatsakis
Manish Goregaokar [Wed, 2 Mar 2016 01:31:15 +0000 (07:01 +0530)]
Rollup merge of #31919 - petrochenkov:blockpub, r=nikomatsakis

Closes https://github.com/rust-lang/rust/issues/31776

r? @nikomatsakis

8 years agoMake book ordering more natural
Evan [Wed, 2 Mar 2016 00:50:11 +0000 (19:50 -0500)]
Make book ordering more natural

Vectors come up in sections dedicated to ownership with the assumption that we know something about it but we haven't seen it yet. On the other hand, you need not know anything about ownership or lifetimes to understand the basics of vectors covered in the vector section of the book. Additionally, by moving it where it is there is a natural progression from loops to an iterative type which discusses for loops. This kind of interaction is generally better for learning.

I would like to have moved the struct section as well but I'm less confident about how to handle it since the ownership sections discuss structs and the structs section talks about mutable borrow.

8 years agoFix compiling libstd with emscripten target.
ashleysommer [Tue, 1 Mar 2016 10:57:43 +0000 (20:57 +1000)]
Fix compiling libstd with emscripten target.
Was getting error:
```
running: "sh" "/home/flubba86/rust/src/libstd/../libbacktrace/configure" "--with-pic" "--disable-multilib" "--disable-shared" "--disable-host-shared" "--host=asmjs-unknown-emscripten" "--build=x86_64-unknown-linux-gnu"
...
Invalid configuration `asmjs-unknown-emscripten': system `emscripten' not recognized
```

Undo change to libbacktrace configure script.
Modify libstd build.rs to not build libbacktrace in the case of targeting emscripten.

8 years agoExplicitly opt out of `Sync` for `cell` and `mpsc` types
Andrew Paseltiner [Tue, 1 Mar 2016 03:03:23 +0000 (22:03 -0500)]
Explicitly opt out of `Sync` for `cell` and `mpsc` types

These types were already `!Sync`, but this improves error messages when
they are used in contexts that require `Sync`, aligning them with
conventions used with `Rc`, among others.

8 years agoAuto merge of #31430 - nagisa:mir-dyndrop, r=nikomatsakis
bors [Tue, 1 Mar 2016 23:30:49 +0000 (23:30 +0000)]
Auto merge of #31430 - nagisa:mir-dyndrop, r=nikomatsakis

Zeroing on-drop seems to work fine. Still thinking about the best way to approach zeroing on-move.

(based on top of the other drop PR; only the last 2 commits are relevant)

8 years agoUse raw pointer casts for slice, str's .as_ptr()
Ulrik Sverdrup [Tue, 1 Mar 2016 19:21:55 +0000 (20:21 +0100)]
Use raw pointer casts for slice, str's .as_ptr()

We can now use raw pointer casts `*const [T] as *const T` and
`*const str as *const u8` instead of .repr() for getting the
pointer out of a slice.

8 years agoUpdate libc crate
Sebastian Wicki [Tue, 1 Mar 2016 20:15:49 +0000 (21:15 +0100)]
Update libc crate

8 years agoAuto merge of #31993 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 1 Mar 2016 20:09:00 +0000 (20:09 +0000)]
Auto merge of #31993 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #31965, #31969, #31973, #31978, #31984, #31987, #31992
- Failed merges:

8 years agospan_note => fileline_note
vegai [Tue, 1 Mar 2016 19:33:35 +0000 (21:33 +0200)]
span_note => fileline_note

8 years agoRollup merge of #31992 - brson:bump, r=steveklabnik
Steve Klabnik [Tue, 1 Mar 2016 18:39:42 +0000 (13:39 -0500)]
Rollup merge of #31992 - brson:bump, r=steveklabnik

8 years agoRollup merge of #31987 - gcatlin:patch-1, r=steveklabnik
Steve Klabnik [Tue, 1 Mar 2016 18:39:42 +0000 (13:39 -0500)]
Rollup merge of #31987 - gcatlin:patch-1, r=steveklabnik

r? @steveklabnik

8 years agoRollup merge of #31984 - xaocon:master, r=steveklabnik
Steve Klabnik [Tue, 1 Mar 2016 18:39:42 +0000 (13:39 -0500)]
Rollup merge of #31984 - xaocon:master, r=steveklabnik

Had a discussion at https://www.reddit.com/r/rust/comments/488mjv/borrowing_or_returning_ownership/ about how an example could be worded more clearly and tried to take my recommendation and expand upon it with further information provided in the post.

8 years agoRollup merge of #31978 - tsion:patch-1, r=Manishearth
Steve Klabnik [Tue, 1 Mar 2016 18:39:42 +0000 (13:39 -0500)]
Rollup merge of #31978 - tsion:patch-1, r=Manishearth

Previously it was rendering like this: http://i.imgur.com/ODFPdFW.png

8 years agoRollup merge of #31973 - brson:relnotes3, r=alexcrichton
Steve Klabnik [Tue, 1 Mar 2016 18:39:42 +0000 (13:39 -0500)]
Rollup merge of #31973 - brson:relnotes3, r=alexcrichton

This builds on some of the other relnotes PRs in the queue.

8 years agoRollup merge of #31969 - brson:relnotes, r=alexcrichton
Steve Klabnik [Tue, 1 Mar 2016 18:39:41 +0000 (13:39 -0500)]
Rollup merge of #31969 - brson:relnotes, r=alexcrichton

Same as https://github.com/rust-lang/rust/pull/31923 but without the submodule updates.

8 years agoRollup merge of #31965 - miqid:doc, r=steveklabnik
Steve Klabnik [Tue, 1 Mar 2016 18:39:41 +0000 (13:39 -0500)]
Rollup merge of #31965 - miqid:doc, r=steveklabnik

Hello.

Quite a few of the links in the `core` module concerning redirection to additional primitive type documentation are broken. I noticed in #30214 that there seemed to be a consensus with linking across to `std` module documentation from the `core` module. This is what I've done with the `core` modules for primitive types.

If the changes here are good to go forward with, I'll happily tend to adding more documentation links for the extension traits in the aforementioned issue if need be.

r? @steveklabnik

8 years agoBump to 1.9
Brian Anderson [Tue, 1 Mar 2016 18:34:26 +0000 (18:34 +0000)]
Bump to 1.9

8 years agorefactor header parsing so it can work "in-place"
Niko Matsakis [Tue, 1 Mar 2016 17:26:24 +0000 (12:26 -0500)]
refactor header parsing so it can work "in-place"

8 years agoChanged `std::pattern::Pattern` impl on `&'a &'a str` to `&'a &'b str`
Marvin Löbel [Tue, 1 Mar 2016 16:53:51 +0000 (17:53 +0100)]
Changed `std::pattern::Pattern` impl on `&'a &'a str` to `&'a &'b str`
in order to allow a bit more felixibility in how to use it.

8 years agorequire that header lines begin with `//`
Niko Matsakis [Tue, 1 Mar 2016 15:43:09 +0000 (10:43 -0500)]
require that header lines begin with `//`

8 years agoAuto merge of #31939 - killercup:patch-17, r=brson
bors [Tue, 1 Mar 2016 14:46:04 +0000 (14:46 +0000)]
Auto merge of #31939 - killercup:patch-17, r=brson

Use unordered nested list for stabilised APIs to improve readability. This makes the release notes for 1.7 a bit longer, but I don't think we should optimise for brevity here. It's a bit inconsistent since the other releases are not done this way, so feel free to ignore this change.

Also:
- Add link to `u32::checked_neg`
- Remove trailing back tick from BTreeMap line

r? @brson

8 years agogrammar: 'fewer' instead of 'less'
Geoff Catlin [Tue, 1 Mar 2016 13:42:34 +0000 (08:42 -0500)]
grammar: 'fewer' instead of 'less'

8 years agoFix broken links for core primitives
Michael Huynh [Tue, 1 Mar 2016 12:44:48 +0000 (20:44 +0800)]
Fix broken links for core primitives

Redirects existing links for more details on primitive types in the
`core` module to the ones that exist in the `std` module.

8 years agoAuto merge of #31962 - sanxiyn:const-eval-map, r=arielb1
bors [Tue, 1 Mar 2016 11:33:25 +0000 (11:33 +0000)]
Auto merge of #31962 - sanxiyn:const-eval-map, r=arielb1

Fix #31910.

8 years agoAuto merge of #31335 - SimonSapin:ascii-into, r=alexcrichton
bors [Tue, 1 Mar 2016 07:43:52 +0000 (07:43 +0000)]
Auto merge of #31335 - SimonSapin:ascii-into, r=alexcrichton

The default implementations (with `where Self: Sized`) are so that methods that take `self` by value can exist in a trait that’s implemented for dynamically-sized types (`str` and `[u8]`).

CC https://github.com/rust-lang/rust/issues/27809#issuecomment-177564950
CC @alexcrichton

8 years agoAuto merge of #31713 - alexcrichton:rustbuild-docs, r=brson
bors [Tue, 1 Mar 2016 04:44:56 +0000 (04:44 +0000)]
Auto merge of #31713 - alexcrichton:rustbuild-docs, r=brson

This commit implements documentation generation of the nomicon, the book, the
style guide, and the standalone docs. New steps were added for each one as well
as appropriate makefile targets for each one as well.

8 years agoClarified the details of a borrowing example.
Evan [Tue, 1 Mar 2016 04:22:30 +0000 (23:22 -0500)]
Clarified the details of a borrowing example.

Had a discussion at https://www.reddit.com/r/rust/comments/488mjv/borrowing_or_returning_ownership/ about how an example could be worded more clearly and tried to take my recommendation and expand upon it with further information provided in the post.

8 years agoAdd link for `checked_neg` in 1.7 release notes.
Scott Olson [Mon, 29 Feb 2016 22:36:36 +0000 (16:36 -0600)]
Add link for `checked_neg` in 1.7 release notes.