about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-04-23rustc: don't track var_hir_id or mutability in mir::UpvarDecl.Eduard-Mihai Burtescu-20/+20
2019-04-23Update clippyManish Goregaokar-9/+15
2019-04-23Rollup merge of #60191 - gnzlbg:f16c, r=alexcrichtonMazdak Farrokhzad-0/+1
Add f16c target_feature This is requires for Intel 16-bit half-precision float intrinsics: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=fp16&expand=1769 - see companion stdsimd PR: https://github.com/rust-lang-nursery/stdsimd/pull/737. LLVM, Wikipedia CPUID page, and the Intel Dev Manual all call this CPUID feature "F16C", but the Intel intrinsics guide calls this "FP16C" - this is probably a bug in the intrinsics guide which we are tracking here: https://github.com/rust-lang-nursery/stdsimd/issues/738 r? @alexcrichton
2019-04-23Rollup merge of #60177 - rasendubi:rustdoc-comments, r=varkorMazdak Farrokhzad-151/+148
Promote rust comments to rustdoc
2019-04-23Rollup merge of #60169 - varkor:tidy-unnecessary-ignore-newline, r=kennytmMazdak Farrokhzad-250/+182
Warn when ignore-tidy-linelength is present, but no lines are too long It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
2019-04-23Rollup merge of #60146 - Manishearth:font-update, r=QuietMisdreavusMazdak Farrokhzad-14/+9
Update fonts used by rustdoc Our version of Source Serif Pro is pretty old and is causing issues on Linux, see https://bugzilla.mozilla.org/show_bug.cgi?id=1545317 . I took this opportunity to update all of the fonts we use. r? @steveklabnik @QuietMisdreavus
2019-04-23Rollup merge of #59839 - KodrAus:must-use-num, r=sfacklerMazdak Farrokhzad-1/+157
Warn on unused results for operation methods on nums From a suggestion by @llogiq Adds a `#[must_use]` attribute to operation methods on integers that take self by value as the first operand and another value as the second. It makes it clear that these methods return the result of the operation instead of mutating `self`, which is the source of a rather embarrassing bug I had in a codebase of mine recently... As an example: ```rust struct Int { value: i64, } impl Int { fn add(&mut self, other: i64) { self.value.wrapping_add(other); } } ``` Will produce a warning like: ``` warning: unused return value of `core::num::<impl i64>::wrapping_add` that must be used --> src/main.rs:7:7 | 7 | self.value.wrapping_add(other); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_must_use)] on by default = note: this returns the result of the operation, without modifying the original ``` If this is something we're on board with, we could do something similar for `f32` and `f64` too. There are probably other methods on integers that make sense.
2019-04-23Rollup merge of #59823 - davidtwco:issue-54716, r=cramertjMazdak Farrokhzad-130/+685
[wg-async-await] Drop `async fn` arguments in async block Fixes #54716. This PR modifies the HIR lowering (and some other places to make this work) so that unused arguments to a async function are always dropped inside the async move block and not at the end of the function body. ``` async fn foo(<pattern>: <type>) { async move { } } // <-- dropped as you "exit" the fn // ...becomes... fn foo(__arg0: <ty>) { async move { let <pattern>: <ty> = __arg0; } // <-- dropped as you "exit" the async block } ``` However, the exact ordering of drops is not the same as a regular function, [as visible in this playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=be39af1a58e5d430be1eb3c722cb1ec3) - I believe this to be an unrelated issue. There is a [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-t-compiler.2Fwg-async-await/topic/.2354716.20drop.20order) for this. r? @cramertj cc @nikomatsakis
2019-04-23Reduce noise and document test case.David Wood-91/+83
This commit introduces a `assert_drop_order_after_poll` helper function to the test case for this case to reduce repetitive noise and documents what each function aims to test.
2019-04-23Auto merge of #60155 - davidtwco:issue-59819, r=oli-obkbors-55/+175
Suggest dereferencing when `Deref` is implemented. Fixes #59819. r? @oli-obk cc @estebank
2019-04-23rustc_mir: don't rely on mir::UpvarDecl in the MIR borrowck.Eduard-Mihai Burtescu-91/+159
2019-04-23Auto merge of #60152 - stepnivlk:visit_subpats-removal, r=varkorbors-11/+37
Remove `visit_subpats` parameter from `check_pat` The core idea is to keep track of current ID directly in `EllipsisInclusiveRangePatterns` struct and early return in `check_pat` based on it. Fixes https://github.com/rust-lang/rust/issues/60043. r? @varkor
2019-04-23Fix regression in line ending testvarkor-2/+2
2019-04-23Remove unnecessary tidy ignore directivesvarkor-12/+7
2019-04-23Check for other unused tidy check directivesvarkor-28/+70
2019-04-23Update ui testsvarkor-98/+98
2019-04-23Remove unnecessary ignore-tidy-linelengthvarkor-116/+0
2019-04-23Tidy warn on ignored line length when lines are not too longvarkor-3/+9
2019-04-23Look specifically for comments containing tidy ignore directivesvarkor-5/+10
2019-04-23Auto merge of #60125 - estebank:continue-evaluating, r=oli-obkbors-125/+449
Don't stop evaluating due to errors before borrow checking r? @oli-obk Fix #60005. Follow up to #59903. Blocked on #53708, fixing the ICE in `src/test/ui/consts/match_ice.rs`.
2019-04-23Add f16c target_featuregnzlbg-0/+1
2019-04-23Auto merge of #60172 - varkor:tidy-double-trailing-newline, r=kennytmbors-248/+5
Disallow double trailing newlines in tidy This wasn't done previously in https://github.com/rust-lang/rust/pull/47064#issuecomment-354533010 as it affected too many files, but I think it's best to fix it now so that the number of files with double trailing newlines doesn't keep increasing. r? kennytm
2019-04-23Auto merge of #60121 - davazp:fix-sync-all-macos, r=KodrAusbors-2/+9
Fix sync_all on macos/ios `sync_all` should flush all metadata in macos/ios, so it should call `fcntl` with the `F_FULLFSYNC` flag as `sync_data` does. Note that without this `sync_data` performs more flushes than `sync_all` on macos/ios.
2019-04-23Auto merge of #60140 - euclio:pulldown-cmark, r=GuillaumeGomezbors-108/+82
upgrade rustdoc's pulldown-cmark to 0.4.1 Fixes #59194.
2019-04-22Fix #58270, fix off-by-one error in error diagnostics.Xavier Denis-18/+19
2019-04-22Temporarily accept [i|u][32|size] suffixes on a tuple index and warnEsteban Küber-3/+31
2019-04-23Reexport IntErrorKind in stdJakub Kądziołka-0/+7
2019-04-22Remove redundant code in copy_clone_conditionsTyler Mandry-10/+4
This was left over from when closure copy and clone were gated behind feature flags.
2019-04-23reduce visibilityAleksey Kladov-1/+1
2019-04-22Auto merge of #60126 - estebank:continue-eval, r=oli-obkbors-201/+179
Continue evaluating after item-type checking Fix #30999. r? @oli-obk
2019-04-23Remove visit_subpats from check_pat in favor of state in ↵Tomas Koutsky-11/+37
EllipsisInclusiveRangePatterns
2019-04-23simplify and avoid allocationAleksey Kladov-2/+2
2019-04-23remove obsolete and incorrect commentAleksey Kladov-3/+1
2019-04-22review comment: add HACK commentEsteban Küber-0/+2
2019-04-22Fix ICE related to #53708Esteban Küber-26/+47
2019-04-22Never stop due to errors before borrow checkingEsteban Küber-108/+409
2019-04-22Remove needless error in testEsteban Küber-18/+8
2019-04-22review comments: deduplicate testsEsteban Küber-159/+4
2019-04-22Update ui testsvarkor-7/+2
2019-04-22Promote rust comments to rustdocAlexey Shmalko-151/+148
2019-04-22Continue evaluating after item-type checkingEsteban Küber-43/+186
2019-04-22Only make suggestion when type is `Copy`.David Wood-75/+91
This commit makes the suggestion to dereference when a type implements `Deref` only apply if the dereference would succeed (ie. the type is `Copy`, otherwise a borrow check error would occur).
2019-04-22Update ui testsvarkor-4/+4
2019-04-22Remove leading newlinesvarkor-12/+3
2019-04-22Add a tidy check for leading trailing newlinesvarkor-0/+7
2019-04-22Disallow double trailing newlines in tidyvarkor-1/+1
2019-04-22Remove double trailing newlinesvarkor-240/+2
2019-04-22upgrade rustdoc's pulldown-cmark to 0.4.1Andy Russell-108/+82
2019-04-22Auto merge of #59114 - matthewjasper:enable-migate-2015, r=pnkfelixbors-22244/+6035
Enable NLL migrate mode on the 2015 edition ## What is in this PR? * Remove the `-Zborrowck=ast` flag option from rustc. * The default in the 2015 edition is now `-Zborrowck=migrate`. * The 2018 edition default is unchanged: it's still `-Zborrowck=migrate`. * Enable two-phase borrows (currently toggled via the `-Ztwo-phase-borrows` flag) on all editions. * Remove most dead code that handled these options. * Update tests for the above changes. ## What is *not* in this PR? These are left for future PRs * Use `-Zborrowck=mir` in NLL compare mode tests (#56993) * Remove the `-Zborrowck=compare` option (#59193) * Remove the `-Ztwo-phase-borrows` flag. It's kept, as a flag that does nothing so that perf.rlo has time to stop using it (cc @Mark-Simulacrum) * Remove MIR typeck as its own MIR pass - it's now run by NLL. * Enabling `-Zborrowck=mir` by default (#58781) * Replace `allow_bind_by_move_patterns_with_guards` and `check_for_mutation_in_guard_via_ast_walk` with just using the feature gate. (#59192) Soundness issues that are fixed by NLL will stay open until full NLL is emitting hard errors. However, these diagnostics and completeness issues can now be closed: Closes #18330 Closes #22323 Closes #23591 Closes #26736 Closes #27487 Closes #28092 Closes #28970 Closes #29733 Closes #30104 Closes #38915 Closes #39908 Closes #43407 Closes #47524 Closes #48540 Closes #49073 Closes #52614 Closes #55085 Closes #56093 Closes #56496 Closes #57804 cc #43234 r? @pnkfelix cc @rust-lang/lang cc @rust-lang/wg-compiler-nll
2019-04-22update tests for migrate mode by defaultMatthew Jasper-21887/+5881