about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2019-04-20Auto merge of #59826 - llogiq:multi-dbg, r=SimonSapinbors-1/+44
allow multiple args to `dbg!(..)` This closes #59763
2019-04-20Auto merge of #59700 - matklad:simplify, r=eddybbors-17/+5
Simplify doc comment lexing is_doc_comment function checks the first four chars, but this is redundant, `doc_comment` local var has the same info.
2019-04-20Deny rust_2018_idioms in libcore testsPhilipp Hansch-38/+38
2019-04-20improve docsRalf Jung-2/+2
2019-04-20Auto merge of #59987 - saleemjaffer:refactor_adjust_castkinds, r=oli-obkbors-219/+161
Refactor Adjust and CastKind fixes rust-lang#59588
2019-04-20Deny rust_2018_idioms in liballoc testsPhilipp Hansch-14/+15
2019-04-20Auto merge of #59564 - bjorn3:move_link_to_cg_ssa, r=eddybbors-1599/+1620
Move back::link and debuginfo::type_names to cg ssa r? @eddyb
2019-04-20Deny rust_2018_idioms globallyPhilipp Hansch-0/+1
2019-04-20Tidybjorn3-2/+15
2019-04-20Move cg_llvm/debuginfo/type_names.rs to cg_ssabjorn3-45/+41
2019-04-20Remove cg_llvm/back/link.rsbjorn3-29/+12
2019-04-20Move almost all of cg_llvm/back/link.rs to cg_ssabjorn3-1111/+1115
2019-04-20Remove get_reloc_model and target_cpu dependency from most of link.rsbjorn3-15/+19
2019-04-20Make link functions generic over archive builderbjorn3-84/+101
2019-04-20Move some filename constants to cg_ssabjorn3-12/+9
2019-04-20Move some function from cg_llvm/back/link.rs to cg_ssa/back/link.rsbjorn3-375/+382
2019-04-20Fix fn front matter parsing ICE from invalid code.David Wood-1/+55
This commit fixes an "unreachable code" ICE that results from parsing invalid code where the compiler is expecting the next trait item declaration in the middle of the previous trait item due to extra closing braces.
2019-04-20Auto merge of #60128 - jimblandy:futures-doc-fix, r=withoutboatsbors-14/+14
Doc fixes for core::future::Future. Fixed outdated reference to `waker` argument; now futures are passed a `Context`, from which one can obtain a `waker`. Cleaned up explanation of what happens when you call `poll` on a completed future. It doesn't make sense to say that `poll` implementations can't cause memory unsafety; no safe function is ever allowed to cause memory unsafety, so why mention it here? It seems like the intent is to say that the `Future` trait doesn't say what the consequences of excess polls will be, and they might be bad; but that the usual constraints that Rust imposes on any non-`unsafe` function still apply. It's also oddly specific to say 'memory corruption' instead of just 'undefined behavior'; UB is a bit jargony, so the text should provide examples.
2019-04-19core::future::Future: Fix markup typo in docs.Jim Blandy-1/+1
2019-04-19Doc fixes for core::future::Future.Jim Blandy-13/+13
Fixed outdated reference to `waker` argument; now futures are passed a `Context`, from which one can obtain a `waker`. Cleaned up explanation of what happens when you call `poll` on a completed future. It doesn't make sense to say that `poll` implementations can't cause memory unsafety; no safe function is ever allowed to cause memory unsafety, so why mention it here? It seems like the intent is to say that the `Future` trait doesn't say what the consequences of excess polls will be, and they might be bad; but that the usual constraints that Rust imposes on any non-`unsafe` function still apply. It's also oddly specific to say 'memory corruption' instead of just 'undefined behavior'; UB is a bit jargony, so the text should provide examples.
2019-04-20Auto merge of #60120 - matthiaskrgr:submodule_upd, r=sanxiynbors-14/+12
submodules: update clippy from fbb3a47b to cafbe7f2 Changes: ```` Update compiletest_rs Typo Fix dogfood error Add lint PathBufPushOverwrite Update *.stderr file Remove code duplication Format code Add test for debug_assert!(false) Don't lint debug_assert!(false) Add run-rustfix for option_map_or_none lint Move two cast_lossless tests to their correct files Change naive_bytecount applicability MaybeIncorrect Add tests for declare_lint_pass and impl_lint_pass Use lint pass macros Document `declare_lint_pass!` Fix lint_without_lint_pass internal lint Use {get,match}_def_path from LateContext Remove uplifted functions {get,match}_def_path from Clippy Add run-rustfix for len_zero lint Add run-rustfix for bool_comparison lint Add run-rustfix for deref_addrof lint while_let_loop uses placeholders in suggestions Remove rust-toolchain file from clippy_dev Update adding_lints.md Update PULL_REQUEST_TEMPLATE Add new lint checklist Create PULL_REQUEST_TEMPLATE Only suggest .copied() for Option right now Also suggest .copied() when .clone() is called on a Copy type Suggest .copied() instead of .cloned() in map_clone when dealing with references Deny rustc internal lints Remove clippy::default_hash_types internal lint Enable -Zunstable-options in .cargo/config ```` r? @oli-obk
2019-04-19Auto merge of #59981 - estebank:recover-struct-lit, r=petrochenkovbors-282/+341
Emit specific error for struct literal in conditions Fix #59962, fix #51311.
2019-04-19extend ui testAndre Bogus-1/+34
2019-04-19submodules: update clippy from fbb3a47b to cafbe7f2Matthias Krüger-14/+12
Changes: ```` Update compiletest_rs Typo Fix dogfood error Add lint PathBufPushOverwrite Update *.stderr file Remove code duplication Format code Add test for debug_assert!(false) Don't lint debug_assert!(false) Add run-rustfix for option_map_or_none lint Move two cast_lossless tests to their correct files Change naive_bytecount applicability MaybeIncorrect Add tests for declare_lint_pass and impl_lint_pass Use lint pass macros Document `declare_lint_pass!` Fix lint_without_lint_pass internal lint Use {get,match}_def_path from LateContext Remove uplifted functions {get,match}_def_path from Clippy Add run-rustfix for len_zero lint Add run-rustfix for bool_comparison lint Add run-rustfix for deref_addrof lint while_let_loop uses placeholders in suggestions Remove rust-toolchain file from clippy_dev Update adding_lints.md Update PULL_REQUEST_TEMPLATE Add new lint checklist Create PULL_REQUEST_TEMPLATE Only suggest .copied() for Option right now Also suggest .copied() when .clone() is called on a Copy type Suggest .copied() instead of .cloned() in map_clone when dealing with references Deny rustc internal lints Remove clippy::default_hash_types internal lint Enable -Zunstable-options in .cargo/config ````
2019-04-19Fix sync_all on macos/iosDavid Vázquez Púa-2/+9
sync_all should flush all metadata in macos/ios, so it should call fcntl with the F_FULLFSYNC flag as sync_data does. Fixes #55920
2019-04-19Remove assumption from recovery codeEsteban Küber-1/+17
2019-04-19Some cleanup to `maybe_parse_struct_expr`Vadim Petrochenkov-54/+26
2019-04-19remove duplicated code and simplify logicEsteban Küber-94/+145
2019-04-19Identify missing ambiguous case with best effort suggestionEsteban Küber-51/+132
2019-04-19Emit specific error for struct literal in conditionsEsteban Küber-207/+162
2019-04-19Auto merge of #60072 - RalfJung:linked-list, r=shepmasterbors-11/+37
fix LinkedList invalidating mutable references The test `test_insert_prev` failed in Miri due to what I consider a bug in `LinkedList`: in various places, `NonNull::as_mut` got called to modify the `prev`/`next` pointers of existing nodes. In particular, the unstable `insert_next` has to modify the `next` pointer of the node that was last handed out by the iterator; to this end it creates a mutable reference to the *entire node* that overlaps with the mutable reference to the node's content that was handed out by the iterator! Thus, the next use if said mutable reference is UB. In code: ```rust loop { match it.next() { // mutable reference handed to us None => break, Some(elt) => { it.insert_next(*elt + 1); // this invalidates `elt` because it creates an overlapping mutable reference match it.peek_next() { Some(x) => assert_eq!(*x, *elt + 2), // this use of `elt` now is a use of an invalid pointer None => assert_eq!(8, *elt), } } } } ``` This PR fixes that by using `as_ptr` instead of `as_mut`. This avoids invalidating the mutable reference that was handed to the user. I did this in all methods called by iterators, just to be sure. Cc @Gankro
2019-04-19add Miri error variant for process exitRalf Jung-0/+9
2019-04-19fix LinkedList invalidating mutable referencesRalf Jung-11/+37
2019-04-19Auto merge of #60077 - RalfJung:miri-alloc-tests, r=joshtriplettbors-1/+15
make liballoc internal test suite mostly pass in Miri I discovered, to my surprise, that liballoc has two test suites: `liballoc/tests`, and a bunch of stuff embedded directly within liballoc. The latter was not covered by [miri-test-libstd](https://github.com/RalfJung/miri-test-libstd) yet. This disables in Miri the tests that Miri cannot support or runs too slowly.
2019-04-19Auto merge of #60063 - spastorino:place2_2, r=oli-obkbors-254/+298
Convert Place unroll to a proper iterator r? @oli-obk
2019-04-19move variable down to where it is usedRalf Jung-5/+5
2019-04-19Auto merge of #60073 - rchaser53:issue-60049, r=estebankbors-10/+61
avoid type-check body of DefId fix: #60049 related: PR #59798
2019-04-19avoid type-check body of DefIdrchaser53-10/+61
2019-04-19Auto merge of #60104 - Centril:rollup-7vmae1a, r=Centrilbors-420/+687
Rollup of 16 pull requests Successful merges: - #59915 (Implement event filtering for self-profiler.) - #59933 (Make clear that format padding doesn't work for Debug) - #60023 (implement specialized nth_back() for Bytes, Fuse and Enumerate) - #60032 (Remove unwanted z-index change) - #60041 (Simplify the returning of a Result a bit) - #60045 (Suggest appropriate path when calling associated item on bare types) - #60052 (Correct unused parameter diagnostic) - #60056 (Update rustfmt to 1.2.1) - #60060 (whitelist RTM x86 target cpu feature) - #60061 (Change suggestion of field when not in self context) - #60064 (Point at try `?` on errors affecting the err match arm of the desugared code) - #60078 (Use more realistic example for thread builder) - #60080 (Fix small errors in docs for `rchunks_exact` and `rchunks_exact_mut`.) - #60082 (Update miri) - #60097 (Use -mergefunc-use-aliases for any LLVM >= 8) - #60098 (libcore: deny `elided_lifetimes_in_paths`) Failed merges: r? @ghost
2019-04-19Rollup merge of #60098 - Centril:libcore-deny-more, r=varkorMazdak Farrokhzad-236/+233
libcore: deny `elided_lifetimes_in_paths` r? @varkor
2019-04-19Rollup merge of #60097 - cuviper:llvm8-mergefunc-use-aliases, r=rkruppeMazdak Farrokhzad-10/+1
Use -mergefunc-use-aliases for any LLVM >= 8 This functionality is not specific to Rust's LLVM, but any starting in LLVM 8.0, as noted in <https://github.com/rust-lang/rust/pull/56358#discussion_r237702197>. cc @nikic r? @rkruppe
2019-04-19Rollup merge of #60082 - TimDiekmann:master, r=RalfJungMazdak Farrokhzad-14/+14
Update miri r? @RalfJung
2019-04-19Rollup merge of #60080 - nathankleyn:fix-issue-60068, r=CentrilMazdak Farrokhzad-3/+3
Fix small errors in docs for `rchunks_exact` and `rchunks_exact_mut`. The documentation for `rchunks_exact` said it started at the beginning of the slice, bit it actually starts at the end of the slice. In addition, there were a couple of "of the slice of the slice" duplicate phrases going on for `rchunks_exact` and `rchunks_exact_mut`. This fixes #60068.
2019-04-19Rollup merge of #60078 - matklad:patch-1, r=shepmasterMazdak Farrokhzad-1/+1
Use more realistic example for thread builder Stack size of 10 **bytes** does not make any sense: the minimal possible stack size is greater anyway.
2019-04-19Rollup merge of #60064 - estebank:issue-59980, r=varkorMazdak Farrokhzad-19/+39
Point at try `?` on errors affecting the err match arm of the desugared code Fix #59980.
2019-04-19Rollup merge of #60061 - estebank:field-sugg, r=davidtwcoMazdak Farrokhzad-30/+60
Change suggestion of field when not in self context Fix #60057.
2019-04-19Rollup merge of #60060 - mtak-:rtm-x86-feature, r=petrochenkovMazdak Farrokhzad-1/+5
whitelist RTM x86 target cpu feature This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](https://github.com/rust-lang/rust/pull/57999) feature. https://github.com/rust-lang-nursery/stdsimd/issues/718
2019-04-19Rollup merge of #60056 - topecongiro:rustfmt-1.2.1, r=alexcrichtonMazdak Farrokhzad-8/+19
Update rustfmt to 1.2.1
2019-04-19Rollup merge of #60052 - varkor:unused-parameter-diagnostic, r=estebankMazdak Farrokhzad-24/+27
Correct unused parameter diagnostic The message was incorrect for unused lifetime parameters. There's no need to be specific.
2019-04-19Rollup merge of #60045 - estebank:suggest-std, r=petrochenkovMazdak Farrokhzad-40/+134
Suggest appropriate path when calling associated item on bare types When looking at the documentation for `std::f32` or `std::str`, for example, it is easy to get confused and assume `std::f32` and `f32` are the same thing. Because of this, it is not uncommon to attempt writing `f32::consts::PI` instead of the correct `std::f32::consts::PI`. When encountering the former, which results in an access error due to it being an inexistent path, try to access the same path under `std`. If this succeeds, this information is stored for later tweaking of the final E0599 to provide an appropriate suggestion. Fix #26760, fix #46660.