about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2020-04-17Make `needs_drop` less pessimistic on generatorsJonas Schievink-13/+9
2020-04-17Auto merge of #71049 - eddyb:const-err, r=oli-obkbors-293/+47
Add `ConstKind::Error` and convert `ErrorHandled::Reported` to it. By replicating the `ty::Error` approach to encoding "an error has occurred", all of the mechanisms that skip redundant/downstream errors are engaged and help out (see the reduction in test output). This PR also adds `ErrorHandled::Linted` for the lint case because using `ErrorHandled::Reported` *without* having emitted an error that is *guaranteed* to stop compilation, is incorrect now. r? @oli-obk cc @rust-lang/wg-const-eval @varkor @yodaldevoid
2020-04-17Auto merge of #70629 - anyska:fields-variant, r=oli-obkbors-3/+1
rustc_target::abi: add Primitive variant to FieldsShape. Originally suggested by @eddyb.
2020-04-17Auto merge of #71230 - Dylan-DPC:rollup-rofigbv, r=Dylan-DPCbors-6/+181
Rollup of 7 pull requests Successful merges: - #70578 (Add long error explanation for E0657) - #70910 (Hides default fns inside Fuse impl to avoid exposing it to any crate) - #71164 (reword Miri validity errors: undefined -> uninitialized) - #71182 (Add some regression tests) - #71206 (Miri error messages: avoid try terminology) - #71220 (Dogfood or_patterns in the standard library) - #71225 (Fix typo in Default trait docs: Provides -> Provide) Failed merges: r? @ghost
2020-04-17Rollup merge of #71206 - RalfJung:dont-try, r=oli-obkDylan DPC-1/+1
Miri error messages: avoid try terminology r? @oli-obk
2020-04-17Rollup merge of #71182 - JohnTitor:regression-tests, r=Mark-SimulacrumDylan DPC-0/+64
Add some regression tests Closes #24843 Closes #28575 Closes #54067 Closes #66868 Closes #67893 Closes #68813
2020-04-17Rollup merge of #71164 - RalfJung:uninit-not-undef, r=oli-obkDylan DPC-5/+115
reword Miri validity errors: undefined -> uninitialized I don't think we say "undefined value" or anything like that anywhere in the docs or so, but we do use the term "uninitialized memory", so I think we should do the same here. Longer-term, I think we should also internally rename "undef" to "uninit". r? @oli-obk
2020-04-17Rollup merge of #70578 - PankajChaudhary5:master, r=GuillaumeGomezDylan DPC-0/+1
Add long error explanation for E0657 Added proper error explanation for issue E0657 in the Rust compiler. Part of #61137 r? @GuillaumeGomez
2020-04-17Auto merge of #71131 - ↵bors-0/+52
pnkfelix:issue-69798-dont-reuse-post-lto-products-when-exports-change, r=nagisa Do not reuse post LTO products when exports change Do not reuse post lto products when exports change Generalizes code from PR #67020, which handled case when imports change. Fix #69798
2020-04-16Rollup merge of #70611 - pawanbisht62:doc/61137-add-long-error-code-e0708, ↵Dylan DPC-0/+1
r=GuillaumeGomez Add long error explanation for E0708 #61137 Add long explanation for the E0708 error code Part of #61137 r? @GuillaumeGomez
2020-04-17Avoid emitting stderr for nowYuki Okushi-24/+2
2020-04-17Add test for issue-67893Yuki Okushi-0/+45
2020-04-17Add test for issue-54067Yuki Okushi-0/+12
2020-04-17Add test for issue-28575Yuki Okushi-0/+20
2020-04-17Add test for issue-24843Yuki Okushi-0/+9
2020-04-16Auto merge of #71201 - Dylan-DPC:rollup-23202uf, r=Dylan-DPCbors-110/+174
Rollup of 5 pull requests Successful merges: - #70566 (Don't bail out before linting in generic contexts.) - #71141 (Provide better compiler output when using `?` on `Option` in fn returning `Result` and vice-versa) - #71149 (remove an impossible branch from check_consts) - #71179 (fix more clippy warnings) - #71191 (Clean up E0520 explanation) Failed merges: r? @ghost
2020-04-16bikeshedRalf Jung-1/+1
2020-04-16ty: convert `ErrorHandled::Reported` to `ConstKind::Error`.Eduard-Mihai Burtescu-293/+47
2020-04-16Miri error messages: avoid try terminologyRalf Jung-1/+1
2020-04-16rustc_target::abi: add Primitive variant to FieldsShape.Ana-Maria Mihalache-3/+1
2020-04-16Rollup merge of #71141 - Duddino:master, r=estebankDylan DPC-0/+46
Provide better compiler output when using `?` on `Option` in fn returning `Result` and vice-versa Fixes #71089
2020-04-16Rollup merge of #70566 - jumbatm:exceeding-bitshifts-constprop, r=RalfJungDylan DPC-110/+128
Don't bail out before linting in generic contexts. Fixes #69021. cc #70017 r? @RalfJung
2020-04-16Auto merge of #70755 - wesleywiser:simplify_locals_2_electric_boogaloo, ↵bors-115/+152
r=oli-obk [mir-opt] Run SimplifyLocals to a fixedpoint and handle most rvalues Follow up to review feedback left on #70595.
2020-04-16test fast path offset reportingRalf Jung-2/+112
2020-04-16switch back to 'bytes'Ralf Jung-1/+1
2020-04-16Auto merge of #70831 - sfackler:shrink-future-stack, r=matthewjasperbors-8/+2
Remove a stack frame from .await calls The stack frames when `.await`ing one async fn from another currently look like this: ``` 12: foo::b::{{closure}} at src/main.rs:2 13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:66 14: core::future::poll_with_context at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:84 15: foo::a::{{closure}} at src/main.rs:6 ``` Since the move away from using TLS to pass the Context around, it's now easy to remove frame 14 by removing poll_with_context in favor of calling Future::poll directly. This still leaves the `GenFuture` frame, but that seems significantly harder to deal with. It also improves diagnostics a bit since they no longer talk about the private poll_with_context function.
2020-04-15Remove other RvaluesWesley Wiser-133/+90
2020-04-15Add test caseWesley Wiser-0/+80
2020-04-15Do not ICE in the face of invalid enum discriminantEsteban Küber-0/+158
2020-04-15reword Miri validity errors: undefined -> uninitializedRalf Jung-3/+3
2020-04-15Provide better compiler output when using `?` on `Option` in fn returning ↵Duddino-4/+4
`Result` and vice-versa
2020-04-15Rollup merge of #70891 - lcnr:replace-rvalue_aggregate, r=eddybMazdak Farrokhzad-188/+849
unit rvalue, use constant `()` instead of tuple fixes #70886 r? @eddyb
2020-04-15Auto merge of #71151 - Dylan-DPC:rollup-6rt4h7b, r=Dylan-DPCbors-15/+85
Rollup of 8 pull requests Successful merges: - #70657 (Allow `try`-blocks in places where an open delim is expected) - #70947 (tighten CTFE safety net for accesses to globals) - #70949 (simplify `vec!` macro) - #71002 (fix target & runtool args order) - #71082 (ptr: introduce len() method on raw slices) - #71128 (Remove unused single_step flag) - #71133 (Tighten time complexity on the doc of sort_by_key) - #71135 (Update books) Failed merges: r? @ghost
2020-04-15Update stderrs after rebase.jumbatm-0/+6
2020-04-15Amend exceeding-bitshifts test case for #69021.jumbatm-113/+125
- Change to warnings so that all lints are emitted - Expect build-pass - Change placeholder FIXME to WARN.
2020-04-14Provide better compiler output when using `?` on `Option` in fn returning ↵Duddino-0/+46
`Result` and vice-versa
2020-04-14typeck: always expose repeat count `AnonConst`s' parent in `generics_of`.Eduard-Mihai Burtescu-61/+19
2020-04-14borrow_check/type_check: normalize `Aggregate` and `Call` operands.Eduard-Mihai Burtescu-0/+15
2020-04-14allow try as scrutinee, e.g. `match try ...`Bastian Kauschke-15/+85
2020-04-14typeck: workaround WF hole in `to_const`.Eduard-Mihai Burtescu-14/+87
2020-04-14typeck: track any errors injected during writeback and taint tables ↵Eduard-Mihai Burtescu-2/+54
appropriately.
2020-04-14Tests.Felix S. Klock II-0/+52
Namely, a regression test for issue #69798 (export added), and the inverse of that test (export removd).
2020-04-14update 32 bit mir-opt testsBastian Kauschke-31/+119
2020-04-14Auto merge of #70679 - tmandry:issue-68112, r=nikomatsakisbors-18/+234
Improve async-await/generator obligation errors in some cases Fixes #68112. This change is best read one commit at a time (I add a test at the beginning and update it in each change after). The `test2` function is a case I found while writing the test that we don't handle with this code yet. I don't attempt to fix it in this PR, but it's a good candidate for future work. r? @davidtwco, @nikomatsakis
2020-04-14Auto merge of #70643 - Rustin-Liu:rustin-patch-rename, r=eddybbors-34/+34
Rename AssocKind::Method to AssocKind::Fn Part of https://github.com/rust-lang/rust/issues/60163. https://github.com/rust-lang/rust/issues/60163#issuecomment-607284413
2020-04-13Update test after rebaseTyler Mandry-5/+5
2020-04-13Incorporate feedback into diagnosticsTyler Mandry-23/+23
2020-04-13Don't double-annotate the same SpanTyler Mandry-6/+31
2020-04-13Use clearer message when obligation is caused by await exprTyler Mandry-6/+3
2020-04-13Use "generator" instead of "future" when appropriateTyler Mandry-6/+6