about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-07-20move NllLivenessMap and LocalWithRegion to liveness_mapdylan_DPC-71/+93
2018-07-20always get number of live variables from the mapNiko Matsakis-7/+7
2018-07-20tidy fixesdylan_DPC-4/+9
2018-07-19left out one field during mergedylan_DPC-0/+1
2018-07-19convert LocalWithRegion to Localdylan_DPC-10/+13
2018-07-19mir/mod.rs / visit.rs reverted back to using Localdylan_DPC-23/+23
2018-07-19add LocalWithRegion NllLivenessMapdylan_DPC-36/+76
2018-07-19make liveness generic over set of local variablesNiko Matsakis-102/+170
We used to hardcode that we wanted the liveness of *all* variables. This can now be configured by selecting an alternative index type V and providing a (partial) map from locals to that new type V.
2018-07-19generic shuffle continuesdylan_DPC-10/+10
2018-07-19use LiveVariableMap as trait bounddylan_DPC-25/+26
2018-07-19add trait structs and other changes from V to localdylan_DPC-56/+84
2018-07-19add generic parameterdylan_DPC-63/+71
2018-07-19Auto merge of #52197 - euclio:exit-code, r=oli-obkbors-25/+110
overhaul exit codes for rustc and rustdoc This commit changes the exit status of rustc to 1 in the presence of compilation errors. In the event of an unexpected panic (ICE) the standard panic error exit status of 101 remains. A run-make test is added to ensure that the exit code does not regress, and compiletest is updated to check for an exit status of 1 or 101, depending on the mode and suite. This is a breaking change for custom drivers. Note that while changes were made to the rustdoc binary, there is no intended behavior change. rustdoc errors (i.e., failed lints) will still report 101. While this could *also* hide potential ICEs, I will leave that work to a future PR. Fixes #51971.
2018-07-19Auto merge of #52515 - Manishearth:clippyup, r=kennytmbors-8/+5
Update clippy Silences the warnings for now, will fix those over time.
2018-07-18Update clippyManish Goregaokar-8/+5
2018-07-19Auto merge of #52429 - alexcrichton:update-cargo, r=Mark-Simulacrumbors-171/+185
Update Cargo and stdsimd submodules Update Cargo to bring in some bug fixes and such, and update `stdsimd` to... Closes #52403
2018-07-19Auto merge of #52486 - kennytm:rollup, r=kennytmbors-42/+153
Rollup of 13 pull requests Successful merges: - #51628 (use checked write in `LineWriter` example) - #52116 (Handle array manually in str case conversion methods) - #52218 (Amend option.take examples) - #52418 (Do not use desugared ident when suggesting adding a type) - #52439 (Revert some changes from #51917 to fix custom libdir) - #52455 (Fix doc comment: use `?` instead of `.unwrap()`) - #52458 (rustc: Fix a suggestion for the `proc_macro` feature) - #52464 (Allow clippy to be installed with make install) - #52472 (rustc: Enable `use_extern_macros` in 2018 edition) - #52477 (Clarify short-circuiting behvaior of Iterator::zip.) - #52480 (Cleanup #24958) - #52487 (Don't build twice the sanitizers on Linux) - #52510 (rustdoc: remove FIXME about macro redirects) Failed merges: r? @ghost
2018-07-18Update Cargo submoduleAlex Crichton-171/+185
2018-07-18Auto merge of #52431 - semarie:compiler-builtins, r=alexcrichtonbors-0/+0
update compiler-builtins for openbsd import rust-lang-nursery/compiler-builtins/pull/249 in rust main line. it solves an issue on OpenBSD with building of `librsvg`.
2018-07-19Rollup merge of #52510 - QuietMisdreavus:redirects-are-cool, r=nrckennytm-1/+0
rustdoc: remove FIXME about macro redirects Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay. Closes #35705
2018-07-19Rollup merge of #52418 - estebank:desugaring-type, r=nikomatsakiskennytm-3/+57
Do not use desugared ident when suggesting adding a type Re #51116.
2018-07-18remove FIXME about macro redirectsQuietMisdreavus-1/+0
Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay. Closes #35705
2018-07-18update compiler-builtins for openbsdSébastien Marie-0/+0
2018-07-18Update test outputEsteban Küber-1/+1
2018-07-18Change label span to point at iterator instead of iter itemEsteban Küber-13/+19
2018-07-18Do not use desugared ident when suggesting adding a typeEsteban Küber-2/+50
2018-07-19Rollup merge of #52480 - ljedrz:cleanup_24958, r=oli-obkkennytm-3/+0
Cleanup #24958 Since #24958 was closed we might want to remove the workarounds it introduced for android, arm and aarch64.
2018-07-19Rollup merge of #51628 - euclio:line-writer, r=frewsxcvkennytm-10/+23
use checked write in `LineWriter` example The example was wrong because it didn't check the return value of `write()`, and it didn't flush the buffer before comparing the contents of the file. Fixes #51621.
2018-07-19Rollup merge of #52487 - alexcrichton:build-less-sanitizers, r=kennytmkennytm-15/+28
Don't build twice the sanitizers on Linux This commit is an attempted fix at #50887. It was noticed that on that issue we're building both x86_64 and i386 versions of libraries, but we only actually need the x86_64 versions! This hopes that the build race condition exhibited in #50887 is connected to building both architectures and/or building a lot of libraries, so this should help us build precisely what we need and no more.
2018-07-18Auto merge of #52375 - oli-obk:the_early_lint_pass_gets_the_worm, r=Manishearthbors-183/+599
Lint `async` identifiers in 2018 preparation mode r? @Manishearth fixes https://github.com/rust-lang/rust/issues/49716
2018-07-18Don't build twice the sanitizers on LinuxAlex Crichton-15/+28
This commit is an attempted fix at #50887. It was noticed that on that issue we're building both x86_64 and i386 versions of libraries, but we only actually need the x86_64 versions! This hopes that the build race condition exhibited in #50887 is connected to building both architectures and/or building a lot of libraries, so this should help us build precisely what we need and no more.
2018-07-18Rollup merge of #52477 - frewsxcv:frewsxcv-iter-short, r=alexcrichtonkennytm-1/+3
Clarify short-circuiting behvaior of Iterator::zip. Fixes https://github.com/rust-lang/rust/issues/52279.
2018-07-18Rollup merge of #52472 - alexcrichton:macros-edition-2018, r=petrochenkovkennytm-1/+1
rustc: Enable `use_extern_macros` in 2018 edition This was previously enabled via `proc_macro`, but since `proc_macro` is now stable this is no longer the case. Explicitly include it in the 2018 edition here.
2018-07-18Rollup merge of #52464 - o01eg:patch-1, r=alexcrichtonkennytm-0/+2
Allow clippy to be installed with make install After #51122 clippy is available as a component but doesn't install when building from source. This PR allows to install clippy with extended tools.
2018-07-18Rollup merge of #52458 - alexcrichton:fix-suggestion, r=petrochenkovkennytm-1/+1
rustc: Fix a suggestion for the `proc_macro` feature This feature is stable, we shouldn't suggest it any more! Instead suggest the real feature, `use_extern_macros`.
2018-07-18Rollup merge of #52455 - felixrabe:patch-1, r=estebankkennytm-1/+1
Fix doc comment: use `?` instead of `.unwrap()`
2018-07-18Rollup merge of #52439 - o01eg:fix-52317, r=alexcrichtonkennytm-2/+3
Revert some changes from #51917 to fix custom libdir Should fix #52317 also adds `libdir` value to output.
2018-07-18Rollup merge of #52218 - rivertam:patch-1, r=withoutboatskennytm-2/+4
Amend option.take examples It wasn't abundantly clear to me what `.take` returned. Perhaps this is a slightly frivolous change, but I think it's an improvement. =) Apologies if I'm not following proper procedures.
2018-07-18Rollup merge of #52116 - Pazzaz:match-str-case, r=SimonSapinkennytm-2/+30
Handle array manually in str case conversion methods Avoiding the overhead incurred from `String.extend(char.to_lowercase())` showed a notable performance improvement when I benchmarked it. I tested on these strings: ```rust ALL_LOWER: "loremipsumdolorsitametduosensibusmnesarchumabcdefgh" ALL_UPPER: "LOREMIPSUMDOLORSITAMETDUOSENSIBUSMNESARCHUMABCDEFGH" REALISTIC_UPPER: "LOREM IPSUM DOLOR SIT AMET, DUO SENSIBUS MNESARCHUM" SIGMAS: "ΣΣΣΣΣ ΣΣΣΣΣ ΣΣΣΣΣ ΣΣΣ ΣΣΣΣ, ΣΣΣ ΣΣΣΣΣΣΣΣ ΣΣΣΣΣΣΣΣΣΣ" WORD_UPPER: "Lorem Ipsum Dolor Sit Amet, Duo Sensibus Mnesarchum" ``` the performance improvements of `to_lowercase()` were ``` running 10 tests test tests::all_lower ... bench: 1,752 ns/iter (+/- 49) test tests::all_lower_new ... bench: 1,266 ns/iter (+/- 15) -28% test tests::all_upper ... bench: 1,832 ns/iter (+/- 39) test tests::all_upper_new ... bench: 1,337 ns/iter (+/- 18) -27% test tests::realistic_upper ... bench: 1,993 ns/iter (+/- 14) test tests::realistic_upper_new ... bench: 1,445 ns/iter (+/- 22) -27% test tests::sigmas ... bench: 1,342 ns/iter (+/- 39) test tests::sigmas_new ... bench: 1,226 ns/iter (+/- 16) -9% test tests::word_upper ... bench: 1,899 ns/iter (+/- 12) test tests::word_upper_new ... bench: 1,381 ns/iter (+/- 26) -27% ``` and of `to_uppercase()` ``` running 10 tests test tests::all_lower ... bench: 1,813 ns/iter (+/- 20) test tests::all_lower_new ... bench: 1,321 ns/iter (+/- 16) -27% test tests::all_upper ... bench: 1,629 ns/iter (+/- 22) test tests::all_upper_new ... bench: 1,241 ns/iter (+/- 9) -24% test tests::realistic_upper ... bench: 1,670 ns/iter (+/- 24) test tests::realistic_upper_new ... bench: 1,241 ns/iter (+/- 17) -26% test tests::sigmas ... bench: 2,053 ns/iter (+/- 20) test tests::sigmas_new ... bench: 1,753 ns/iter (+/- 23) -15% test tests::word_upper ... bench: 1,873 ns/iter (+/- 30) test tests::word_upper_new ... bench: 1,412 ns/iter (+/- 25) -25% ``` I gave up on the more advanced method from #52061 as it wasn't always a clear improvement and would help in even less cases if this PR was merged.
2018-07-18Remove workarounds for #24958ljedrz-3/+0
2018-07-18Auto merge of #52364 - ljedrz:mir_remove_clone, r=RalfJungbors-10/+11
Remove a clone in mir/transform/add_validation Remove a clone of `mir.local_decls`.
2018-07-18Make `async_idents` allow-by-defaultOliver Schneider-18/+24
2018-07-18Auto merge of #52426 - ljedrz:#28273_cleanup, r=nikomatsakisbors-21/+0
Enable default inlining in platform intrinsics Since [#28273](https://github.com/rust-lang/rust/issues/28273) has been fixed for quite some time, it might be a good idea to return to default inlining in platform intrinsics.
2018-07-18rustc: distinguish compilation failure from ICEAndy Russell-25/+110
This commit changes the exit status of rustc to 1 in the presence of compilation errors. In the event of an unexpected panic (ICE) the standard panic error exit status of 101 remains. A run-make test is added to ensure that the exit code does not regress, and compiletest is updated to check for an exit status of 1 or 101, depending on the mode and suite. This is a breaking change for custom drivers. Fixes #51971.
2018-07-17Clarify short-circuiting behvaior of Iterator::zip.Corey Farwell-1/+3
Fixes https://github.com/rust-lang/rust/issues/52279.
2018-07-18Auto merge of #52353 - alexcrichton:wasm-custom-section, r=eddybbors-328/+147
rustc: Use link_section, not wasm_custom_section This commit transitions definitions of custom sections on the wasm target from the unstable `#[wasm_custom_section]` attribute to the already-stable-for-other-targets `#[link_section]` attribute. Mostly the same restrictions apply as before, except that this now applies only to statics. Closes #51088
2018-07-18Auto merge of #52342 - nnethercote:CanonicalVar, r=nikomatsakisbors-63/+121
Avoid most allocations in `Canonicalizer`. Extra allocations are a significant cost of NLL, and the most common ones come from within `Canonicalizer`. In particular, `canonical_var()` contains this code: indices .entry(kind) .or_insert_with(|| { let cvar1 = variables.push(info); let cvar2 = var_values.push(kind); assert_eq!(cvar1, cvar2); cvar1 }) .clone() `variables` and `var_values` are `Vec`s. `indices` is a `HashMap` used to track what elements have been inserted into `var_values`. If `kind` hasn't been seen before, `indices`, `variables` and `var_values` all get a new element. (The number of elements in each container is always the same.) This results in lots of allocations. In practice, most of the time these containers only end up holding a few elements. This PR changes them to avoid heap allocations in the common case, by changing the `Vec`s to `SmallVec`s and only using `indices` once enough elements are present. (When the number of elements is small, a direct linear search of `var_values` is as good or better than a hashmap lookup.) The changes to `variables` are straightforward and contained within `Canonicalizer`. The changes to `indices` are more complex but also contained within `Canonicalizer`. The changes to `var_values` are more intrusive because they require defining a new type `SmallCanonicalVarValues` -- which is to `CanonicalVarValues` as `SmallVec` is to `Vec -- and passing stack-allocated values of that type in from outside. All this speeds up a number of NLL "check" builds, the best by 2%. r? @nikomatsakis
2018-07-17rustc: Enable `use_extern_macros` in 2018 editionAlex Crichton-1/+1
This was previously enabled via `proc_macro`, but since `proc_macro` is now stable this is no longer the case. Explicitly include it in the 2018 edition here.
2018-07-17Auto merge of #52145 - ExpHP:drop-it-like-its-eof, r=nikomatsakisbors-1/+6
Fix macro parser quadratic complexity in small repeating groups Observed in #51754, and more easily demonstrated with the following: ```rust macro_rules! stress { ($($t:tt)+) => { }; } fn main() { stress!{ a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a // ... 65536 copies of "a" total ... a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a } } ``` which takes 50 seconds to compile prior to the fix and <1s after. I hope this has a visible impact on the compile times for real code. (I think it is most likely to affect incremental TT munchers that deal with large inputs, though it depends on how they are written) For a fuller description of the performance issue: https://github.com/rust-lang/rust/issues/51754#issuecomment-403242159 --- There is no test (yet) because I'm not sure how easily to measure this for regressions.
2018-07-17Make `async_idents` an edition incompat lintOliver Schneider-18/+238