about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-12-24add test for dropping in constRalf Jung-0/+43
2019-12-24Rollup merge of #67572 - aidanhs:aphs-choco-direct-cdn, r=Mark-SimulacrumMazdak Farrokhzad-6/+10
Use the chocolatey CDN directly to avoid the flaky API
2019-12-24Rollup merge of #67569 - Mark-Simulacrum:opt-char-encode, r=oli-obkMazdak Farrokhzad-30/+30
Clean up unsafety in char::encode_utf8 This originally started as an attempt to allow LLVM to optimize through encode_utf8 to detect the try_encode_utf8 case (#52579, #52580), but due to a typo my conclusion that my optimizations were successful was incorrect. Furthermore, as far as I can tell, this optimization is probably just not possible with LLVM today. This [code](https://rust.godbolt.org/z/JggRj4) compiles down to a long series of compares, notably, two identical series of compares. That essentially means that LLVM is today unable to see that these two ifs are identical and as such can be merged and then realize that no value of the if condition can result in a call to `please_delete`. As such, for now, we do not attempt to specifically optimize for that case.
2019-12-24Rollup merge of #67561 - euclio:remove-description, r=jonas-schievinkMazdak Farrokhzad-31/+5
remove `description` from `Error` impls in docs Since `description` is soft-deprecated, there's no need to show it implemented in these examples.
2019-12-24Rollup merge of #67551 - ldm0:E0627, r=Dylan-DPCMazdak Farrokhzad-13/+47
Add long error code explanation message for E0627 Part of #61137. r? @GuillaumeGomez
2019-12-24Rollup merge of #67547 - GuillaumeGomez:cleanup-err-codes, r=Dylan-DPCMazdak Farrokhzad-6/+8
Cleanup err codes r? @Dylan-DPC
2019-12-24Rollup merge of #67543 - JohnTitor:regression-tests, r=CentrilMazdak Farrokhzad-1/+90
Add regression tests for fixed ICEs Closes #61747 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01)) Closes #66205 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01)) Closes #66270 (fixed by #66246) Closes #67424 (fixed by #67160) Also picking a minor nit up from #67071 with 101dd7bad9432730fa2f625ae43afcc2929457d4 r? @Centril
2019-12-24Rollup merge of #67337 - oli-obk:no_mut_static_ref_from_const, r=RalfJungMazdak Farrokhzad-28/+301
Ensure that evaluating or validating a constant never reads from a static r? @RalfJung as per https://github.com/rust-lang/rust/pull/66302#issuecomment-554663387 This does not yet address the fact that evaluation of a constant can read from a static (under unleash-miri)
2019-12-23Minimize unsafety in encode_utf8Mark Rousskov-30/+30
Use slice patterns to avoid having to skip bounds checking
2019-12-24Use the chocolatey CDN directly to avoid the flaky APIAidan Hobson Sayers-6/+10
2019-12-23Auto merge of #66296 - Centril:bindings_after_at-init, r=pnkfelixbors-187/+2412
Initial implementation of `#![feature(bindings_after_at)]` Following up on #16053, under the gate `#![feature(bindings_after_at)]`, `x @ Some(y)` is allowed subject to restrictions necessary for soundness. The implementation and test suite should be fairly complete now. One aspect that is not covered is the interaction with nested `#![feature(or_patterns)]`. This is not possible to test at the moment in a good way because that feature has not progressed sufficiently and has fatal errors in MIR building. We should make sure to add such tests before we stabilize both features (but shipping one of them is fine). r? @pnkfelix cc @nikomatsakis @matthewjasper @pcwalton cc https://github.com/rust-lang/rust/issues/65490
2019-12-23Bless testsOliver Scherer-1/+1
2019-12-24Apply suggestion from CentrilYuki Okushi-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-12-24Add test for issue-67424Yuki Okushi-0/+33
2019-12-23remove `description` from `Error` impls in docsAndy Russell-31/+5
2019-12-23TidyOliver Scherer-1/+2
2019-12-23Rollup merge of #67559 - Mark-Simulacrum:drop-doc, r=RalfJungMazdak Farrokhzad-0/+6
Document that calling Drop, even after it panics, is UB Fixes #60822. r? @gnzlbg
2019-12-23Rollup merge of #67546 - oli-obk:slice_pattern_ice, r=varkorMazdak Farrokhzad-1/+11
Fix ICE in mir interpretation Indices from the end start at 1 so you can immediately subtract them from the length to get the index instead of having to do an additional `-1`. Kinda documented in https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/enum.ProjectionElem.html#variant.ConstantIndex
2019-12-23Rollup merge of #67538 - varkor:lhs-assign-diagnostics, r=CentrilMazdak Farrokhzad-105/+341
Improve diagnostics for invalid assignment - Improve wording and span information for invalid assignment diagnostics. - Link to https://github.com/rust-lang/rfcs/issues/372 when it appears the user is trying a destructuring assignment. - Make the equality constraint in `where` clauses error consistent with the invalid assignment error.
2019-12-23Rollup merge of #67536 - Centril:move-is_range_literal, r=Mark-SimulacrumMazdak Farrokhzad-72/+69
Move `{hir::lowering -> hir}::is_range_literal` The function is never used inside lowering, but only ever in external crates. By moving it, we facilitate lowering as its own crate. Best read commit-by-commit. r? @Mark-Simulacrum
2019-12-23Rollup merge of #67527 - GuillaumeGomez:results-show-too-much, r=kinnisonMazdak Farrokhzad-46/+45
Results show too much Fixes #67461. To reproduce the current issue: search anything, then once the results appears, press escape. They should disappear then re-appear right away. This is because blurring an element triggers the "change" event. r? @kinnison
2019-12-23Rollup merge of #67507 - Mark-Simulacrum:purge-uninit, r=CentrilMazdak Farrokhzad-48/+81
Remove mem::uninitalized from tests This purges uses of uninitialized where possible from test cases. Some are merely moved over to the equally bad pattern of MaybeUninit::uninit().assume_init() but with an annotation that this is "the best we can do". Fixes #62397
2019-12-23Rollup merge of #67466 - oli-obk:const_intrinsic, r=CentrilMazdak Farrokhzad-96/+53
Require const stability attributes on intrinsics to be able to use them in constant contexts r? @Centril finally fixes #61495 cc @RalfJung
2019-12-23Rollup merge of #67233 - Luro02:cursor_traits, r=sfacklerMazdak Farrokhzad-1/+13
Add PartialEq and Eq to Cursor closes #67226
2019-12-23Fix typoOliver Scherer-1/+1
2019-12-23Document that calling Drop, even after it panics, is UBMark Rousskov-0/+6
2019-12-23Update src/librustc_mir/interpret/intern.rsOliver Scherer-1/+1
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-12-23Show `const_err` lintsOliver Scherer-8/+45
2019-12-23Constants reading or referencing statics is illegalOliver Scherer-8/+9
and some uses of it will be illegal forever (e.g. mutable or interior mutable statics)
2019-12-23Dynamically prevent constants from accessing staticsOliver Scherer-22/+203
2019-12-23Panic on mutable allocs in constantsOliver Scherer-6/+59
2019-12-23adjust E0303 error code docsMazdak Farrokhzad-1/+9
2019-12-23Remove `bindings_after_at` from `INCOMPLETE_FEATURES`.Mazdak Farrokhzad-296/+153
2019-12-23Test that nested type ascription is banned.Mazdak Farrokhzad-0/+69
2019-12-23Test that `_ @ subpat` is syntactically rejected.Mazdak Farrokhzad-0/+59
2019-12-23harden & split borrowck-pat-at-and-boxMazdak Farrokhzad-62/+139
2019-12-23enhance borrowck-pat-by-copy-bindings-in-atMazdak Farrokhzad-0/+7
2019-12-23clarify bind-by-move-neither-can-livee..Mazdak Farrokhzad-4/+72
2019-12-23bindings_after_at: harden tests wrt. contexts & slice_patternsMazdak Farrokhzad-108/+477
2019-12-23bindings_after_at: harden tests wrt. promotionMazdak Farrokhzad-93/+235
2019-12-23--bless bindings-after-at testsMazdak Farrokhzad-67/+498
2019-12-23document check_borrow_conflicts_in_at_patternsMazdak Farrokhzad-2/+10
2019-12-23improve robustness of pat walkersMazdak Farrokhzad-11/+16
2019-12-23refactor with extract_binding_modeMazdak Farrokhzad-62/+45
2019-12-23add check_borrow_conflicts_in_at_patterns analysisMazdak Farrokhzad-30/+104
2019-12-23check_legality_of_move_bindings: generalize diagnostics & add commentsMazdak Farrokhzad-30/+33
2019-12-23add a fixmeMazdak Farrokhzad-0/+1
2019-12-23Introduce `#![feature(bindings_after_at)]`.Mazdak Farrokhzad-92/+1156
Under the gate, `x @ Some(y)` is allowed. This is subject to various restrictions for soundness.
2019-12-23Yield is an expression form, not a statement.Donough Liu-12/+16
2019-12-23Add long error code explanation message for E0627Donough Liu-1/+31