Commit Graph

51034 Commits

Author SHA1 Message Date
bors
339a409bfd 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)
2016-03-01 23:30:49 +00:00
Ulrik Sverdrup
63c4065af0 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.
2016-03-01 22:30:18 +01:00
Sebastian Wicki
ffd734c35b Update libc crate 2016-03-01 21:15:49 +01:00
bors
84d8fec9b0 Auto merge of #31993 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #31965, #31969, #31973, #31978, #31984, #31987, #31992
- Failed merges:
2016-03-01 20:09:00 +00:00
Alex Crichton
613f449edd rustbuild: Fix building from an empty directory
A stray shutil.rmtree happened when it shouldn't have happened, causing the
entire build to fail.
2016-03-01 12:02:11 -08:00
vegai
59fafcf00c span_note => fileline_note 2016-03-01 21:33:35 +02:00
Steve Klabnik
fbe9f10266 Rollup merge of #31992 - brson:bump, r=steveklabnik 2016-03-01 13:39:42 -05:00
Steve Klabnik
0ee1b99288 Rollup merge of #31987 - gcatlin:patch-1, r=steveklabnik
r? @steveklabnik
2016-03-01 13:39:42 -05:00
Steve Klabnik
c98c1b777f 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.
2016-03-01 13:39:42 -05:00
Steve Klabnik
5b40e9b733 Rollup merge of #31978 - tsion:patch-1, r=Manishearth
Previously it was rendering like this: http://i.imgur.com/ODFPdFW.png
2016-03-01 13:39:42 -05:00
Steve Klabnik
a217b19035 Rollup merge of #31973 - brson:relnotes3, r=alexcrichton
This builds on some of the other relnotes PRs in the queue.
2016-03-01 13:39:42 -05:00
Steve Klabnik
b3c78fc29a Rollup merge of #31969 - brson:relnotes, r=alexcrichton
Same as https://github.com/rust-lang/rust/pull/31923 but without the submodule updates.
2016-03-01 13:39:41 -05:00
Steve Klabnik
5b91fc02f0 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
2016-03-01 13:39:41 -05:00
Brian Anderson
7bf4d9c951 Bump to 1.9 2016-03-01 18:34:26 +00:00
Niko Matsakis
c76125742a refactor header parsing so it can work "in-place" 2016-03-01 12:26:24 -05:00
Marvin Löbel
dd67e55c10 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.
2016-03-01 17:53:51 +01:00
Niko Matsakis
24f0851e67 require that header lines begin with // 2016-03-01 10:43:09 -05:00
bors
f25f0e8de9 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
2016-03-01 14:46:04 +00:00
Geoff Catlin
dcb92abbe1 grammar: 'fewer' instead of 'less' 2016-03-01 08:42:34 -05:00
Michael Huynh
dc97f84be4 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.
2016-03-01 20:44:48 +08:00
bors
bbc0238e90 Auto merge of #31962 - sanxiyn:const-eval-map, r=arielb1
Fix #31910.
2016-03-01 11:33:25 +00:00
bors
0a52494f7e 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
2016-03-01 07:43:52 +00:00
bors
a93bb135c8 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.
2016-03-01 04:44:56 +00:00
Evan
ae9121bb6d 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.
2016-02-29 23:22:30 -05:00
Scott Olson
60ee36a1b9 Add link for checked_neg in 1.7 release notes. 2016-02-29 16:36:36 -06:00
bors
5a0308abad 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!
2016-02-29 22:30:44 +00:00
Brian Anderson
7a9f998de9 Move the RFC 1214 breakage to 1.7 compatibility notes 2016-02-29 18:37:38 +00:00
Brian Anderson
0cd55e52ff Add HashMap stabilizations to 1.7 relnotes 2016-02-29 18:28:33 +00:00
Brian Anderson
276e5582fc remove unstable flag from 1.7 release notes 2016-02-29 18:15:26 +00:00
bors
52cb8a9d39 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
2016-02-29 17:39:26 +00:00
Alex Crichton
95560c14a3 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
2016-02-29 09:36:00 -08:00
Alex Crichton
b643782a10 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
2016-02-29 09:05:33 -08:00
Seo Sanghyeon
33bd1442aa Use HIR map instead of tcx in constant evaluator
Constant evaluator can be called while tcx is in construction.
2016-02-29 22:54:02 +09:00
bors
504ca6f422 Auto merge of #31958 - teoryn:patch-3, r=nagisa 2016-02-29 11:12:15 +00:00
bors
776a0f2cee 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.
2016-02-29 05:03:32 +00:00
Aidan Hobson Sayers
246401367d Add the 'T' present in the rust book 2016-02-29 02:50:18 +00:00
bors
953f6c9cc9 Auto merge of #31959 - teoryn:patch-4, r=Manishearth 2016-02-29 01:50:34 +00:00
Kevin Stock
7f59e069e8 Fix typo (an Result) 2016-02-28 20:48:17 -05:00
Kevin Stock
251f41905a Fix typo (!#[no_std]) 2016-02-28 20:46:56 -05:00
bors
d5558825b4 Auto merge of #31897 - tshepang:ref-not-needed, r=steveklabnik
Also, `path` seems better than `p`
2016-02-28 20:07:26 +00:00
Alex Crichton
15b4a8c2f3 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
2016-02-28 10:50:13 -08:00
Alex Crichton
17ae752093 rustbuild: Update nightly date
Also fix a bug where we didn't clean out previous nightlies
2016-02-28 10:50:13 -08:00
Alex Crichton
93a9ab1a1b rustbuild: Relax assertions about stage0
This allows bootstrapping new platforms immediately in stage0
2016-02-28 10:50:13 -08:00
Alex Crichton
506522ff4b rustbuild: Remove extra rustc flags
These should all no longer be necessary as they've been folded into the
compiler.
2016-02-28 10:50:13 -08:00
Alex Crichton
e9a897c10f 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.
2016-02-28 10:50:13 -08:00
Alex Crichton
06773878f3 rustbuild: Document what steps are 2016-02-28 10:50:13 -08:00
Alex Crichton
5abcc78ff8 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)
2016-02-28 10:50:13 -08:00
Alex Crichton
ed3d46d278 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.
2016-02-28 10:50:13 -08:00
Alex Crichton
189827bd96 rustbuild: Fix a copy/paste error
Fixes `--step librustc`
2016-02-28 10:50:13 -08:00
Alex Crichton
526640668d 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.
2016-02-28 10:50:13 -08:00