summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2015-06-19Don't link to specific versions of rust in the book.Steven Allen-8/+6
They're forever doomed to be out-of-date. Also, don't assume the user is installing a particular version.
2015-06-19std: Add FromRaw{Fd,Handle,Socket} to os preludesAlex Crichton-1/+3
These were just left out by mistake!
2015-06-18Remove superfluous variableSimonas Kazlauskas-2/+0
2015-06-18Add a test for issue 26322Simonas Kazlauskas-0/+36
2015-06-18Fix file!(), line!() and column!() macrosSimonas Kazlauskas-72/+72
These used to return wrong results in case they were expanded inside compiler’s iternal syntax sugar (closures, if-let) expansions Fixes #26322
2015-06-17Clear cached landing pads before generating a call.Eli Friedman-0/+47
Using the wrong landing pad has obvious bad effects, like dropping a value twice. Testcase written by Alex Crichton. Fixes #25089.
2015-06-17std: Add an option to disable ELF based TLSAlex Crichton-5/+59
This commit adds a ./configure option called `--disable-elf-tls` which disables ELF based TLS (that which is communicated to LLVM) on platforms which already support it. OSX 10.6 does not support this form of TLS, and some users of Rust need to target 10.6 and are unable to do so due to the usage of TLS. The standard library will continue to use ELF based TLS on OSX by default (as the officially supported platform is 10.7+), but this adds an option to compile the standard library in a way that is compatible with 10.6. Conflicts: src/libstd/thread/local.rs
2015-06-17std: Stabilize a number of new fs featuresAlex Crichton-256/+626
This commit stabilizes the following APIs, slating them all to be cherry-picked into the 1.1 release. * fs::FileType (and transitively the derived trait implementations) * fs::Metadata::file_type * fs::FileType::is_dir * fs::FileType::is_file * fs::FileType::is_symlink * fs::DirEntry::metadata * fs::DirEntry::file_type * fs::DirEntry::file_name * fs::set_permissions * fs::symlink_metadata * os::raw::{self, *} * os::{android, bitrig, linux, ...}::raw::{self, *} * os::{android, bitrig, linux, ...}::fs::MetadataExt * os::{android, bitrig, linux, ...}::fs::MetadataExt::as_raw_stat * os::unix::fs::PermissionsExt * os::unix::fs::PermissionsExt::mode * os::unix::fs::PermissionsExt::set_mode * os::unix::fs::PermissionsExt::from_mode * os::unix::fs::OpenOptionsExt * os::unix::fs::OpenOptionsExt::mode * os::unix::fs::DirEntryExt * os::unix::fs::DirEntryExt::ino * os::windows::fs::MetadataExt * os::windows::fs::MetadataExt::file_attributes * os::windows::fs::MetadataExt::creation_time * os::windows::fs::MetadataExt::last_access_time * os::windows::fs::MetadataExt::last_write_time * os::windows::fs::MetadataExt::file_size The `os::unix::fs::Metadata` structure was also removed entirely, moving all of its associated methods into the `os::unix::fs::MetadataExt` trait instead. The methods are all marked as `#[stable]` still. As some minor cleanup, some deprecated and unstable fs apis were also removed: * File::path * Metadata::accessed * Metadata::modified Features that were explicitly left unstable include: * fs::WalkDir - the semantics of this were not considered in the recent fs expansion RFC. * fs::DirBuilder - it's still not 100% clear if the naming is right here and if the set of functionality exposed is appropriate. * fs::canonicalize - the implementation on Windows here is specifically in question as it always returns a verbatim path. Additionally the Unix implementation is susceptible to buffer overflows on long paths unfortunately. * fs::PathExt - as this is just a convenience trait, it is not stabilized at this time. * fs::set_file_times - this funciton is still waiting on a time abstraction. Conflicts: src/libstd/os/android/raw.rs
2015-06-17Implement Borrow<T> and BorrowMut<T> for Box<T: ?Sized>Ulrik Sverdrup-1/+38
Conflicts: src/libcollections/borrow.rs
2015-06-09Remove build date from the output of --versionJohannes Oertel-5/+0
Closes #25812.
2015-06-09properly null out ptr in LinkedList::split_off - fixes #26020Alexis Beingessner-0/+26
2015-06-09collections: Make BinaryHeap panic safe in sift_up / sift_downUlrik Sverdrup-25/+196
Use a struct called Hole that keeps track of an invalid location in the vector and fills the hole on drop. I include a run-pass test that the current BinaryHeap fails, and the new one passes. Fixes #25842
2015-06-09std: Reexport std::net::tcp::IncomingAlex Crichton-1/+1
This iterator was mistakenly not reexported at the top level, preventing actually naming the type! Closes #25519
2015-06-09std: Fix missing stability on iter::ClonedAlex Crichton-1/+1
The method was stabilized but the structure was forgotten to be stabilized. Closes #25480
2015-06-09std: Make abs() panic on overflow in debug modeAlex Crichton-3/+33
Debug overflow checks for arithmetic negation landed in #24500, at which time the `abs` method on signed integers was changed to using `wrapping_neg` to ensure that the function never panicked. This implied that `abs` of `INT_MIN` would return `INT_MIN`, another negative value. When this change was back-ported to beta, however, in #24708, the `wrapping_neg` function had not yet been backported, so the implementation was changed in #24785 to `!self + 1`. This change had the unintended side effect of enabling debug overflow checks for the `abs` function. Consequently, the current state of affairs is that the beta branch checks for overflow in debug mode for `abs` and the nightly branch does not. This commit alters the behavior of nightly to have `abs` always check for overflow in debug mode. This change is more consistent with the way the standard library treats overflow as well, and it is also not a breaking change as it's what the beta branch currently does (albeit if by accident). cc #25378
2015-05-29Fix windows recvfrom definitionSteven Fackler-2/+1
(cherry picked from commit 494901a8b46c699b530e7209114bde44b1de4451)
2015-05-16Make a test compatible with the beta channelBrian Anderson-2/+0
2015-05-15Auto merge of #25059 - erickt:pprint, r=acrichtobors-16/+55
The recent quote changes unfortunately broke unquoting statements like `let foo = 5` because the parser requires their to be a trailing semicolon in those statements. Along the way I added support for unquoting generics and where clauses as well as better pretty printing of `token::Interpolated`.
2015-05-15syntax: Unquoting some statements requires trailing semicolonsErick Tryzelaar-3/+17
2015-05-15syntax: Add unquoting ast::{Generics,WhereClause}Erick Tryzelaar-13/+38
2015-05-15syntax: Allow pretty printing more interpolated itemsErick Tryzelaar-13/+13
2015-05-15Auto merge of #25402 - parir:master, r=Manishearthbors-7/+7
r? @steveklabnik
2015-05-15Auto merge of #25423 - dotdash:assume, r=huonwbors-16/+16
The assume intrinsic has a strong, negative impact on compile times, so we're currently only using it in places where LLVM can simplify it to nonnull metadata on a load intruction. Unfortunately a recent change that fixed invalid assume calls introduce new assume calls for which this simplification can not happen, leading to a massive regression in compile times in certain cases. Moving the assumptions from the middle of the function to the beginning allows the simplification to happen again, bringing compile times back to their old levels. Fixes #25393
2015-05-15Auto merge of #25400 - nrc:save-api, r=huonwbors-1510/+1756
Also start factoring out an API for compiler tools to use and fix a bug that was preventing DXR indexing Rust properly. r? @huonw
2015-05-155 != 4parir-1/+1
Closes #25430
2015-05-15commentsNick Cameron-6/+20
2015-05-15Auto merge of #25422 - cactorium:unsafe_errors, r=huonwbors-4/+70
For https://github.com/rust-lang/rust/issues/24407
2015-05-15Add backticks around language keywordKelvin Ly-1/+1
2015-05-15Auto merge of #25419 - nrc:time, r=alexcrichtonbors-4/+9
r? @alexcrichton
2015-05-15Auto merge of #25421 - steveklabnik:rollup, r=steveklabnikbors-15/+19
- Successful merges: #25404, #25405, #25407, #25408, #25410, #25412, #25413, #25414, #25418, #25420 - Failed merges:
2015-05-15Fix major compile time regressionBjörn Steinbrink-16/+16
The assume intrinsic has a strong, negative impact on compile times, so we're currently only using it in places where LLVM can simplify it to nonnull metadata on a load intruction. Unfortunately a recent change that fixed invalid assume calls introduce new assume calls for which this simplification can not happen, leading to a massive regression in compile times in certain cases. Moving the assumptions from the middle of the function to the beginning allows the simplification to happen again, bringing compile times back to their old levels. Fixes #25393
2015-05-14Fix merge conflict and also add markdown formattingKelvin Ly-911/+1274
2015-05-14Rollup merge of #25420 - habnabit:master, r=steveklabnikSteve Klabnik-3/+0
It seems to refer to something that used to exist, but got moved, and then not everything got cleaned up.
2015-05-14Rollup merge of #25418 - leunggamciu:patch-trpl, r=steveklabnikSteve Klabnik-0/+3
2015-05-14Rollup merge of #25414 - apasel422:patch-1, r=alexcrichtonSteve Klabnik-1/+1
2015-05-14Rollup merge of #25413 - killercup:patch-11, r=alexcrichtonSteve Klabnik-2/+2
r? @steveklabnik
2015-05-14Rollup merge of #25412 - koute:master, r=alexcrichtonSteve Klabnik-0/+1
Every time I profile my code I find something new to add #[inline] to. (:
2015-05-14Rollup merge of #25410 - durka:patch-2, r=steveklabnikSteve Klabnik-1/+4
2015-05-14Rollup merge of #25408 - Nashenas88:rust-book-stack-and-heap-typo, ↵Steve Klabnik-3/+3
r=steveklabnik I fixed the typo of the value of e in the memory tables. It is a reference to d, and so it should contain the memory location of d. I also fixed the incorrectly formatted tables so they display properly in html pages.
2015-05-14Rollup merge of #25407 - durka:patch-1, r=alexcrichtonSteve Klabnik-3/+3
2015-05-14Rollup merge of #25405 - dreid:patch-3, r=nikomatsakisSteve Klabnik-1/+1
2015-05-14Rollup merge of #25404 - dnaeon:doc-fixes, r=steveklabnikSteve Klabnik-1/+1
This PR fixes a comment in the `while Loops` section of the Rust book with the correct type of a variable binding.
2015-05-14Fix error codes E0197-E0200Kelvin Ly-4/+62
2015-05-15Auto merge of #25399 - kballard:crate-attributes-cfg_attr, r=alexcrichtonbors-11/+42
Stripping unconfigured items prior to collecting crate metadata means we can say things like `#![cfg_attr(foo, crate_type="lib")]`. Fixes #25347.
2015-05-14Remove an almost-duplicated sentence.Aaron Gallagher-3/+0
It seems to refer to something that used to exist, but got moved, and then not everything got cleaned up.
2015-05-15Don't use <Duration as Display>::display() in time passesNick Cameron-4/+9
2015-05-15trpl: Fix missing internal linksleunggamciu-0/+3
2015-05-14Auto merge of #25403 - Manishearth:rollup, r=Manishearthbors-42/+229
- Successful merges: #25354, #25381, #25391, #25395, #25397, #25398, #25401 - Failed merges:
2015-05-14s/Iterater/Iterator/Andrew Paseltiner-1/+1
2015-05-14TRPL: Fix Internal LinkPascal Hertleif-2/+2