Commit Graph

552 Commits

Author SHA1 Message Date
Steve Klabnik b4cd3d9206 Revert "Fix up links"
This reverts commit 7f1d1c6d9a.

The original commit was created because mdBook and rustdoc had
different generation algorithms for header links; now with
https://github.com/rust-lang/rust/pull/39966 , the algorithms
are the same. So let's undo this change.

... when I came across this problem, I said "eh, this isn't fun,
but it doesn't take that long." I probably should have just actually
taken the time to fix upstream, given that they were amenable. Oh
well!
2017-02-20 09:09:12 -05:00
Steve Klabnik 7f1d1c6d9a Fix up links
mdbook and rustdoc generate links differently, so we need to change all
these links.
2017-02-13 13:41:24 -05:00
whataloadofwhat ca92c51682 Change std::panicking::try::Data into a union
No longer potentially call `mem::uninitialized::<!>()`

Fixes #39432
2017-02-10 19:20:28 +00:00
Corey Farwell 6fb57bf13f Rollup merge of #39431 - alexcrichton:no-more-makefiles, r=brson
Delete the makefile build system

This PR deletes the makefile build system in favor of the rustbuild build system. The beta has now been branched so 1.16 will continue to be buildable from the makefiles, but going forward 1.17 will only be buildable with rustbuild.

Rustbuild has been the default build system [since 1.15.0](https://github.com/rust-lang/rust/pull/37817) and the makefiles were [proposed for deletion](https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368) at this time back in November of last year.

And now with the deletion of these makefiles we can start getting those sweet sweet improvements of using crates.io crates in the compiler!
2017-02-07 22:54:25 -05:00
Alex Crichton 77c3bfa742 std: Remove cfg(cargobuild) annotations
These are all now no longer needed that we've only got rustbuild in tree.
2017-02-06 08:42:54 -08:00
Clar Charr 8b2e334e0e Ipv6Addr <-> u128 2017-02-05 18:55:37 -05:00
Corey Farwell ca202fe181 Rollup merge of #38983 - APTy:udp-peek, r=aturon
Add peek APIs to std::net

Adds "peek" APIs to `std::net` sockets, including:
- `UdpSocket.peek()`
- `UdpSocket.peek_from()`
- `TcpStream.peek()`

These methods enable socket reads without side-effects. That is, repeated calls to `peek()` return identical data. This is accomplished by providing the POSIX flag `MSG_PEEK` to the underlying socket read operations.

This also moves the current implementation of `recv_from` out of the platform-independent `sys_common` and into respective `sys/windows` and `sys/unix` implementations. This allows for more platform-dependent implementations where necessary.

Fixes #38980
2017-02-05 09:14:38 -05:00
Tyler Julian a40be0857c libstd/net: Add `peek` APIs to UdpSocket and TcpStream
These methods enable socket reads without side-effects. That is,
repeated calls to peek() return identical data. This is accomplished
by providing the POSIX flag MSG_PEEK to the underlying socket read
operations.

This also moves the current implementation of recv_from out of the
platform-independent sys_common and into respective sys/windows and
sys/unix implementations. This allows for more platform-dependent
implementations.
2017-02-04 12:00:19 -08:00
Alex Crichton 626e754473 Bump version, upgrade bootstrap
This commit updates the version number to 1.17.0 as we're not on that version of
the nightly compiler, and at the same time this updates src/stage0.txt to
bootstrap from freshly minted beta compiler and beta Cargo.
2017-02-03 13:25:46 -08:00
Aidan Hobson Sayers 70d2372ada Expose a feature to force use of alloc_system, teach rustbuild
This fixes jemalloc-less local rebuilds, where we tell cargo that
we're actually stage1
2017-01-16 03:06:45 +00:00
Seo Sanghyeon d350c9b15f Rollup merge of #38664 - apasel422:may-dangle, r=pnkfelix
Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]`

CC #34761

r? @pnkfelix
2017-01-10 20:27:41 +09:00
bors 7ac9d337dc Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrc
Remove not(stage0) from deny(warnings)

Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
2017-01-08 08:22:06 +00:00
Simonas Kazlauskas b0e55a83a8 Such large. Very 128. Much bits.
This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which
understands and supports 128-bit integers throughout.

The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to
iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported,
this strategy is good enough to get past the first bootstrap stages to end up with a fully working
128-bit capable compiler.

In order for this strategy to work, number of locations had to be changed to use associated
max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?)
had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works
(former not necessarily producing the right results in stage1).

This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-30 15:15:44 +01:00
Alex Crichton 9b0b5b45db Remove not(stage0) from deny(warnings)
Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
2016-12-29 21:07:20 -08:00
Andrew Paseltiner ca9b07bbc9
Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]`
CC #34761
2016-12-28 17:47:10 -05:00
Corey Farwell 86fc63e62d Implement `fmt::Debug` for all structures in libstd.
Part of https://github.com/rust-lang/rust/issues/31869.

