]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoSplit out rustdoc pass to strip private imports
mitaa [Sat, 5 Mar 2016 10:20:34 +0000 (11:20 +0100)]
Split out rustdoc pass to strip private imports

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 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 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 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 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 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 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 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 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 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 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 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.

8 years agoAuto merge of #31884 - alexcrichton:no-bootstrap-from-existing, r=brson
bors [Mon, 29 Feb 2016 22:30:44 +0000 (22:30 +0000)]
Auto merge of #31884 - alexcrichton:no-bootstrap-from-existing, r=brson

These commits add support to the rustbuild build system to compile non-build-system compilers. For example this will allow creating an ARM compiler on a x86 system. The high level way this works is:

* The only compiler ever run is the build target compiler. No other compiler is assumed to be runnable.
* As a result, all output artifacts come from the build compiler.
* The libs for the stageN cross-compiled compiler will be linked into place after the build target builds them.

This will break the assumption that a compiler never links to anything it didn't itself produce, but it retains the assumption that a compiler only ever links to anything built in the same stage. I believe this means that the stage1 cross-compiled compilers will still be usable.

I tested this by creating an `arm-unknown-linux-gnueabihf` compiler. So far the linking ended up all working OK (including LLVM being cross compiled), but I haven't been able to run it yet (in QEMU for a raspberry pi). I think that's because my system linker is messed up or something like that (some newer option is assumed when it's not actually there).

Overall, though, this means that rustbuild can compile an arm-unknown-linux-gnueabihf compiler. Ideally we could even start shipping nightlies based on this at some point!

8 years agoMove the RFC 1214 breakage to 1.7 compatibility notes
Brian Anderson [Mon, 29 Feb 2016 18:35:43 +0000 (18:35 +0000)]
Move the RFC 1214 breakage to 1.7 compatibility notes

8 years agoAdd HashMap stabilizations to 1.7 relnotes
Brian Anderson [Mon, 29 Feb 2016 18:27:38 +0000 (18:27 +0000)]
Add HashMap stabilizations to 1.7 relnotes

8 years agoremove unstable flag from 1.7 release notes
Brian Anderson [Mon, 29 Feb 2016 18:15:26 +0000 (18:15 +0000)]
remove unstable flag from 1.7 release notes

8 years agoAuto merge of #31928 - alexcrichton:stabilize-1.8, r=aturon
bors [Mon, 29 Feb 2016 17:39:26 +0000 (17:39 +0000)]
Auto merge of #31928 - alexcrichton:stabilize-1.8, r=aturon

This commit is the result of the FCPs ending for the 1.8 release cycle for both
the libs and the lang suteams. The full list of changes are:

Stabilized

* `braced_empty_structs`
* `augmented_assignments`
* `str::encode_utf16` - renamed from `utf16_units`
* `str::EncodeUtf16` - renamed from `Utf16Units`
* `Ref::map`
* `RefMut::map`
* `ptr::drop_in_place`
* `time::Instant`
* `time::SystemTime`
* `{Instant,SystemTime}::now`
* `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier`
* `{Instant,SystemTime}::elapsed`
* Various `Add`/`Sub` impls for `Time` and `SystemTime`
* `SystemTimeError`
* `SystemTimeError::duration`
* Various impls for `SystemTimeError`
* `UNIX_EPOCH`
* `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign`

Deprecated

* Scoped TLS (the `scoped_thread_local!` macro)
* `Ref::filter_map`
* `RefMut::filter_map`
* `RwLockReadGuard::map`
* `RwLockWriteGuard::map`
* `Condvar::wait_timeout_with`

Closes #27714
Closes #27715
Closes #27746
Closes #27748
Closes #27908
Closes #29866
Closes #28235
Closes #29720

8 years agotest: Mark all rpass-valgrind as no-prefer-dynamic
Alex Crichton [Mon, 29 Feb 2016 17:34:13 +0000 (09:34 -0800)]
test: Mark all rpass-valgrind as no-prefer-dynamic

This applies the same fix as added in 595d5b2f which is to just compile all
valgrind tests statically instead of dynamically. It looks like this is a
resurgence of either #30383 or #31328 in some weird fashion.

I'm not actually sure what's going on with the bots, and it's unclear whether
this is a valgrind bug or a libstd bug, but for now let's just get things
landing again.

Closes #30383

8 years agostd: Stabilize APIs for the 1.8 release
Alex Crichton [Thu, 25 Feb 2016 23:52:29 +0000 (15:52 -0800)]
std: Stabilize APIs for the 1.8 release

This commit is the result of the FCPs ending for the 1.8 release cycle for both
the libs and the lang suteams. The full list of changes are:

Stabilized

* `braced_empty_structs`
* `augmented_assignments`
* `str::encode_utf16` - renamed from `utf16_units`
* `str::EncodeUtf16` - renamed from `Utf16Units`
* `Ref::map`
* `RefMut::map`
* `ptr::drop_in_place`
* `time::Instant`
* `time::SystemTime`
* `{Instant,SystemTime}::now`
* `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier`
* `{Instant,SystemTime}::elapsed`
* Various `Add`/`Sub` impls for `Time` and `SystemTime`
* `SystemTimeError`
* `SystemTimeError::duration`
* Various impls for `SystemTimeError`
* `UNIX_EPOCH`
* `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign`

Deprecated

* Scoped TLS (the `scoped_thread_local!` macro)
* `Ref::filter_map`
* `RefMut::filter_map`
* `RwLockReadGuard::map`
* `RwLockWriteGuard::map`
* `Condvar::wait_timeout_with`

Closes #27714
Closes #27715
Closes #27746
Closes #27748
Closes #27908
Closes #29866

8 years agoUse HIR map instead of tcx in constant evaluator
Seo Sanghyeon [Mon, 29 Feb 2016 13:54:02 +0000 (22:54 +0900)]
Use HIR map instead of tcx in constant evaluator

Constant evaluator can be called while tcx is in construction.

8 years agoAuto merge of #31958 - teoryn:patch-3, r=nagisa
bors [Mon, 29 Feb 2016 11:12:15 +0000 (11:12 +0000)]
Auto merge of #31958 - teoryn:patch-3, r=nagisa

8 years agoAuto merge of #31960 - aidanhs:aphs-tweak-aliasing-docs, r=Manishearth
bors [Mon, 29 Feb 2016 05:03:32 +0000 (05:03 +0000)]
Auto merge of #31960 - aidanhs:aphs-tweak-aliasing-docs, r=Manishearth

See https://doc.rust-lang.org/book/unsafe.html#what-does-safe-mean for the book version of these points which already contain the T.

8 years agoAdd the 'T' present in the rust book
Aidan Hobson Sayers [Mon, 29 Feb 2016 02:50:18 +0000 (02:50 +0000)]
Add the 'T' present in the rust book

8 years agoAuto merge of #31959 - teoryn:patch-4, r=Manishearth
bors [Mon, 29 Feb 2016 01:50:34 +0000 (01:50 +0000)]
Auto merge of #31959 - teoryn:patch-4, r=Manishearth

8 years agoFix typo (an Result)
Kevin Stock [Mon, 29 Feb 2016 01:48:17 +0000 (20:48 -0500)]
Fix typo (an Result)

8 years agoFix typo (!#[no_std])
Kevin Stock [Mon, 29 Feb 2016 01:46:56 +0000 (20:46 -0500)]
Fix typo (!#[no_std])

8 years agoAuto merge of #31897 - tshepang:ref-not-needed, r=steveklabnik
bors [Sun, 28 Feb 2016 20:07:26 +0000 (20:07 +0000)]
Auto merge of #31897 - tshepang:ref-not-needed, r=steveklabnik

Also, `path` seems better than `p`

8 years agorustbuild: Update dependencies
Alex Crichton [Thu, 25 Feb 2016 18:38:09 +0000 (10:38 -0800)]
rustbuild: Update dependencies

* Fixes a warning with libc
* Brings in some new flag updates for various platforms through gcc-rs
* Otherwise routine updates here/there

8 years agorustbuild: Update nightly date
Alex Crichton [Thu, 25 Feb 2016 17:29:02 +0000 (09:29 -0800)]
rustbuild: Update nightly date

Also fix a bug where we didn't clean out previous nightlies

8 years agorustbuild: Relax assertions about stage0
Alex Crichton [Thu, 25 Feb 2016 08:01:22 +0000 (00:01 -0800)]
rustbuild: Relax assertions about stage0

This allows bootstrapping new platforms immediately in stage0

8 years agorustbuild: Remove extra rustc flags
Alex Crichton [Thu, 25 Feb 2016 07:51:36 +0000 (23:51 -0800)]
rustbuild: Remove extra rustc flags

These should all no longer be necessary as they've been folded into the
compiler.

8 years agorustbuild: Add steps for linking a sysroot
Alex Crichton [Thu, 25 Feb 2016 07:50:32 +0000 (23:50 -0800)]
rustbuild: Add steps for linking a sysroot

When cross compiling for a new host, we can't actually run the host compiler to
generate its own libs. In theory, however, all stage2 compilers (for any host)
will produce the same libraries, so we just require the build compiler to
produce the necessary host libraries and then we link those into place.

8 years agorustbuild: Document what steps are
Alex Crichton [Thu, 25 Feb 2016 05:12:42 +0000 (21:12 -0800)]
rustbuild: Document what steps are

8 years agorustbuild: Compile with the build compiler
Alex Crichton [Thu, 25 Feb 2016 03:04:35 +0000 (19:04 -0800)]
rustbuild: Compile with the build compiler

This switches the defaults to ensure that everything is built with the build
compiler rather than the host compiler itself (which we're not guaranteed to be
able to run)

8 years agorustbuild: Move assembling rustc to its own step
Alex Crichton [Thu, 25 Feb 2016 03:03:48 +0000 (19:03 -0800)]
rustbuild: Move assembling rustc to its own step

Right now it's implicitly done as part of building the compiler, but this was
intended to be a standalone step to ensure we tracked what built what.

8 years agorustbuild: Fix a copy/paste error
Alex Crichton [Thu, 25 Feb 2016 01:13:23 +0000 (17:13 -0800)]
rustbuild: Fix a copy/paste error

Fixes `--step librustc`

8 years agorustbuild: Enable cross-compiling LLVM
Alex Crichton [Thu, 25 Feb 2016 01:09:17 +0000 (17:09 -0800)]
rustbuild: Enable cross-compiling LLVM

Currently all multi-host builds assume the the build platform can run the
`llvm-config` binary generated for each host platform we're creating a compiler
for. Unfortunately this assumption isn't always true when cross compiling, so we
need to handle this case.

This commit alters the build script of `rustc_llvm` to understand when it's
running an `llvm-config` which is different than the platform we're targeting for.

8 years agorustbuild: Fix compiler-rt build on gnueabihf
Alex Crichton [Wed, 24 Feb 2016 22:31:18 +0000 (14:31 -0800)]
rustbuild: Fix compiler-rt build on gnueabihf

Needs a different target to get built and also we apparently need to appease the
C++ compiler somehow.

8 years agorustbuild: Sync changes to Cargo.lock
Alex Crichton [Wed, 24 Feb 2016 22:17:21 +0000 (14:17 -0800)]
rustbuild: Sync changes to Cargo.lock

8 years agorustbuild: Only pass RUSTC_FLAGS to target compiles
Alex Crichton [Wed, 24 Feb 2016 22:16:54 +0000 (14:16 -0800)]
rustbuild: Only pass RUSTC_FLAGS to target compiles

These flags aren't applicable to build scripts, and may actuall wreak havoc.

8 years agorustbuild: Enable bootstrapping new hosts
Alex Crichton [Wed, 24 Feb 2016 07:00:48 +0000 (23:00 -0800)]
rustbuild: Enable bootstrapping new hosts

This commit fixes a longstanding issue with the makefiles where all host
platforms bootstrap themselves. This commit alters the build logic for the
bootstrap to instead only bootstrap the build triple, and all other compilers
are compiled from that one compiler.

The benefit of this change is that we can cross-compile compilers which cannot
run on the build platform. For example our builders could start creating
`arm-unknown-linux-gnueabihf` compilers.

This reduces the amount of bootstrapping we do, reducing the amount of test
coverage, but overall it should largely just end in faster build times for
multi-host compiles as well as enabling a feature which can't be done today.

cc #5258

8 years agoAdd some tests
Vadim Petrochenkov [Sun, 28 Feb 2016 11:50:58 +0000 (14:50 +0300)]
Add some tests

8 years agodoc: "ref" not needed in the example
Tshepang Lekhonkhobe [Thu, 25 Feb 2016 21:21:55 +0000 (23:21 +0200)]
doc: "ref" not needed in the example

Also, `path` seems better than `p`

8 years agoAuto merge of #31902 - mitaa:rdoc-shorter, r=alexcrichton
bors [Sun, 28 Feb 2016 07:27:12 +0000 (07:27 +0000)]
Auto merge of #31902 - mitaa:rdoc-shorter, r=alexcrichton

fixes #31899

r? @alexcrichton

8 years agoAuto merge of #31942 - bluss:iter-desugar, r=steveklabnik
bors [Sat, 27 Feb 2016 22:33:29 +0000 (22:33 +0000)]
Auto merge of #31942 - bluss:iter-desugar, r=steveklabnik

Make for loop desugaring for iterators more precise

The UFCS call IntoIterator::into_iter() is used by the for loop.

8 years agoAuto merge of #31931 - Luke-Nukem:master, r=steveklabnik
bors [Sat, 27 Feb 2016 20:26:59 +0000 (20:26 +0000)]
Auto merge of #31931 - Luke-Nukem:master, r=steveklabnik

 Refinement of paragraph referenced by [this issue](https://github.com/rust-lang/rust/issues/31927).

The paragraph in question had been adjusted already, but I've made some further clarifications which should help with readability and not leave the reader any `dangling pointers`.

8 years agoAuto merge of #31915 - nagisa:mir-unpretty-fix, r=arielb1
bors [Sat, 27 Feb 2016 18:12:23 +0000 (18:12 +0000)]
Auto merge of #31915 - nagisa:mir-unpretty-fix, r=arielb1

Fixes https://github.com/rust-lang/rust/issues/31913

8 years agoMake for loop desugaring for iterators more precise
Ulrik Sverdrup [Sat, 27 Feb 2016 16:32:20 +0000 (17:32 +0100)]
Make for loop desugaring for iterators more precise

The UFCS call IntoIterator::into_iter() is used by the for loop.

8 years agoAuto merge of #31940 - teoryn:patch-2, r=steveklabnik
bors [Sat, 27 Feb 2016 15:06:19 +0000 (15:06 +0000)]
Auto merge of #31940 - teoryn:patch-2, r=steveklabnik

See http://www.ietf.org/rfc/rfc2119.txt

8 years agoResolve ambiguous documentation
Kevin Stock [Sat, 27 Feb 2016 13:26:42 +0000 (08:26 -0500)]
Resolve ambiguous documentation

See http://www.ietf.org/rfc/rfc2119.txt

8 years agoReformat Part of 1.7 Release Notes
Pascal Hertleif [Sat, 27 Feb 2016 11:19:08 +0000 (12:19 +0100)]
Reformat Part of 1.7 Release Notes

- Use unordered nested list for stabilised APIs to improve readability
- Add link to `u32::checked_neg`
- Remove trailing back tick from BTreeMap line

8 years agoAdd test
Simonas Kazlauskas [Fri, 26 Feb 2016 16:24:04 +0000 (18:24 +0200)]
Add test

8 years agoFix MIR unpretty on failure conditions
Simonas Kazlauskas [Fri, 26 Feb 2016 16:20:47 +0000 (18:20 +0200)]
Fix MIR unpretty on failure conditions

8 years agoAuto merge of #31932 - Manishearth:rollup, r=Manishearth
bors [Sat, 27 Feb 2016 08:59:57 +0000 (08:59 +0000)]
Auto merge of #31932 - Manishearth:rollup, r=Manishearth

- Successful merges: #31909, #31918, #31922, #31926, #31928, #31929, #31930
- Failed merges:

8 years agoAuto merge of #31926 - llogiq:more_post, r=eddyb
bors [Sat, 27 Feb 2016 06:58:28 +0000 (06:58 +0000)]
Auto merge of #31926 - llogiq:more_post, r=eddyb

These `_post` methods are quite helpful to control lint behavior without storing e.g. block node ids. So here are a few more I believe will be helpful.

r? @Manishearth

8 years agoCorrect plain-summary-line
mitaa [Fri, 26 Feb 2016 16:39:37 +0000 (17:39 +0100)]
Correct plain-summary-line

For plaintext we don't actually need to render the Markdown before
shortening the string. (and this may have led to wrong output)

8 years agoClearly separate code blocks from other blocks
mitaa [Fri, 26 Feb 2016 16:19:35 +0000 (17:19 +0100)]
Clearly separate code blocks from other blocks

For summary descriptions we need the first paragraph (adjacent lines
until a blank line) - but the rendered markdown of a code block did not
leave a blank line in the html and was thus included in the summary line.

8 years agoRollup merge of #31930 - miqid:doc, r=steveklabnik
Manish Goregaokar [Sat, 27 Feb 2016 02:34:54 +0000 (08:04 +0530)]
Rollup merge of #31930 - miqid:doc, r=steveklabnik

Hello.

I've added links for items inside of some stable methods for consistency with existing ones that already have them. Also includes minor formatting fixes.

r? @steveklabnik

8 years agoRollup merge of #31929 - dotdash:less_rallocx, r=alexcrichton
Manish Goregaokar [Sat, 27 Feb 2016 02:34:54 +0000 (08:04 +0530)]
Rollup merge of #31929 - dotdash:less_rallocx, r=alexcrichton

When foldings Substs, we map over VecPerParamSpace instances using
EnumeratedItems which does not provide an accurate size_hint()
in its Iterator implementation. This leads to quite a large number or
reallocations. Providing a suitable size_hint() implementation reduces
the time spent in item-bodies checking quite a bit.

```
crate  | before | after | ~change
-------|-------------------------
core   |  7.28s | 5.44s |   -25%
std    |  2.07s | 1.88s |  -9.2%
syntax |  8.86s | 8.30s |  -6.3%
```

8 years agoRollup merge of #31926 - llogiq:more_post, r=eddyb
Manish Goregaokar [Sat, 27 Feb 2016 02:34:54 +0000 (08:04 +0530)]
Rollup merge of #31926 - llogiq:more_post, r=eddyb

These `_post` methods are quite helpful to control lint behavior without storing e.g. block node ids. So here are a few more I believe will be helpful.

r? @Manishearth

8 years agoRollup merge of #31922 - Amanieu:relnotes17, r=brson
Manish Goregaokar [Sat, 27 Feb 2016 02:34:54 +0000 (08:04 +0530)]
Rollup merge of #31922 - Amanieu:relnotes17, r=brson

8 years agoRollup merge of #31918 - GuillaumeGomez:patch-3, r=steveklabnik
Manish Goregaokar [Sat, 27 Feb 2016 02:34:53 +0000 (08:04 +0530)]
Rollup merge of #31918 - GuillaumeGomez:patch-3, r=steveklabnik

r? @steveklabnik

Fixes #29334