about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-07-12Rollup merge of #62623 - ↵Mazdak Farrokhzad-14/+99
pnkfelix:issue-62614-downgrade-indirect-structural-match-lint-to-allow, r=zackmdavis downgrade indirect_structural_match lint to allow This is a short-term band-aid for the regression aspect of #62614.
2019-07-12Rollup merge of #62608 - delan:async-unsafe-fn-tests, r=CentrilMazdak Farrokhzad-2/+118
`async unsafe fn` tests - cc #62121 r? @Centril
2019-07-12Rollup merge of #62607 - estebank:this-mem-is-out-of-control, r=petrochenkovMazdak Farrokhzad-2/+16
Correctly break out of recovery loop Fix #61858.
2019-07-12Rollup merge of #62605 - estebank:emit-dropped-err, r=pnkfelixMazdak Farrokhzad-12/+16
Emit dropped unemitted errors to aid in ICE debugging
2019-07-12Rollup merge of #62599 - RalfJung:uninit, r=cramertjMazdak Farrokhzad-1/+1
move mem::uninitialized deprecation back by 1 release, to 1.39 As per discussion at https://github.com/rust-lang/rust/issues/53491#issuecomment-509271182. Three releases also agrees with the precedent from `trim_left/right`. Three releases means that even nightly users (including rustc itself) get a full cycle from when the announcement is made in the stable release to when nightly starts to warn.
2019-07-12Rollup merge of #62595 - ngoldbaum:path-clarity-doc, r=CentrilMazdak Farrokhzad-1/+5
Document that the crate keyword refers to the project root :wave: this is my first rust contribution so I hope I'm doing everything correctly. Help very much appreciated if I'm not. As far as I can tell this use of `crate` is only documented [in the edition guide for rust 2018](https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html#the-crate-keyword-refers-to-the-current-crate). However it should probably be in the documentation for the `crate` keyword itself. This adds that documentation.
2019-07-12Rollup merge of #62578 - JohnTitor:add-test-for-49919, r=alexcrichtonMazdak Farrokhzad-0/+16
Add test for #49919 Closes #49919
2019-07-12Rollup merge of #62568 - lzutao:replace_may_dangle, r=matthewjasperMazdak Farrokhzad-150/+32
Replace unsafe_destructor_blind_to_params with may_dangle This PR will completely remove support for `#[unsafe_destructor_blind_to_params]` attribute, which is deprecated in #38970 by `[may_dangle]` unsafe attribute. Closes #34761
2019-07-12Rollup merge of #62453 - zackmdavis:single_path, r=estebankMazdak Farrokhzad-26/+99
in which we suggest anonymizing single-use lifetimes in paths Following @nikomatsakis's [October 2017 comment](https://github.com/rust-lang/rust/issues/44752#issuecomment-340885834). ![path_anon_suggest](https://user-images.githubusercontent.com/1076988/60761598-e2619180-a000-11e9-9144-1bdf8eb848e3.png) r? @estebank cc @eddyb (you were saying something about running single-use-lifetimes against the tree the other week?)
2019-07-12Rollup merge of #62431 - czipperz:add-messages-to-must-use-is_-methods, ↵Mazdak Farrokhzad-4/+5
r=scottmcm Add messages to `Option`'s and `Result`'s `must_use` annotation for `is_*` r? @RalfJung
2019-07-12Rollup merge of #62274 - eddyb:const-false-unwind, r=pnkfelixMazdak Farrokhzad-28/+58
rustc_mir: follow FalseUnwind's real_target edge in qualify_consts. As far as I can tell, this was accidentally omitted from #47802. Fixes #62272. r? @matthewjasper or @nikomatsakis
2019-07-12Rollup merge of #61535 - ↵Mazdak Farrokhzad-0/+36
ohadravid:test-generic-with-default-assiociated-type-re-rebalance-coherence, r=nikomatsakis Coherence test when a generic type param has a default value from an associated type A followup on #61400. Before `re_rebalance_coherence`, this fails to compile (even though it should be accepted). `re_rebalance_coherence` had no direct test for this, and I wanted to (a) make sure it doesn't regress in the future and (b) get it on record that this is actually the intended behavior.
2019-07-12add test caseEsteban Küber-0/+13
2019-07-12Change `indirect_structural_match` lint to allow-by-default.Felix S. Klock II-1/+62
This is a way to address the regression aspect of rust-lang/rust#62614 in the short term without actually fixing the bug. (My thinking is that the bug that this lint detects has gone undetected for this long, it can wait a bit longer until I or someone else has a chance to put in a proper fix that accounts for rust-lang/rust#62614.)
2019-07-12Turn `indirect_structural_match` lint on explicitly in ui tests.Felix S. Klock II-13/+37
2019-07-12Auto merge of #61462 - GuillaumeGomez:fix-local-storage, r=Manishearthbors-3/+1
[rustdoc] Fix storage usage when disabled Fixes #61239. @starblue: Can you give a try to this change please? I tried on chrome and firefox and both worked so if you're using another web browser, that might be useful. :) r? @Manishearth
2019-07-12Auto merge of #62549 - ehuss:update-cargo-vendor, r=alexcrichtonbors-46/+43
Update cargo-vendor usage This contains a variety of updates to clean up the usage of cargo-vendor. - Remove the install step for the old cargo-vendor now that it is built-in to cargo and available in the stage0 install. - Update installation instructions, dealing with vendoring. The current instructions of running `sudo ./x.py install` is broken, it will almost always fail (since the vendor directory doesn't exist). Since the steps for properly handling this are numerous, I'm recommending removing the suggestion to use `sudo` altogether. - If the sudo-forced-vendoring detects that the vendor directory is not available, abort with instructions on how to fix. - Now that cargo-vendor is built-in, automatically run it if it looks like it is needed. - Update instructions on how to install cargo. - Remove the unused markdown link references in README/CONTRIBUTING. This reverts most of #44935. These references don't do anything if they are unused. Closes #49269 cc #61142 #48771 #40108
2019-07-12test `unsafe fn` and `async unsafe fn` calls in `unsafe { async || }`Delan Azabani-2/+25
2019-07-12Auto merge of #61590 - matthewjasper:remove-borrowck-mir-dependency, r=pnkfelixbors-2647/+831
Remove rustc_mir dependency from rustc_borrowck Also renames `rustc_borrowck` to `rustc_ast_borrowck` and removes all error reporting from it. cc #59193
2019-07-12remove redundant async_closure test in async-await.rsDelan Azabani-7/+1
2019-07-12test E0133 when calling free/impl `async unsafe fn` in `async fn`Delan Azabani-1/+22
2019-07-12remove unused #![feature(async_closure)]Delan Azabani-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-12test `unsafe fn` and `async unsafe fn` calls in `async` in `unsafe`Delan Azabani-0/+26
2019-07-12test E0133 when calling free/impl `async unsafe fn` in safe codeDelan Azabani-0/+35
2019-07-12align async-await.rs and await-macro.rs with one anotherDelan Azabani-3/+20
2019-07-11Correctly break out of recovery loopEsteban Küber-2/+3
2019-07-11Emit dropped unemitted errors to aid in ICE debuggingEsteban Küber-12/+16
2019-07-11move mem::uninitialized deprecation back by 1 release, to 1.39Ralf Jung-1/+1
2019-07-11Remove feature gate `dropck_parametricity` completelyLzu Tao-125/+17
Therefore we also remove `#[unsafe_destructor_blind_to_params]` attribute completly.
2019-07-11document that crate refers to the project rootNathan Goldbaum-1/+5
2019-07-11Replace unsafe_destructor_blind_to_params with may_dangleLzu Tao-31/+21
2019-07-11Move rustc_borrowck -> rustc_ast_borrowckMatthew Jasper-3/+3
2019-07-11Remove rustc_mir dependency from rustc_borrowckMatthew Jasper-2045/+229
2019-07-12Update miriYuki Okushi-9/+7
2019-07-11Auto merge of #62503 - pnkfelix:dont-recur-infiitely-from-print-def-path, ↵bors-1/+41
r=eddyb Dont recur infinitely from print_def_path Fix #61711
2019-07-11Address review commentsVadim Petrochenkov-9/+10
2019-07-11rustc_mir: follow FalseUnwind's real_target edge in qualify_consts.Eduard-Mihai Burtescu-28/+58
2019-07-11pretty-print: Merge `print_tts` and `print_tts_ext`Vadim Petrochenkov-10/+6
2019-07-11pretty-print: Do not lose the `$crate` printing flag in `print_tt`Vadim Petrochenkov-11/+29
2019-07-11Rollup merge of #62557 - taiki-e:typo, r=CentrilMazdak Farrokhzad-1/+2
Fix typo in libcore/intrinsics.rs
2019-07-11Rollup merge of #62519 - pnkfelix:add-test-for-30786, r=pnkfelixMazdak Farrokhzad-0/+140
Regression test for HRTB bug (issue 30786). Close #30786.
2019-07-11Rollup merge of #62476 - petrochenkov:expref, r=matthewjasperMazdak Farrokhzad-1034/+1116
Continue refactoring macro expansion and resolution This PR continues the work started in https://github.com/rust-lang/rust/pull/62042. It contains a set of more or less related refactorings with the general goal of making things simpler and more orthogonal. Along the way most of the issues uncovered in https://github.com/rust-lang/rust/pull/62086 are fixed. The PR is better read in per-commit fashion with whitespace changes ignored. I tried to leave some more detailed commit messages describing the motivation behind the individual changes. Fixes https://github.com/rust-lang/rust/issues/44692 Fixes https://github.com/rust-lang/rust/issues/52363 Unblocks https://github.com/rust-lang/rust/pull/62086 r? @matthewjasper
2019-07-11Rollup merge of #62425 - cyphar:linux-cloexec-use-fcntl, r=alexcrichtonMazdak Farrokhzad-0/+2
filedesc: don't use ioctl(FIOCLEX) on Linux All `ioctl(2)`s will fail on `O_PATH` file descriptors on Linux (because they use `&empty_fops` as a security measure against `O_PATH` descriptors affecting the backing file). As a result, `File::try_clone()` and various other methods would always fail with `-EBADF` on `O_PATH` file descriptors. The solution is to simply use `F_SETFD` (as is used on other unices) which works on `O_PATH` descriptors because it operates through the `fnctl(2)` layer and not through `ioctl(2)`s. Since this code is usually only used in strange error paths (a broken or ancient kernel), the extra overhead of one syscall shouldn't cause any dramas. Most other systems programming languages also use the fnctl(2) so this brings us in line with them. Fixes: rust-lang/rust#62314 Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2019-07-11Rollup merge of #62270 - agnxy:move-async-test, r=Centril,tmandryMazdak Farrokhzad-66/+10
Move async-await tests from run-pass to ui fix #62236 r? @Centril
2019-07-11Rollup merge of #61923 - Zoxc:dep-stream-prefix-2, r=pnkfelixMazdak Farrokhzad-35/+51
Prerequisites from dep graph refactoring #2 Split out from https://github.com/rust-lang/rust/pull/60035 and overlaps with https://github.com/rust-lang/rust/pull/60559.
2019-07-11Rollup merge of #61665 - aschampion:slice-eq-ptr, r=sfacklerMazdak Farrokhzad-6/+17
core: check for pointer equality when comparing Eq slices Because `Eq` types must be reflexively equal, an equal-length slice to the same memory location must be equal. This is related to #33892 (and #32699) answering this comment from that PR: > Great! One more easy question: why does this optimization not apply in the non-BytewiseEquality implementation directly above? Because slices of non-reflexively equal types (like `f64`) are not equal even if it's the same slice. But if the types are `Eq`, we can use this same-address optimization, which this PR implements. Obviously this changes behavior if types violate the reflexivity condition of `Eq`, because their impls of `PartialEq` will no longer be called per-item, but 🤷‍♂ . It's not clear how often this optimization comes up in the real world outside of the same-`&str` case covered by #33892, so **I'm requesting a perf run** (on MacOS today, so can't run `rustc_perf` myself). I'm going ahead and making the PR on the basis of being surprised things didn't already work this way. This is my first time hacking rust itself, so as a perf sanity check I ran `./x.py bench --stage 0 src/lib{std,alloc}`, but the differences were noisy. To make the existing specialization for `BytewiseEquality` explicit, it's now a supertrait of `Eq + Copy`. `Eq` should be sufficient, but `Copy` was included for clarity.
2019-07-11Add test for #49919Yuki Okushi-0/+16
2019-07-11Refactor diagnostic emission for green nodesJohn Kåre Alsaker-35/+51
2019-07-10Auto merge of #62561 - Centril:rollup-5pxj3bo, r=Centrilbors-521/+505
Rollup of 5 pull requests Successful merges: - #62275 (rustc_mir: treat DropAndReplace as Drop + Assign in qualify_consts.) - #62465 (Sometimes generate storage statements for temporaries with type `!`) - #62481 (Use `fold` in `Iterator::last` default implementation) - #62493 (#62357: doc(ptr): add example for {read,write}_unaligned) - #62532 (Some more cleanups to syntax::print) Failed merges: r? @ghost
2019-07-11Add a regression test for #44692Vadim Petrochenkov-1/+128
Add a test for the issue resolved by removing `resolve_macro_path` Add a test making sure that extern prelude entries introduced from an opaque macro are not visible anywhere, even it that macro Fix test output after rebase