Also turn on the `missing_debug_implementations` lint at the crate
level.
2016-12-18 14:55:14 -08:00
bors b4b1e5ece2 Auto merge of #38049 - frewsxcv:libunicode, r=alexcrichton
Rename 'librustc_unicode' crate to 'libstd_unicode'.

Fixes https://github.com/rust-lang/rust/issues/26554.
2016-12-12 13:19:33 +00:00
Ulrik Sverdrup 7ba762253c std: Forward ExactSizeIterator::is_empty for Args, ArgsOs iterators 2016-12-04 15:46:36 +01:00
Alex Crichton 2186660b51 Update the bootstrap compiler
Now that we've got a beta build, let's use it!
2016-11-30 10:38:08 -08:00
Corey Farwell 274777a158 Rename 'librustc_unicode' crate to 'libstd_unicode'.
Fixes #26554.
2016-11-30 01:24:01 -05:00
Vadim Petrochenkov 74bb594563 Stabilize `..` in tuple (struct) patterns 2016-11-03 01:38:15 +03:00
Brian Anderson 6135cbc9e2 std: Flatten the num directory to reflect the module layout
This makes it dissimilar to how core is structured on disk, but
more predictable on its own.
2016-11-01 17:08:24 +00:00
Brian Anderson c251884575 Clean up and add more comments to libstd/lib.rs 2016-11-01 17:08:24 +00:00
Brian Anderson 8f5bb1f7c0 std: Remove unused test feature 2016-11-01 17:08:24 +00:00
Brian Anderson ca30691813 std: Move sys_common to libstd/sys_common
Make the directory structure reflect the module structure. I've always
found the existing structure confusing.
2016-11-01 17:08:24 +00:00
Brian Anderson 219c018894 std: Move platform-specific code out of libstd/lib.rs 2016-11-01 17:08:24 +00:00
bors 73f5cad6c4 Auto merge of #37178 - apasel422:issue-37136, r=alexcrichton
Implement `RefUnwindSafe` for atomic types

Closes #37136
2016-11-01 00:44:50 -07:00
Ulrik Sverdrup 0a0efcbebf std::collections: Reexport libcollections's range module
This is overdue, even if range and RangeArgument is still unstable.
The stability attributes are the same ones as the other unstable item
(Bound) here, they don't seem to matter.
2016-10-17 21:26:29 +02:00
Andrew Paseltiner f8322035eb
Implement `RefUnwindSafe` for atomic types
Closes #37136
2016-10-16 19:48:59 -04:00
Nick Cameron 14c62f91b7 Deprecate `Reflect`
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
2016-10-12 08:40:22 +13:00
Nick Cameron 9bc6d26092 Stabilise `?`
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-12 08:40:22 +13:00
Alex Crichton 10c3134da0 std: Stabilize and deprecate APIs for 1.13
This commit is intended to be backported to the 1.13 branch, and works with the
following APIs:

Stabilized

* `i32::checked_abs`
* `i32::wrapping_abs`
* `i32::overflowing_abs`
* `RefCell::try_borrow`
* `RefCell::try_borrow_mut`
* `DefaultHasher`
* `DefaultHasher::new`
* `DefaultHasher::default`

Deprecated

* `BinaryHeap::push_pop`
* `BinaryHeap::replace`
* `SipHash13`
* `SipHash24`
* `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map`
  module

Closes #28147
Closes #34767
Closes #35057
Closes #35070
2016-10-03 10:34:34 -07:00
Brian Anderson 3b49c60ab7 Remove stage0 hacks 2016-09-28 23:17:56 +00:00
Ashley Williams 3d8d55787b add assert_ne and debug_assert_ne macros 2016-09-21 14:38:26 +02:00
Alex Crichton 848cfe20a0 Link test to compiler builtins and make unstable
This commit fixes a test which now needs to explicitly link to the
`compiler_builtins` crate as well as makes the `compiler_builtins` crate
unstable.
2016-09-13 12:27:26 -07:00
Jorge Aparicio 3fd5fdd8d3 crate-ify compiler-rt into compiler-builtins
libcompiler-rt.a is dead, long live libcompiler-builtins.rlib

