about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-12-24Rollup merge of #67551 - ldm0:E0627, r=Dylan-DPCMazdak Farrokhzad-9/+13
Add long error code explanation message for E0627 Part of #61137. r? @GuillaumeGomez
2019-12-24Rollup merge of #67543 - JohnTitor:regression-tests, r=CentrilMazdak Farrokhzad-0/+89
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-5/+235
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-23Auto merge of #66296 - Centril:bindings_after_at-init, r=pnkfelixbors-77/+2215
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-23Rollup merge of #67546 - oli-obk:slice_pattern_ice, r=varkorMazdak Farrokhzad-0/+9
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-58/+254
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 #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-0/+5
Require const stability attributes on intrinsics to be able to use them in constant contexts r? @Centril finally fixes #61495 cc @RalfJung
2019-12-23Show `const_err` lintsOliver Scherer-8/+45
2019-12-23Constants reading or referencing statics is illegalOliver Scherer-5/+5
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-5/+154
2019-12-23Panic on mutable allocs in constantsOliver Scherer-0/+44
2019-12-23Remove `bindings_after_at` from `INCOMPLETE_FEATURES`.Mazdak Farrokhzad-295/+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-66/+497
2019-12-23check_legality_of_move_bindings: generalize diagnostics & add commentsMazdak Farrokhzad-19/+20
2019-12-23Introduce `#![feature(bindings_after_at)]`.Mazdak Farrokhzad-76/+1133
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-9/+13
2019-12-23Add new folder for destructuring assignment testsvarkor-20/+20
2019-12-23Add span information to `ExprKind::Assign`varkor-34/+34
2019-12-23Recognise nested tuples/arrays/structsvarkor-1/+16
2019-12-23Add note about destructuring assignmentsvarkor-0/+135
2019-12-23Improve invalid assignment errorvarkor-41/+83
2019-12-23Add the full issue reference to equality constraints in `where` clausesvarkor-4/+8
2019-12-22Remove mem::uninitalized from testsMark Rousskov-48/+81
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".
2019-12-22Change bound order in rustfmt testMark Rousskov-2/+2
It is unclear why this changed, but since it seems like a harmless change, we're going to move forward with reformatting.
2019-12-23Fix ICE in mir interpretationOliver Scherer-0/+9
2019-12-22test falloutMark Rousskov-9/+9
2019-12-23Add test for issue-66270Yuki Okushi-0/+22
2019-12-23Add test for issue-66205Yuki Okushi-0/+10
2019-12-23Add test for issue-61747Yuki Okushi-0/+24
2019-12-22Auto merge of #67505 - Centril:rollup-7win7ty, r=Centrilbors-263/+381
Rollup of 6 pull requests Successful merges: - #67148 ( Refactor type & bounds parsing thoroughly) - #67410 (Reenable static linking of libstdc++ on windows-gnu) - #67439 (Cleanup `lower_pattern_unadjusted` & Improve slice pat typeck) - #67480 (Require issue = "none" over issue = "0" in unstable attributes) - #67500 (Tweak non_shorthand_field_patterns' suggestion) - #67504 (Warn against relying on ?Sized being last) Failed merges: r? @ghost
2019-12-22Rollup merge of #67500 - JohnTitor:non-shorthand-field-patterns, r=CentrilMazdak Farrokhzad-15/+113
Tweak non_shorthand_field_patterns' suggestion Fixes #66434 r? @estebank
2019-12-22Rollup merge of #67480 - rossmacarthur:fix-41260-avoid-issue-0-part-2, r=CentrilMazdak Farrokhzad-212/+212
Require issue = "none" over issue = "0" in unstable attributes These changes make the use of `issue = "none"` required in unstable attributes throughout the compiler. Notes: - #66299 is now in beta so `issue = "none"` is accepted. - The `tidy` tool now fails on `issue = "0"`. - Tests that used `issue = "0"` were changed to use `issue = "none"`, except for _one_ that asserts `issue = "0"` can still be used. - The compiler still allows `issue = "0"` because some submodules require it, this could be disallowed once these are updated. Resolves #41260 r? @varkor
2019-12-22Rollup merge of #67148 - Centril:ty-polish, r=estebankMazdak Farrokhzad-36/+56
Refactor type & bounds parsing thoroughly PR is based on https://github.com/rust-lang/rust/pull/67131 with first one from this PR being ` extract parse_ty_tuple_or_parens`. Also fixes #67146. r? @estebank
2019-12-22Auto merge of #66932 - rust-lang:pass-check-runfail, r=petrochenkovbors-341/+467
Revamp `// run-fail` wrt. `--pass` & support `// build-fail` & `// check-fail` Revamp how `// run-fail` tests work internally by having a separate `FailMode` that does not interfere with `PassMode`. In particular, `--pass check` will now have no effect on `// *-fail` tests. Moreover, new test annotations `// check-fail` (the default) and `// build-fail` are added. The latter is useful to distinguish post-monomorphization failures from pre-monomorphization failures as seen throughout the PR. Finally, ensure that non-`Ui` tests do not listen to `--pass check` such that the flag can be used with e.g. `./x.py test --pass check` directly. Fixes #66929. Fixes #67128. r? @petrochenkov cc @RalfJung @ninjasource
2019-12-22Tweak non_shorthand_field_patterns' suggestionYuki Okushi-15/+113
2019-12-21add build-fail to 32-bit testsMazdak Farrokhzad-2/+4
2019-12-21fix rebase falloutMazdak Farrokhzad-8/+9
2019-12-21refactor & address review commentsMazdak Farrokhzad-13/+5
2019-12-21rework run-fail and support check,build-failMazdak Farrokhzad-327/+458