summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2016-12-30Such large. Very 128. Much bits.Simonas Kazlauskas-0/+7
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-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
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-29libstd: define std::env::consts::ARCH for sparc64Jonathan A. Kollasch-0/+6
2016-12-29Rollup merge of #38622 - alexcrichton:read-lengths, r=sfacklerAlex Crichton-12/+24
std: Clamp max read/write sizes on Unix Turns out that even though all these functions take a `size_t` they don't actually work that well with anything larger than the maximum value of `ssize_t`, the return value. Furthermore it looks like OSX rejects any read/write requests larger than `INT_MAX - 1`. Handle all these cases by just clamping the maximum size of a read/write on Unix to a platform-specific value. Closes #38590
2016-12-29Rollup merge of #38491 - GuillaumeGomez:builder_docs, r=frewsxcvAlex Crichton-3/+58
Builder docs r? @frewsxcv
2016-12-28Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]`Andrew Paseltiner-7/+5
CC #34761
2016-12-27Fix arguments on RedoxJeremy Soller-9/+5
2016-12-27Auto merge of #38577 - redox-os:master, r=alexcrichtonbors-2/+3
Add Debug to OpenOptions and DirBuilder This fixes the build on Redox as the platform independent structs now implement Debug.
2016-12-26Auto merge of #38274 - elahn:windows-readconsole-ctrl-z, r=alexcrichtonbors-4/+33
Ctrl-Z returns from Stdin.read() when reading from the console on Windows Fixes #19914. Fixes read(), read_to_string(), read_to_end(), etc. r? @alexcrichton
2016-12-26std: Clamp max read/write sizes on UnixAlex Crichton-12/+24
Turns out that even though all these functions take a `size_t` they don't actually work that well with anything larger than the maximum value of `ssize_t`, the return value. Furthermore it looks like OSX rejects any read/write requests larger than `INT_MAX - 1`. Handle all these cases by just clamping the maximum size of a read/write on Unix to a platform-specific value. Closes #38590
2016-12-26Auto merge of #38536 - retep998:flauschige-kaninchen, r=petrochenkovbors-20/+25
Fix fs tests on Windows systems with non-english locales. Fixes https://github.com/rust-lang/rust/issues/34628 r? @alexcrichton
2016-12-25Impl From<inner> for IpAddr and SocketAddr.Yamakaky-0/+16
Fixes https://github.com/rust-lang/rfcs/issues/1816.
2016-12-24Impl From<Ipv4Addr, Ipv6Addr> for IpAddr.Yamakaky-0/+12
Fixes https://github.com/rust-lang/rfcs/issues/1816.
2016-12-24Auto merge of #38594 - steveklabnik:rollup, r=steveklabnikbors-15/+89
Rollup of 14 pull requests - Successful merges: #37956, #38013, #38297, #38480, #38497, #38502, #38505, #38513, #38521, #38549, #38554, #38557, #38568, #38572 - Failed merges:
2016-12-24Rollup merge of #38572 - GuillaumeGomez:join_handle_docs, r=frewsxcvSteve Klabnik-6/+40
Add JoinHandle missing examples r? @frewsxcv
2016-12-24Rollup merge of #38521 - jxson:remove-magenta-warnings, r=sfacklerSteve Klabnik-1/+0
Removes magenta build warning. Small bug fix to remove an unused type in the magenta process code that causes build failures for magenta's rustc. r? @alexcrichton @tedsta @raphlinus
2016-12-24Rollup merge of #38513 - GuillaumeGomez:thread_fn_docs, r=frewsxcvSteve Klabnik-8/+43
Add missing examples in some thread functions r? @frewsxcv
2016-12-24Rollup merge of #38505 - estebank:why-lines, r=frewsxcvSteve Klabnik-0/+6
Docs: Explain why/when `.lines()` returns an error Fix #37744.
2016-12-24Auto merge of #38443 - frewsxcv:file-docs, r=brsonbors-6/+38
Improve the API examples for `std::fs::File`. Fixes https://github.com/rust-lang/rust/issues/35875.
2016-12-24Auto merge of #38062 - alexcrichton:fix-line-writer, r=brsonbors-13/+86
std: Fix partial writes in LineWriter Previously the `LineWriter` could successfully write some bytes but then fail to report that it has done so. Additionally, an erroneous flush after a successful write was permanently ignored. This commit fixes these two issues by (a) maintaining a `need_flush` flag to indicate whether a flush should be the first operation in `LineWriter::write` and (b) avoiding returning an error once some bytes have been successfully written. Closes #37807
2016-12-24Add JoinHandle missing examplesGuillaume Gomez-6/+40
2016-12-24Add missing doc examples for BuilderGuillaume Gomez-3/+58
2016-12-23Comparison between IpAddr and Ipv[46]Addr.Clar Charr-4/+100
2016-12-23Cloexec when creating directoriesJeremy Soller-1/+1
2016-12-23Add Debug to OpenOptions and DirBuilderJeremy Soller-1/+2
2016-12-23Auto merge of #38401 - redox-os:redox_cross, r=brsonbors-23/+1318
Redox Cross Compilation I will admit - there are things here that I wish I did not have to do. This completes the ability to create a cross compiler from the rust repository for `x86_64-unknown-redox`. I will document this PR with inline comments explaining some things. [View this gist to see how a cross compiler is built](https://gist.github.com/jackpot51/6680ad973986e84d69c79854249f2b7e) Prior discussion of a smaller change is here: https://github.com/rust-lang/rust/pull/38366
2016-12-22Revert rt.rsJeremy Soller-0/+2
2016-12-22Remove start functions, use newlib instead of openlibm + rallocJeremy Soller-162/+0
2016-12-22Fix fs tests on Windows systems with non-english locales.Peter Atashian-20/+25
2016-12-21Add RawFd traits for netJeremy Soller-15/+64
2016-12-21Removes magenta build warning.Jason Campbell-1/+0
Small bug fix to remove an unused type in the magenta process code that causes build failures for magenta's rustc.
2016-12-21Fix 'unhygienically' typo.Corey Farwell-1/+1
2016-12-21Move parenthesized statement within sentence.Corey Farwell-2/+2
2016-12-21Add a more complete doc example for 'include' macro.Corey Farwell-2/+17
2016-12-21Merge branch 'redox_cross' of https://github.com/redox-os/rust into redox_crossJeremy Soller-3/+6
2016-12-21Update liblibc, go back to lazy linking openlibmJeremy Soller-1/+1
2016-12-21Add missing examples in some thread functionsGuillaume Gomez-8/+43
2016-12-20Fix tidyJeremy Soller-3/+6
2016-12-20Docs: Explain why/when `.lines()` returns an errorEsteban Küber-0/+6
2016-12-20Static link openlibmJeremy Soller-1/+1
2016-12-20Fix building without backtraceJeremy Soller-0/+1
2016-12-20Readd statvfsJeremy Soller-0/+26
2016-12-20Move rt into sys::rt, fix tidyJeremy Soller-337/+163
2016-12-20Fix compile errors and suchAlex Crichton-6/+8
2016-12-20Link openlibm only in libstdJeremy Soller-0/+2
2016-12-20Rollup merge of #38451 - semarie:openbsd-rustbuild, r=alexcrichtonAlex Crichton-1/+1
adaptation to rustbuild for openbsd Since the switch to rustbuild, the build for openbsd is broken: - [X] `ar` inference based on compiler name is wrong (OpenBSD usually use `egcc`, but `ear` doesn't exist) - [X] `make` isn't GNU-make under OpenBSD (and others BSD platforms) - [x] `stdc++` isn't the right stdc++ library to link with (it should be `estdc++`) - [x] corrects tests that don't pass anymore (problems related to rustbuild) r? @alexcrichton
2016-12-20Rollup merge of #38346 - GuillaumeGomez:duration_doc, r=frewsxcvAlex Crichton-13/+66
Duration doc r? @frewsxcv
2016-12-20Move start functions into libstd/rtJeremy Soller-7/+5
2016-12-20Rollup merge of #38236 - GuillaumeGomez:unix_socket_doc, r=frewsxcvAlex Crichton-26/+566
Unix socket doc r? @frewsxcv
2016-12-20Rollup merge of #38131 - clarcharr:from_segments, r=alexcrichtonAlex Crichton-1/+27
Add From<[u16; 8]> to Ipv6Addr Not really sure that this requires an RFC, but I figured that I'd offer a pull request and see what people think. It seems like a reasonable addition.