This commit moves the logic that used to build libcompiler-rt.a into a
compiler-builtins crate on top of the core crate and below the std crate.
This new crate still compiles the compiler-rt instrinsics using gcc-rs
but produces an .rlib instead of a static library.

Also, with this commit rustc no longer passes -lcompiler-rt to the
linker. This effectively makes the "no-compiler-rt" field of target
specifications a no-op. Users of `no_std` will have to explicitly add
the compiler-builtins crate to their crate dependency graph *if* they
need the compiler-rt intrinsics. Users of the `std` have to do nothing
extra as the std crate depends on compiler-builtins.

Finally, this a step towards lazy compilation of std with Cargo as the
compiler-rt intrinsics can now be built by Cargo instead of having to
be supplied by the user by some other method.

closes #34400
2016-09-12 21:22:15 -07:00
Vadim Petrochenkov 6f7e51e49b Replace `_, _, _` with `..` 2016-09-04 12:27:01 +03:00
bors eaf71f8d10 Auto merge of #35906 - jseyfried:local_prelude, r=eddyb
Use `#[prelude_import]` in `libcore` and `libstd`

r? @eddyb
2016-08-25 20:45:32 -07:00
Jeffrey Seyfried 9a2c8783d9 Use `#[prelude_import]` in `libstd`. 2016-08-24 22:12:48 +00:00
Eduard Burtescu 119508cdb4 Remove drop flags from structs and enums implementing Drop. 2016-08-24 13:23:37 +03:00
bors 0bd99f9d5c Auto merge of #35656 - Stebalien:fused, r=alexcrichton
Implement 1581 (FusedIterator)

* [ ] Implement on patterns. See https://github.com/rust-lang/rust/issues/27721#issuecomment-239638642.
* [ ] Handle OS Iterators. A bunch of iterators (`Args`, `Env`, etc.) in libstd wrap platform specific iterators. The current ones all appear to be well-behaved but can we assume that future ones will be?
* [ ] Does someone want to audit this? On first glance, all of the iterators on which I implemented `FusedIterator` appear to be well-behaved but there are a *lot* of them so a second pair of eyes would be nice.
* I haven't touched rustc internal iterators (or the internal rand) because rustc doesn't actually call `fuse()`.
* `FusedIterator` can't be implemented on `std::io::{Bytes, Chars}`.

Closes: #35602 (Tracking Issue)
Implements: rust-lang/rfcs#1581
2016-08-23 07:46:52 -07:00
Steven Allen de91872a33 Add a FusedIterator trait.
This trait can be used to avoid the overhead of a fuse wrapper when an iterator
is already well-behaved.

Conforming to: RFC 1581
Closes: #35602
2016-08-18 12:16:29 -04:00
Nick Cameron e6cc4c5d13 Fix links 2016-08-18 15:43:35 +12:00
Nikhil Shagrithaya ea2216cba8 Added an update_panic_count function to handle access to PANIC_COUNT 2016-08-10 22:04:41 +05:30
Andrew Paseltiner a20a1db54a
Implement `RefCell::{try_borrow, try_borrow_mut}` 2016-08-08 23:59:56 -04:00
Tobias Bucher 3d09b4a0d5 Rename `char::escape` to `char::escape_debug` and add tracking issue 2016-07-28 02:20:49 +02:00
Alex Crichton 0c137ab0a6 rustc: Update stage0 to beta-2016-07-06
Hot off the presses, let's update our stage0 compiler!
2016-07-06 09:29:15 -07:00
Sean McArthur db1b1919ba std: use siphash-1-3 for HashMap 2016-06-29 16:08:32 -07:00
Ariel Ben-Yehuda f0174fcbee use the slice_pat hack in libstd too 2016-06-09 00:38:38 +03:00
Alex Crichton fa45670ce4 mk: Prepare for a new stage0 compiler
This commit prepares the source for a new stage0 compiler, the 1.10.0 beta
compiler. These artifacts are hot off the bots and should be ready to go.
2016-05-31 16:11:49 -07:00