summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2015-08-25handle dtors having generics in an order different from their ADTAriel Ben-Yehuda-76/+92
Fixes #27997.
2015-08-25Correct iterator adaptor ChainUlrik Sverdrup-25/+91
The iterator protocol specifies that the iteration ends with the return value `None` from `.next()` (or `.next_back()`) and it is unspecified what further calls return. The chain adaptor must account for this in its DoubleEndedIterator implementation. It uses three states: - Both `a` and `b` are valid - Only the Front iterator (`a`) is valid - Only the Back iterator (`b`) is valid The fourth state (neither iterator is valid) only occurs after Chain has returned None once, so we don't need to store this state. Fixes #26316
2015-08-25Document the recursion_limit crate attributeMatt Brubeck-1/+5
2015-08-25Omit lifetime intrinsics for function arguments and similar top-level itemsBjörn Steinbrink-3/+6
Function arguments are live for the whole function scope, so adding lifetime intrinsics around them adds no value. The same is true for drop hint allocas and everything else that goes directly through lvalue_scratch_datum. So the easiest fix is to emit lifetime intrinsics only for lvalue datums that are created in to_lvalue_datum_in_scope(). The reduces peak memory usage and LLVM times by about 1-4%, depending on the crate.
2015-08-25Prefer alloc_ty() instead of alloca() where possibleBjörn Steinbrink-20/+9
2015-08-25Add missing lifetime intrinsics in a few placesBjörn Steinbrink-3/+9
2015-08-25Separate lifetime starts from alloca()Björn Steinbrink-24/+28
Combining them seemed like a good idea at the time, but turns out that handling lifetimes separately makes it somewhat easier to handle cases where we don't want the intrinsics, and let's you see more easily where the start/end pairs are.
2015-08-25Turn some alloca_no_lifetime() calls into plain alloca() callsBjörn Steinbrink-4/+2
The issues that the comments referred to were fixed before the PR even landed but we never got around to remove the hack of skipping the lifetime start.
2015-08-25Remove unnecessary temporaries from compare_values()Björn Steinbrink-18/+22
2015-08-25Auto merge of #27995 - nagisa:windows-error-message, r=alexcrichtonbors-3/+2
According to https://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx: > If the function succeeds, the return value is the number of TCHARs stored in the output buffer, > excluding the terminating null character. _**Completely untested**_… since I have no Windows machine or anything of a sort to test this on. r? @aturon
2015-08-25collections doc: remove mention of BitVec, BitSet, VecMapGeorg Brandl-28/+6
These have been removed and should not be documented here.
2015-08-25use the parameter environment when checking dtorsAriel Ben-Yehuda-121/+98
This makes it more uniform. No functional changes.
2015-08-25Do not recalculate string length in error_stringSimonas Kazlauskas-3/+2
According to https://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx: > If the function succeeds, the return value is the number of TCHARs stored in the output buffer, > excluding the terminating null character.
2015-08-25Auto merge of #27994 - steveklabnik:rollup, r=steveklabnikbors-9/+72
- Successful merges: #27905, #27968, #27978, #27982, #27988 - Failed merges:
2015-08-25Rollup merge of #27988 - nagisa:diags-e0139, r=brsonSteve Klabnik-3/+1
Fixes #27946
2015-08-25Rollup merge of #27982 - frewsxcv:patch-25, r=steveklabnikSteve Klabnik-1/+1
2015-08-25Rollup merge of #27978 - mgrabovsky:doc-fix, r=steveklabnikSteve Klabnik-2/+2
2015-08-25Rollup merge of #27968 - adamcrume:master, r=steveklabnikSteve Klabnik-0/+60
2015-08-25Rollup merge of #27905 - tshepang:E0133, r=brsonSteve Klabnik-3/+8
2015-08-25Auto merge of #27986 - chris-morgan:reduce-string-extend-str-implementation, ↵bors-5/+1
r=bluss Reserving lower_bound bytes was just silly. It’d be perfectly reasonable to have empty strings in the iterator, which could cause superfluous reallocation of the string, or to have more than one byte per string, which could cause additional reallocation (in practice it’ll balance out). The added complexity of this logic is simply pointless, adding a little bloat with no demonstrable advantage and slight disadvantage.
2015-08-25Auto merge of #27981 - dotdash:gepi, r=brsonbors-57/+52
2015-08-25Respect `--color` when printing early errorsBarosl Lee-75/+82
Currently, `early_error` and `early_warn` in `librustc::session` always use `ColorConfig::Auto`. Modify them to follow the color configuration set by the `--color` option. As colored output is also printed during the early stage, parsing the `--color` option should be done as early as possible. However, there are still some cases when the output needs to be colored before knowing the exact color settings. In these cases, it will be defaulted to `ColorConfig::Auto`, which is the same as before. Fixes #27879.
2015-08-25Auto merge of #27974 - Diggsey:issue-27952, r=alexcrichtonbors-2/+15
Fixes #27952
2015-08-25Auto merge of #27971 - tbu-:pr_cloexec, r=alexcrichtonbors-1/+25
On Linux the flag is just ignored if it is not supported: https://lwn.net/Articles/588444/ Still needs the values of O_CLOEXEC on the BSDs. Touches #24237.
2015-08-24book: Mention that --ignored is a test binary argumentAdam Crume-0/+3
2015-08-24book: Fix spacing in testing sectionAdam Crume-1/+1
2015-08-25Auto merge of #27966 - GuillaumeGomez:iterator, r=alexcrichtonbors-0/+34
Part of #22709. cc @Veedrac r? @bluss I don't have added tests yet, I'll see how to do it tomorrow.
2015-08-25Auto merge of #27957 - overminder:aug23-i686-android, r=alexcrichtonbors-10/+75
- All the libstd tests are passing in the optimized build against a Zenfone2 and the x86 Android emulator. I haven't tested the other libraries though.
2015-08-25Auto merge of #27945 - Eljay:upgrade-hoedown, r=alexcrichtonbors-36/+61
Some hoedown FFI changes: - `HOEDOWN_EXT_NO_INTRA_EMPHASIS` constant changed. - Updated/tidied up all callback function signatures. - All opaque data access has an additional layer of indirection for some reason (`hoedown_renderer_data`). This also fixes #27862.
2015-08-24Remove #[start] as well as #[main] in --testWilliam Throwe-9/+22
Fixes #11766.
2015-08-24Move main removal to its own pass in --test modeWilliam Throwe-39/+80
This handles the case where the #[main] function is buried deeper in the ast than we search for #[test] functions. I'm not sure why one would want to do that, but since it works in standard compilation it should also work for tests.
2015-08-24Mark main-like functions allow(dead_code) in testsWilliam Throwe-15/+84
Fixes #12327.
2015-08-24Move entry point identification logic to libsyntaxWilliam Throwe-45/+79
Identifying entry points will be useful in --test mode, which is handled in libsyntax.
2015-08-25Fix E0139 codeSimonas Kazlauskas-3/+1
Fixes #27946
2015-08-24Auto merge of #27943 - arielb1:fast-region, r=nikomatsakisbors-664/+664
This increases regionck performance greatly - type-checking on librustc decreased from 9.1s to 8.1s. Because of Amdahl's law, total performance is improved only by about 1.5% (LLVM wizards, this is your opportunity to shine!). before: 576.91user 4.26system 7:42.36elapsed 125%CPU (0avgtext+0avgdata 1142192maxresident)k after: 566.50user 4.84system 7:36.84elapsed 125%CPU (0avgtext+0avgdata 1124304maxresident)k I am somewhat worried really need to find out why we have this Red Queen's Race going on here. Originally I suspected it may be a problem from RFC1214's warnings, but it seems to be an effect from other changes. However, the increase seems to be mostly in LLVM's time, so I guess it's the LLVM wizards' problem. r? @nikomatsakis
2015-08-24Implement read_exact for the Read traitCesar Eduardo Barros-0/+140
This implements the proposed "read_exact" RFC (https://github.com/rust-lang/rfcs/pull/980).
2015-08-25Simplify `String`’s `Extend<&str>` implementationChris Morgan-5/+1
Reserving lower_bound bytes was just silly. It’d be perfectly reasonable to have empty strings in the iterator, which could cause superfluous reallocation of the string, or to have more than one byte per string, which could cause additional reallocation (in practice it’ll balance out). The added complexity of this logic is simply pointless, adding a little bloat with no demonstrable advantage and slight disadvantage.
2015-08-24Use StructGEP instead of GEPi where appropriateBjörn Steinbrink-15/+15
StructGEP seems clearer and probably does an even better job of the micro-optimization that we have in GEPi.
2015-08-24Use get_dataptr() and get_meta() where appropriateBjörn Steinbrink-21/+16
2015-08-24Rename get_len() to get_meta()Björn Steinbrink-21/+21
The functions is useful for all kinds of fat pointers, but get_len() just feels so wrong for trait object fat pointers. Let's use get_meta() because that's rather neutral.
2015-08-24Use correct indefinite article in reference.mdCorey Farwell-1/+1
2015-08-24Add test for LookupHost iterator Send/Sync traitsGuillaume Gomez-0/+31
2015-08-24fix other testAriel Ben-Yehuda-3/+5
2015-08-24Auto merge of #27239 - apasel422:issue-19102, r=huonwbors-1/+27
closes #19102
2015-08-24address nitsAriel Ben-Yehuda-38/+46
2015-08-24Update hoedown to latest version (3.0.4).Eljay-36/+61
2015-08-24Clarify a sentence in the BookMatěj Grabovský-2/+2
2015-08-24Atomically open files with O_CLOEXEC where possibleTobias Bucher-1/+25
On Linux the flag is just ignored if it is not supported: https://lwn.net/Articles/588444/ Touches #24237.
2015-08-24fix testAriel Ben-Yehuda-2/+2
2015-08-24store the CodeExtent directly in FreeRegionAriel Ben-Yehuda-55/+36
this makes the code cleaner