about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-04-13Auto merge of #59515 - wesleywiser:measureme, r=michaelwoeristerbors-464/+186
Use measureme in self profiler r? @michaelwoerister ~Changes are still very rough.~ ~I'm not sure what the right way to add the `measureme` dependency is. Currently it's just added with a relative path which Works On My Machine ™️.~ I'm also not sure what to do with the category data.
2019-04-13Auto merge of #59922 - Centril:rollup-0qmx4jg, r=Centrilbors-631/+1327
Rollup of 8 pull requests Successful merges: - #59781 (Remove check_match from const_eval) - #59820 (proc_macro: stop using LEB128 for RPC.) - #59846 (clarify what the item is in "not a module" error) - #59847 (Error when using `catch` after `try`) - #59859 (Suggest removing `?` to resolve type errors.) - #59862 (Tweak unstable diagnostic output) - #59866 (Recover from missing semicolon based on the found token) - #59892 (Impl RawFd conversion traits for WASI TcpListener, TcpStream and UdpSocket) Failed merges: r? @ghost
2019-04-13Make clear that format padding doesn't work for DebugMartin Pool-3/+4
As mentioned in https://github.com/rust-lang/rust/issues/46006#issuecomment-345260633
2019-04-12Use measureme in self-profilerWesley Wiser-464/+186
Related to #58372 Related to #58967
2019-04-13Exclude some copies of old book editions from search enginesKornel-0/+8
2019-04-12Auto merge of #59924 - Xanewok:subup, r=Xanewokbors-8/+10
Update submodules (Clippy, RLS) Basically https://github.com/rust-lang/rust/pull/59916 with one fix applied to make it build
2019-04-12ci: use a custom android sdk manager with pinning and mirroringPietro Albini-68/+224
2019-04-12Add test and fix dedupEsteban Küber-0/+28
2019-04-12Fix paste error in split_ascii_whitespace docs.Scott Olson-1/+1
2019-04-12Update rlsflip1995-0/+0
2019-04-12Update Clippyflip1995-8/+10
2019-04-12Rollup merge of #59892 - rylev:as-raw-fd, r=alexcrichtonMazdak Farrokhzad-67/+190
Impl RawFd conversion traits for WASI TcpListener, TcpStream and UdpSocket r? @alexcrichton
2019-04-12Rollup merge of #59866 - estebank:recover-missing-semi, r=petrochenkovMazdak Farrokhzad-0/+78
Recover from missing semicolon based on the found token When encountering one of a few keywords when a semicolon was expected, suggest the semicolon and recover: ``` error: expected one of `.`, `;`, `?`, or an operator, found `let` --> $DIR/recover-missing-semi.rs:4:5 | LL | let _: usize = () | - help: missing semicolon here LL | LL | let _ = 3; | ^^^ error[E0308]: mismatched types --> $DIR/recover-missing-semi.rs:2:20 | LL | let _: usize = () | ^^ expected usize, found () | = note: expected type `usize` found type `()` ```
2019-04-12Rollup merge of #59862 - estebank:tweak-unstable-diag, r=petrochenkovMazdak Farrokhzad-459/+857
Tweak unstable diagnostic output
2019-04-12Rollup merge of #59859 - davidtwco:issue-59756, r=cramertjMazdak Farrokhzad-2/+84
Suggest removing `?` to resolve type errors. Fixes #59756.
2019-04-12Rollup merge of #59847 - Kampfkarren:try-block-catch, r=estebankMazdak Farrokhzad-1/+29
Error when using `catch` after `try` Part of https://github.com/rust-lang/rust/issues/31436
2019-04-12Rollup merge of #59846 - euclio:not-a-module, r=davidtwcoMazdak Farrokhzad-51/+70
clarify what the item is in "not a module" error The motivation here was that I was trying to import an associated constant when I thought it was an enum variant, and got confused by this error. Ideally I would like to add a note saying that associated constants, types, and methods cannot be imported, but I'm not sure that the associated items for a `Def` can be checked at resolve time.
2019-04-12Rollup merge of #59820 - eddyb:proc-macro-rpc-opt, r=nnethercoteMazdak Farrokhzad-23/+13
proc_macro: stop using LEB128 for RPC. I'm not sure how much of an improvement this creates, it's pretty tricky to measure.
2019-04-12Rollup merge of #59781 - whitfin:issue-59378, r=oli-obkMazdak Farrokhzad-28/+6
Remove check_match from const_eval This fixes #59378. It seems that the `check_match` may be unnecessary, so this removes it per instructions provided in the issue. I re-ran the tests for `librustc_mir` and everything seemed fine!
2019-04-12Stabilize the `alloc` crate.Simon Sapin-43/+25
This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-12Apply resource-suffix to search-index and source-files scripts as wellGuillaume Gomez-6/+6
2019-04-12Auto merge of #59733 - cramertj:wake-by-ref, r=withoutboatsbors-24/+78
Final (one can only hope) futures_api adjustments Based on https://github.com/rust-lang/rust/pull/59119 -- this change is only the latter two commits. cc https://github.com/rust-lang/rust/issues/59725 r? @withoutboats
2019-04-12Don't generate empty json variablesGuillaume Gomez-19/+34
2019-04-12add the logic for when other_ty is FnDefrchaser53-20/+90
2019-04-12Auto merge of #59651 - tmandry:discr-index, r=eddybbors-59/+77
Add discr_index to multi-variant layouts We remove the assumption that the discriminant is always field 0, in preparations for layouts like generators where this is not (always) going to be the case. Specifically, upvars are going to go before the discriminant. In theory, it's possible to remove _that_ assumption instead and keep the discriminant at field index 0, but one assumption or the other had to go :) There is one place I know of in the debuginfo code where we'll still need to remove assumptions that the discriminant is the _only_ field. I was planning on doing this along with the upcoming generator change, which will also include tests that exercise the code changing in this PR. r? @eddyb cc @oli-obk cc @cramertj
2019-04-12Auto merge of #59910 - Centril:rollup-yjv7b06, r=Centrilbors-208/+294
Rollup of 15 pull requests Successful merges: - #59680 (Document the -Z flag to the rustc book) - #59711 (Add back the substring test) - #59806 (compiletest: Improve no_prefer_dynamic docs) - #59809 (Make trait_methods_not_found use a lock) - #59811 (Kill dead code dominator code.) - #59814 (Fix broken links on std::boxed doc page) - #59821 (improve unknown enum variant errors) - #59831 (Remove strange formatting in `Ordering` docs.) - #59836 (std::ops::Div examples: correct nominator to numerator) - #59857 (SGX target: fix cfg(test) build) - #59876 (Update TRPL to use mdbook 0.2) - #59880 (Remove note about transmute for float bitpatterns.) - #59889 (Update diagnostics.rs) - #59891 (Fix the link to sort_by_cached_key) - #59894 (save-analysis: Pull associated type definition using `qpath_def`) Failed merges: r? @ghost
2019-04-12MaybeUninit: remove deprecated functionsRalf Jung-34/+0
2019-04-12Revert PR #59401 to fix issue #59652 (a stable-to-beta regression).Felix S. Klock II-31/+0
This is result of squashing two revert commits: Revert "compile all crates under test w/ -Zemit-stack-sizes" This reverts commit 7d365cf27f4249fc9b61ba8abfc813abe43f1cb7. Revert "bootstrap: build compiler-builtins with -Z emit-stack-sizes" This reverts commit 8b8488ce8fc047282e7159343f30609417f9fa39.
2019-04-12Rollup merge of #59894 - Xanewok:save-assoc-ty-qpath, r=eddybMazdak Farrokhzad-21/+5
save-analysis: Pull associated type definition using `qpath_def` Closes https://github.com/rust-lang/rls/issues/1390 This (probably?) fixes the case where we run the save-analysis code on the following snippet: ```rust trait Test<'a> { type Thing: Test2; } trait Test2 { fn print(); } #[allow(unused)] fn example<T>(t: T) where T: for<'a> Test<'a> { T::Thing::print(); //~ ERROR cannot extract an associated type from a higher-ranked trait bound in this context // ^ only errors in save-analysis mode } ``` The chain is as follows: - culprit is `hir_ty_to_ty` - which calls `ast_ty_to_ty` in the `ItemCtxt` - which calls `associated_path_to_ty` - which finally fails on `projected_ty_from_poly_trait_ref` https://github.com/rust-lang/rust/blob/3de0106789468b211bcc3a25c09c0cf07119186d/src/librustc_typeck/collect.rs#L212-L224 I'm not exactly sure why `hir_ty_to_ty` fails - is it because it needs more setup from typeck to work correctly? I'm guessing the fix is okay since we just pull the already typeck'd data (we run save-analysis after all the analysis passes are complete) from the tables. With this change we can 'go to def' on all segments in the `T::Thing::print()` path.
2019-04-12Rollup merge of #59889 - andrewbanchich:minor-text-fixes, r=estebankMazdak Farrokhzad-2/+2
Update diagnostics.rs Add `a` and other minor text improvements
2019-04-12Rollup merge of #59880 - solson:transmute-float, r=alexcrichtonMazdak Farrokhzad-10/+0
Remove note about transmute for float bitpatterns. This particular usecase has been safely abstracted in these `std` functions: [f32::to_bits](https://doc.rust-lang.org/std/primitive.f32.html#method.to_bits), [f32::from_bits](https://doc.rust-lang.org/std/primitive.f32.html#method.from_bits), [f64::to_bits](https://doc.rust-lang.org/std/primitive.f64.html#method.to_bits), [f64::from_bits](https://doc.rust-lang.org/std/primitive.f64.html#method.from_bits). So, I think we shouldn't recommend an unnecessary use of `unsafe` here anymore.
2019-04-12Rollup merge of #59876 - integer32llc:update-trpl-to-mdbook-0.2, r=steveklabnikMazdak Farrokhzad-4/+4
Update TRPL to use mdbook 0.2 I ran linkchecker locally and it passed. Let's see if I did it correctly...
2019-04-12Rollup merge of #59857 - jethrogb:jb/sgx-test, r=CentrilMazdak Farrokhzad-3/+3
SGX target: fix cfg(test) build
2019-04-12Rollup merge of #59836 - andersk:nominator, r=CentrilMazdak Farrokhzad-14/+14
std::ops::Div examples: correct nominator to numerator
2019-04-12Rollup merge of #59831 - ehuss:ordering-docs, r=kennytmMazdak Farrokhzad-3/+3
Remove strange formatting in `Ordering` docs. I can't really fathom what the intent of the brackets is. The [original PR](#12956) doesn't give any hints. I think it seems fine without them.
2019-04-12Rollup merge of #59821 - euclio:unknown-enum-variants, r=davidtwcoMazdak Farrokhzad-99/+216
improve unknown enum variant errors Fixes #56517.
2019-04-12Rollup merge of #59814 - ollie27:dead_boxed_links, r=QuietMisdreavusMazdak Farrokhzad-0/+2
Fix broken links on std::boxed doc page r? @QuietMisdreavus
2019-04-12Rollup merge of #59811 - vext01:dead-dominator-code, r=oli-obkMazdak Farrokhzad-47/+0
Kill dead code dominator code. Hi, Whilst fiddling around in the dominator code, I found some (I think) unused code. This code *was* used at the time it was imported, but over time it seems to have become redundant. I've tested a build up to stage 1 with no problems. Maybe the tests will turn up something though. P.S. There is a FIXME comment in `dominators/mod.rs`: ``` pub fn is_dominated_by(&self, node: Node, dom: Node) -> bool { // FIXME -- could be optimized by using post-order-rank self.dominators(node).any(|n| n == dom) } ``` I'm not sure of the intention of this comment. The `Dominators` struct already operates over post-order rank nodes. Any ideas?
2019-04-12Rollup merge of #59809 - Zoxc:trait_methods_not_found, r=estebankMazdak Farrokhzad-2/+2
Make trait_methods_not_found use a lock r? @estebank
2019-04-12Rollup merge of #59806 - phansch:compiletest_docs2, r=oli-obkMazdak Farrokhzad-1/+5
compiletest: Improve no_prefer_dynamic docs This adds some extra docs for the `no-prefer-dynamic` header. And also a `s/must_compile_successfully/compile_pass`. `must_compile_successfully` has been renamed to `compile_pass` at some point in the past and this comment was still referring to the old name.
2019-04-12Rollup merge of #59711 - GuillaumeGomez:substring-test, r=QuietMisdreavusMazdak Farrokhzad-0/+29
Add back the substring test Fixes #58331. r? @QuietMisdreavus
2019-04-12Rollup merge of #59680 - DevQps:document-rustc-z-flag, r=cramertjMazdak Farrokhzad-2/+9
Document the -Z flag to the rustc book # Description Changes: - Added new documentation on the `-Z` flag of rustc in the command-line arguments section of the rustc book. If I need to rephrase anything or if you have any improvements, please let me know! I deliberately did not create an exhaustive list of all options since they are likely to change over time and per toolchain version. closes #41142
2019-04-12Auto merge of #59622 - GuillaumeGomez:improve-one-char-search, r=QuietMisdreavusbors-3/+83
Ensure that exact matches come first in rustdoc search Fixes #59287. cc @scottmcm r? @QuietMisdreavus
2019-04-12Uplift `get_def_path` from Clippyflip1995-6/+28
This uplifts `get_def_path` from Clippy. This is a follow up on the implementation of internal lints: #59316 The internal lint implementation also copied the implementation of the `AbsolutePathPrinter`. To get rid of this code duplication this also uplifts the `get_def_path` function from Clippy. This also renames `match_path` to `match_def_path`, as it was originally named in Clippy.
2019-04-12Add comment that field projectin also works with mutable fieldsChris Gregory-5/+6
2019-04-12Auto merge of #59536 - Zoxc:the-arena, r=eddybbors-25/+288
Introduce an arena type which may be used to allocate a list of types with destructors You can also specify that you want deserializers for `&'tcx [T]` and `&'tcx T` for a type in the list, which will allocate those using the arena. Based on https://github.com/rust-lang/rust/pull/59517 and https://github.com/rust-lang/rust/pull/59533. Look at the last commit for the interesting changes. An alternative to https://github.com/rust-lang/rust/pull/56448. cc @michaelwoerister @eddyb r? @oli-obk
2019-04-12Re-export core::str::{EscapeDebug, EscapeDefault, EscapeUnicode} in stdLzu Tao-0/+2
2019-04-11Make BufWriter use get_mut instead of manipulating inner in Write implementationChris Gregory-2/+2
get_mut allows us to abstract over the implementation detail of inner being optional.
2019-04-11Continue evaluating after missing mainEsteban Küber-3/+55
2019-04-12Auto merge of #59886 - mati865:musl_toolchain, r=alexcrichtonbors-3/+5
musl: do not compress debug section This should be beta nominated. Fixes https://github.com/rust-lang/rust/issues/59411 (this time for real). Test with `DEPLOY=1 ./src/ci/docker/run.sh dist-x86_64-musl`, without `DEPLOY=1` libs are built without debuginfo. r? @alexcrichton