about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-07-08fixes post rebaseJane Losare-Lusby-17/+1
2022-07-08wip testJane Losare-Lusby-0/+12
2022-07-08add rt flag to allowed internal unstable for RustcEncodable/DecodableJane Lusby-0/+8
2022-07-08add opt in attribute for stable-in-unstable itemsJane Lusby-0/+64
2022-07-08Support unstable moves via stable in unstable itemsJane Lusby-8/+151
2022-07-08Implement support for DWARF version 5.Patrick Walton-0/+20
DWARF version 5 brings a number of improvements over version 4. Quoting from the announcement [1]: > Version 5 incorporates improvements in many areas: better data compression, > separation of debugging data from executable files, improved description of > macros and source files, faster searching for symbols, improved debugging > optimized code, as well as numerous improvements in functionality and > performance. On platforms where DWARF version 5 is supported (Linux, primarily), this commit adds support for it behind a new `-Z dwarf-version=5` flag. [1]: https://dwarfstd.org/Public_Review.php
2022-07-08Auto merge of #98614 - oli-obk:take_unsound_opaque_types, r=wesleywiserbors-173/+86
don't succeed `evaluate_obligation` query if new opaque types were registered fixes #98608 fixes #98604 The root cause of all this is that in type flag computation we entirely ignore nongeneric things like struct fields and the signature of function items. So if a flag had to be set for a struct if it is set for a field, that will only happen if the field is generic, as only the generic parameters are checked. I now believe we cannot use type flags to handle opaque types. They seem like the wrong tool for this. Instead, this PR replaces the previous logic by adding a new variant of `EvaluatedToOk`: `EvaluatedToOkModuloOpaqueTypes`, which says that there were some opaque types that got hidden types bound, but that binding may not have been legal (because we don't know if the opaque type was in its defining scope or not).
2022-07-08Auto merge of #99054 - Dylan-DPC:rollup-0zuhhds, r=Dylan-DPCbors-5/+34
Rollup of 4 pull requests Successful merges: - #98533 (Add a `-Zdump-drop-tracking-cfg` debugging flag) - #98654 (An optimization for `pest-2.1.3`) - #98657 (Migrate some diagnostics from `rustc_const_eval` to `SessionDiagnostic`) - #98794 (Highlight conflicting param-env candidates) Failed merges: - #98957 ( don't allow ZST in ScalarInt ) r? `@ghost` `@rustbot` modify labels: rollup
2022-07-08Create a custom layout path for UnsafeCell instead of piggy backing on the ↵Oli Scherer-0/+9
layout_scalar_valid_range logic
2022-07-08Add tests for libstd typesOli Scherer-5/+17
2022-07-08Rollup merge of #98794 - compiler-errors:conflicting-param-env, ↵Dylan DPC-5/+34
r=michaelwoerister Highlight conflicting param-env candidates This could probably be further improved by noting _why_ equivalent param-env candidates (modulo regions) leads to ambiguity. Fixes #98786
2022-07-08Auto merge of #98758 - nnethercote:more-derive-output-improvements, ↵bors-362/+413
r=Mark-Simulacrum More derive output improvements This PR includes: - Some test improvements. - Some cosmetic changes to derive output that make the code look more like what a human would write. - Some more fundamental improvements to `cmp` and `partial_cmp` generation. r? `@Mark-Simulacrum`
2022-07-08Update ui test for the new E0530 suggestionObei Sideg-6/+24
2022-07-08Fix last let_chains blockerCaio-293/+803
2022-07-08Fix unreachable coverage generation for inlined functionsTomasz Miąsko-0/+41
To generate a function coverage we need at least one coverage counter, so a coverage from unreachable blocks is retained only when some live counters remain. The previous implementation incorrectly retained unreachable coverage, because it didn't account for the fact that those live counters can belong to another function due to inlining.
2022-07-08Rollup merge of #98718 - yoshuawuyts:stabilize-into-future, r=yaahcMatthias Krüger-2/+0
Stabilize `into_future` https://github.com/rust-lang/rust/issues/67644 has been labeled with [S-tracking-ready-to-stabilize](https://github.com/rust-lang/rust/labels/S-tracking-ready-to-stabilize) - which mentions someone needs to file a stabilization PR. So hence this PR! :sparkles: Thanks! Closes https://github.com/rust-lang/rust/issues/67644 r? ``@joshtriplett``
2022-07-08Rollup merge of #95635 - davidtwco:terminal-width-stabilization, r=oli-obkMatthias Krüger-19/+42
sess: stabilize `--terminal-width` as `--diagnostic-width` Formerly `-Zterminal-width`, `--terminal-width` allows the user or build tool to inform rustc of the width of the terminal so that diagnostics can be truncated. Pending agreement to stabilize, see tracking issue at #84673. r? ```@oli-obk```
2022-07-08Highlight conflicting param-env candidatesMichael Goulet-5/+34
2022-07-08Auto merge of #98482 - cjgillot:short-struct-span-closure, r=estebankbors-1351/+968
Shorten def_span of closures to just their header Continuation of https://github.com/rust-lang/rust/pull/93967.
2022-07-08add `#[test]` to functions in test modulesTakayuki Maeda-186/+97
2022-07-07Auto merge of #98360 - estebank:uninit-binding, r=oli-obkbors-403/+771
On partial uninit error point at where we need init When a binding is declared without a value, borrowck verifies that all codepaths have *one* assignment to them to initialize them fully. If there are any cases where a condition can be met that leaves the binding uninitialized or we attempt to initialize a field of an uninitialized binding, we emit E0381. We now look at all the statements that initialize the binding, and use them to explore branching code paths that *don't* and point at them. If we find *no* potential places where an assignment to the binding might be missing, we display the spans of all the existing initializers to provide some context. Fix https://github.com/rust-lang/rust/issues/97956.
2022-07-07diagnostics: suggest naming a field after failing to parseMichael Howell-5/+14
2022-07-07diagnostics: mention the `:` token when struct fields fail to parseMichael Howell-7/+7
2022-07-07fix arm testEsteban Küber-6/+10
2022-07-07Wording tweakEsteban Küber-18/+24
2022-07-07Fix label on uninit binding field assignmentEsteban Küber-6/+6
2022-07-07Avoid misleading message/label in `match-cfg-fake-edges.rs` testEsteban Küber-2/+5
2022-07-07Add test for `for` loop maybe initializing bindingEsteban Küber-0/+20
2022-07-07Review comments: wordingEsteban Küber-31/+34
2022-07-07Tweak wording and spansEsteban Küber-302/+300
2022-07-07On partial uninit error point at where we need initEsteban Küber-397/+731
When a binding is declared without a value, borrowck verifies that all codepaths have *one* assignment to them to initialize them fully. If there are any cases where a condition can be met that leaves the binding uninitialized or we attempt to initialize a field of an unitialized binding, we emit E0381. We now look at all the statements that initialize the binding, and use them to explore branching code paths that *don't* and point at them. If we find *no* potential places where an assignment to the binding might be missing, we display the spans of all the existing initializers to provide some context.
2022-07-07Track implicit `Sized` obligations in type paramsEsteban Küber-112/+174
Suggest adding a `?Sized` bound if appropriate on E0599 by inspecting the HIR Generics. (Fix #98539)
2022-07-07Rollup merge of #99004 - TaKO8Ki:add-test-for-70408, r=Mark-SimulacrumMatthias Krüger-0/+13
Add a test for #70408 closes #70408
2022-07-07Rollup merge of #99002 - fee1-dead-contrib:sugg_derive, r=michaelwoeristerMatthias Krüger-5/+5
suggest adding a derive for #[default] applied to variants cc ``@TaKO8Ki`` as followup to #98873.
2022-07-07Rollup merge of #98995 - TaKO8Ki:add-test-for-80471, r=Mark-SimulacrumMatthias Krüger-0/+31
Add a test for #80471 Tests #80471, but doesn't close it, see https://github.com/rust-lang/rust/issues/80471#issuecomment-1177658967.
2022-07-07Rollup merge of #98979 - RalfJung:more-alloc-range, r=oli-obkMatthias Krüger-1/+1
interpret: use AllocRange in UninitByteAccess also use nice new format string syntax in `interpret/error.rs`, and use the `#` flag to add `0x` prefixes where applicable. r? ``@oli-obk``
2022-07-07Rollup merge of #98844 - cjgillot:deep-visit, r=jyn514Matthias Krüger-60/+60
Reword comments and rename HIR visiting methods. Sparked by this discussion in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Confused.20by.20comment.20on.20.60deep_visit_item_likes_in_module.60) r? ``@jyn514`` ``@camsteffen``
2022-07-07Add test for #98539Esteban Küber-0/+69
2022-07-07Reword comments and rename HIR visiting methods.Camille GILLOT-60/+60
2022-07-07Rollup merge of #98973 - GuillaumeGomez:inherent-impl-anchors, r=notriddleDylan DPC-0/+56
Remove (unused) inherent impl anchors This is something `@notriddle` realized a few days ago: we have unused anchors in the DOM. This PR removes them. You can test it [here](https://rustdoc.crud.net/imperio/inherent-impl-anchors/foo/index.html). r? `@notriddle`
2022-07-07Rollup merge of #98901 - davidtwco:split-dwarf-incr-workproduct, ↵Dylan DPC-0/+25
r=michaelwoerister incr: cache dwarf objects in work products Cache DWARF objects alongside object files in work products when those exist so that DWARF object files are available for thorin in packed mode in incremental scenarios. r? `@michaelwoerister`
2022-07-07Rollup merge of #96856 - DrMeepster:fix_projection_validation, r=IcnrDylan DPC-2/+2
Fix ProjectionElem validation `TypeChecker::visit_projection_elem` was not actually being called.
2022-07-07`UnsafeCell` now has no niches, ever.Oli Scherer-442/+22
2022-07-07Bless coverage reports.Camille GILLOT-11/+11
2022-07-07Bless MSVC debuginfo.Camille GILLOT-2/+2
2022-07-07Bless aarch64 test.Camille GILLOT-1/+1
2022-07-07Fix borrowck closure span.Camille GILLOT-35/+82
2022-07-07Bless codegen test.Camille GILLOT-2/+2
2022-07-07Shorten span for closures.Camille GILLOT-1319/+889
2022-07-07add a test for #70408Takayuki Maeda-0/+13