about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-04-23Auto merge of #60140 - euclio:pulldown-cmark, r=GuillaumeGomezbors-0/+22
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/+9
2019-04-22Auto merge of #60126 - estebank:continue-eval, r=oli-obkbors-193/+174
Continue evaluating after item-type checking Fix #30999. r? @oli-obk
2019-04-22Fix ICE related to #53708Esteban Küber-14/+22
2019-04-22Never stop due to errors before borrow checkingEsteban Küber-99/+403
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-22Continue evaluating after item-type checkingEsteban Küber-35/+181
2019-04-22Only make suggestion when type is `Copy`.David Wood-13/+48
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-11/+3
2019-04-22Remove double trailing newlinesvarkor-204/+2
2019-04-22upgrade rustdoc's pulldown-cmark to 0.4.1Andy Russell-0/+22
2019-04-22Auto merge of #59114 - matthewjasper:enable-migate-2015, r=pnkfelixbors-21885/+5878
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-21885/+5878
2019-04-22Auto merge of #60053 - Xanewok:serde-save-analysis, r=nrcbors-1/+1
save-analysis: Use serde instead of libserialize to dump JSON data This breaks the save-analysis infrastructure (which also includes `rls-{analysis, data, span}` crates) from depending on rustc_serialize and so we can start moving them to being supported on stable without implementing `Decodable` et al. by hand for data structures defined there. Notable benefits: - we drop the awkward raw byte `PathBuf` [serialization](https://gist.github.com/Xanewok/f4fe8564d0dc0c3ab1dbc244279ff895) (until now (de)serialized as `&[u8]`) - [faster](https://github.com/serde-rs/json-benchmark) (hopefully noticeable for inner crate dependencies for the RLS workloads) - we can easily explore the binary serialization backend (which we planned to do for save-analysis anyway) ~This should be merged together with an update to RLS (https://github.com/rust-lang/rls/pull/1435), which technically could be included right now because we can use the bundled `rls-analysis` here directly, however I'd prefer to publish this to crates.io first (https://github.com/rust-lang/rls/pull/1434, cc @nrc) and use the published version, instead.~ Includes https://github.com/rust-lang/rls/pull/1436. @matklad @nikomatsakis This is also important for the potential RLS 1.0 - 2.0 bridge we talked about on Zulip today
2019-04-21Suggest dereferencing when `Deref` is implemented.David Wood-8/+38
This commit suggests dereferencing a type when it implements `Deref` with the correct `Output` associated type.
2019-04-21Add existing behaviour test for deref suggestions.David Wood-0/+44
This commit adds a test that demonstrates the current behaviour where suggestions to add a dereference aren't given for non-references.
2019-04-21Enforce consistent drop order w/ async methods.David Wood-0/+103
This commit extends the previous commit to apply to trait methods as well as free functions.
2019-04-21Move `async fn` arguments into closure.David Wood-2/+2
This commit takes advantage of `AsyncArgument` type that was added in a previous commit to replace the arguments of the `async fn` in the HIR and add statements to move the bindings from the new arguments to the pattern from the old argument. For example, the async function `foo` below: async fn foo((x, _y): (T, V)) { async move { } } becomes: async fn foo(__arg0: (T, V)) { async move { let (x, _y) = __arg0; } }
2019-04-21Use sysroot libserialize in newtype_index testIgor Matuszewski-1/+1
2019-04-21Auto merge of #60119 - estebank:bad-recovery, r=davidtwcobors-0/+16
Remove assumption from recovery code Fix #60115.
2019-04-21Add test for drop order in async functions.David Wood-0/+89
This tests that async functions drop parameters in the same order as regular functions.
2019-04-21Auto merge of #60132 - davidtwco:issue-60075, r=estebankbors-0/+49
Fix fn front matter parsing ICE from invalid code. Fixes #60075. This PR 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. r? @estebank (thanks for the minimized test case)
2019-04-20Auto merge of #60088 - varkor:async_await-method-feature-gate, r=cramertjbors-6/+41
Feature gate async methods Fixes https://github.com/rust-lang/rust/issues/60069.
2019-04-20Update error message in testvarkor-2/+1
2019-04-20Check async in trait methodsvarkor-5/+26
2019-04-20Fix additional variadic typosvarkor-2/+2
2019-04-20Add test for async fn methods feature gatingvarkor-4/+19
2019-04-20Auto merge of #59826 - llogiq:multi-dbg, r=SimonSapinbors-0/+22
allow multiple args to `dbg!(..)` This closes #59763
2019-04-20Auto merge of #59987 - saleemjaffer:refactor_adjust_castkinds, r=oli-obkbors-1/+1
Refactor Adjust and CastKind fixes rust-lang#59588
2019-04-20Fix fn front matter parsing ICE from invalid code.David Wood-0/+49
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-19extend ui testAndre Bogus-0/+22
2019-04-19Remove assumption from recovery codeEsteban Küber-0/+16
2019-04-19Some cleanup to `maybe_parse_struct_expr`Vadim Petrochenkov-36/+13
2019-04-19remove duplicated code and simplify logicEsteban Küber-5/+80
2019-04-19Identify missing ambiguous case with best effort suggestionEsteban Küber-0/+47
2019-04-19Emit specific error for struct literal in conditionsEsteban Küber-199/+109
2019-04-19Auto merge of #60073 - rchaser53:issue-60049, r=estebankbors-10/+55
avoid type-check body of DefId fix: #60049 related: PR #59798
2019-04-19avoid type-check body of DefIdrchaser53-10/+55
2019-04-19Rollup merge of #60064 - estebank:issue-59980, r=varkorMazdak Farrokhzad-12/+12
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-20/+48
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/+2
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 #60052 - varkor:unused-parameter-diagnostic, r=estebankMazdak Farrokhzad-19/+19
Correct unused parameter diagnostic The message was incorrect for unused lifetime parameters. There's no need to be specific.
2019-04-18Suggest appropriate path when calling associated item on bare typesEsteban Küber-0/+35
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. This suggestion applies to both E0233 and E0599 and is only checked when the first ident of a path corresponds to a primitive type.
2019-04-18Fix rebaseEsteban Küber-1/+1
2019-04-18review comments: change wordingEsteban Küber-4/+4
2019-04-18Change suggestion of field when not in self contextEsteban Küber-20/+48
2019-04-18Update testsvarkor-19/+19