about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2021-05-02Rollup merge of #84752 - lrh2000:generator-debuginfo, r=tmandryDylan DPC-50/+80
Fix debuginfo for generators First, all fields except the discriminant (including `outer_fields`) should be put into structures inside the variant part, which gives an equivalent layout but offers us much better integration with debuggers. Second, artificial flags in generator variants should be removed. - Literally, variants are not artificial. We have `yield` statements, upvars and inner variables in the source code. - Functionally, we don't want debuggers to suppress the variants. It contains the state of the generator, which is useful when debugging. So they shouldn't be marked artificial. - Debuggers may use artificial flags to find the active variant. In this case, marking variants artificial will make debuggers not work properly. Fixes #62572. Fixes #79009. And refer https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Debuginfo.20for.20generators.
2021-05-02Rollup merge of #84358 - sexxi-goose:print_captures_borrowck_rebased, ↵Dylan DPC-72/+324
r=nikomatsakis Update closure capture error logging for disjoint captures for disjoint captures Improved error logging when `#![feature(capture_disjoint_fields)]` is used. Closes https://github.com/rust-lang/project-rfc-2229/issues/8 Closes https://github.com/rust-lang/project-rfc-2229/issues/36 Closes https://github.com/rust-lang/project-rfc-2229/issues/39 Closes #76005
2021-05-02fix nll test stderrChris Pardy-1/+1
2021-05-02Auto merge of #84638 - mark-i-m:unignore-tests, r=Mark-Simulacrumbors-4/+1
Unignore a couple of tests
2021-05-01Closure capture borrow diagnostics for disjoint capturesChris Pardy-71/+323
2021-05-01Auto merge of #84410 - BoxyUwU:blue, r=varkorbors-0/+39
Fix generic arg mismatch errors being ignored with explicit late bound lifetimes Fixes #83466 r? `@varkor`
2021-05-01Auto merge of #83114 - cjgillot:hop, r=eddybbors-16/+13
Move HIR parenting information out of hir_owner Split out of #82681. The parent of a HIR node and its content are currently bundled together, but are rarely used together. This PR separates both information in two distinct queries for HIR owners. This reduces incremental invalidation for HIR items that appear within a function body when this body (and the local ids) changes.
2021-05-01test: *sneezes*Ellen-0/+39
2021-05-01Auto merge of #83857 - ABouttefeux:master, r=jyn514bors-0/+58
added --no-run option for rustdoc resolve #59053 add `--no-run` option for `rustdoc` for compiling doc test but not running them. Intended for use with `--persist-doctests`.
2021-05-01Auto merge of #84658 - Amanieu:reserved_regs, r=petrochenkovbors-4/+4
Be stricter about rejecting LLVM reserved registers in asm! LLVM will silently produce incorrect code if these registers are used as operands. cc `@rust-lang/wg-inline-asm`
2021-05-01Apply suggestions from code reviewAliénore Bouttefeux-1/+2
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-05-01Auto merge of #84582 - richkadel:issue-84561, r=tmandrybors-16/+639
Vastly improves coverage spans for macros Fixes: #84561 This resolves problems where macros like `trace!(...)` would show zero coverage if tracing was disabled, and `assert_eq!(...)` would show zero coverage if the assertion did not fail, because only one coverage span was generated, for the branch. This PR started with an idea that I could just drop branching blocks with same span as expanded macro. (See the fixed issue for more details.) That did help, but it didn't resolve everything. I also needed to add a span specifically for the macro name (plus `!`) to ensure the macro gets coverage even if it's internal expansion adds conditional branching blocks that are retained, and would otherwise drop the outer span. Now that outer span is _only_ the `(argument, list)`, which can safely be dropped now), because the macro name has its own span. While testing, I also noticed the spanview debug output can cause an ICE on a function with no body. The workaround for this is included in this PR (separate commit). r? `@tmandry` cc? `@wesleywiser`
2021-04-30Remove artificial flag from generator variantslrh2000-45/+75
- Literally, variants are not artificial. We have `yield` statements, upvars and inner variables in the source code. - Functionally, we don't want debuggers to suppress the variants. It contains the state of the generator, which is useful when debugging. So they shouldn't be marked artificial. - Debuggers may use artificial flags to find the active variant. In this case, marking variants artificial will make debuggers not work properly. Fixes #79009.
2021-04-30Update LLVM submoduleAmanieu d'Antras-2/+0
Fixes #84025
2021-04-30error when --no-run is present without --testAliénore Bouttefeux-0/+7
2021-04-30Move outer fields of enums into variant parts in debuginfolrh2000-10/+10
All fields except the discriminant (including `outer_fields`) should be put into structures inside the variant part, which gives an equivalent layout but offers us much better integration with debuggers.
2021-04-30Rebuilt out of date tests and fixed an old bug now exposedRich Kadel-5/+250
2021-04-30Auto merge of #84401 - crlf0710:impl_main_by_path, r=petrochenkovbors-24/+140
Implement RFC 1260 with feature_name `imported_main`. This is the second extraction part of #84062 plus additional adjustments. This (mostly) implements RFC 1260. However there's still one test case failure in the extern crate case. Maybe `LocalDefId` doesn't work here? I'm not sure. cc https://github.com/rust-lang/rust/issues/28937 r? `@petrochenkov`
2021-04-29Rollup merge of #84682 - jackh726:transitive_bounds_rebind, r=nikomatsakisJack Huey-0/+23
Don't rebind in `transitive_bounds_that_define_assoc_type` Fixes #83737 Fixes #84604 Also fixes another issue that I don't have a test for, popped up in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236570445) r? `````@nikomatsakis`````
2021-04-29Auto merge of #84708 - pnkfelix:revert-77885-everywhere, r=Mark-Simulacrumbors-44/+0
Revert PR 77885 everywhere Change to probe-stack=call (instead of inline-or-call) everywhere again, for now. We had already reverted the change on stable back in PR #83412. Since then, we've had some movement on issue #83139, but not a 100% fix. But also since then, we had bug reported, issue #84667, that looks like outright codegen breakage, rather than problems confined to debuginfo issues. So we are reverting PR #77885 on stable and beta. We'll reland PR #77885 (or some variant) switching back to an LLVM-dependent selection of out-of-line call vs inline-asm, after these other issues have been resolved.
2021-04-29Move parenting info to index_hir.Camille GILLOT-16/+13
2021-04-29Remove tests introduced or cahnged by PR #77885, which is reverted in this PR.Felix S. Klock II-44/+0
2021-04-29Auto merge of #84556 - RalfJung:const-fn-trait-bound, r=oli-obkbors-121/+81
use correct feature flag for impl-block-level trait bounds on const fn I am not sure what that special hack was needed for, but it doesn't seem needed any more... This removes the last use of the `const_fn` feature flag -- Cc https://github.com/rust-lang/rust/issues/84510 r? `@oli-obk`
2021-04-29Auto merge of #84233 - jyn514:track-path-prefix, r=michaelwoeristerbors-3/+6
Add TRACKED_NO_CRATE_HASH and use it for `--remap-path-prefix` I verified locally that this fixes https://github.com/rust-lang/rust/issues/66955. r? `@Aaron1011` (feel free to reassign)
2021-04-29Add integration test for `--remap-pathh-prefix`Joshua Nelson-3/+6
2021-04-29re-bless on 32bitRalf Jung-7/+7
2021-04-29Auto merge of #84618 - lrh2000:fix-gdb-10-str, r=Mark-Simulacrumbors-8/+7
Fix failed tests related to pointer printing when using GDB 10 As mentioned in #79009, there are four failed debuginfo test cases when using GDB 10. This PR fixes two of them, which fail because GDB 10 won't print pointers as string anymore. We can use `printf` as a workaround. It should work regardless of the version of GDB. Refer this [comment] for more details. [comment]: https://github.com/rust-lang/rust/issues/79009#issuecomment-826952708
2021-04-29remove const_fn feature gate from const testsRalf Jung-105/+69
2021-04-29don't let const_fn feature flag affect impl-block-level trait boundsRalf Jung-9/+5
2021-04-28addressed review feedbackRich Kadel-6/+38
2021-04-28More improvements to macro coverageRich Kadel-104/+254
2021-04-28Drop branching blocks with same span as expanded macroRich Kadel-0/+196
Fixes: #84561
2021-04-28Rollup merge of #84646 - JohnTitor:add-some-bad-placeholder-tests, r=Dylan-DPCJack Huey-0/+108
Add some regression tests related to #82494 Closes #75883, closes #80779 r? ````@estebank````
2021-04-28Rollup merge of #84636 - notriddle:data-aliases, r=jyn514,GuillaumeGomezJack Huey-1/+1
rustdoc: change aliases attribute to data-aliases The "aliases" attribute is not listed [on MDN], so it sounds like it's rustdoc-specific. We don't want to conflict with any attributes that are added to the spec in the future. [on MDN]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
2021-04-28fix testmark-0/+1
2021-04-29Implement RFC 1260 with feature_name `imported_main`.Charles Lew-24/+140
2021-04-28Auto merge of #83386 - mark-i-m:stabilize-pat2015, r=nikomatsakisbors-72/+41
Stabilize `:pat_param` and remove `:pat2021` Blocked on #83384 cc `@rust-lang/lang` #79278 If I understand `@nikomatsakis` in https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/or.20patterns/near/231133873, another FCP is not needed. r? `@nikomatsakis`
2021-04-28Be stricter about rejecting LLVM reserved registers in asm!Amanieu d'Antras-4/+4
2021-04-28rustdoc: update auto_aliases test case with data-aliases attributeMichael Howell-1/+1
2021-04-28Add HAS_RE_LATE_BOUND if there are bound varsJack Huey-0/+23
2021-04-28Auto merge of #84562 - richkadel:issue-83601, r=tmandrybors-1/+130
Adds feature-gated `#[no_coverage]` function attribute, to fix derived Eq `0` coverage issue #83601 Derived Eq no longer shows uncovered The Eq trait has a special hidden function. MIR `InstrumentCoverage` would add this function to the coverage map, but it is never called, so the `Eq` trait would always appear uncovered. Fixes: #83601 The fix required creating a new function attribute `no_coverage` to mark functions that should be ignored by `InstrumentCoverage` and the coverage `mapgen` (during codegen). Adding a `no_coverage` feature gate with tracking issue #84605. r? `@tmandry` cc: `@wesleywiser`
2021-04-28Auto merge of #83401 - fee1-dead:master, r=davidtwcobors-0/+44
Fix ICE of for-loop mut borrowck where no suggestions are available Fixes #83309.
2021-04-28Add a regression test for #80779Yuki Okushi-0/+34
2021-04-28Add a regression test for #75883Yuki Okushi-0/+74
2021-04-28Auto merge of #84644 - JohnTitor:rollup-nzq9rjz, r=JohnTitorbors-28/+355
Rollup of 5 pull requests Successful merges: - #84529 (Improve coverage spans for chained function calls) - #84616 (Fix empty dom toggle) - #84622 (Make traits with GATs not object safe) - #84624 (Make sentence in env::args_os' docs plain and simple) - #84642 (Stabilize vec_extend_from_within) Failed merges: - #84636 (rustdoc: change aliases attribute to data-aliases) r? `@ghost` `@rustbot` modify labels: rollup
2021-04-28Rollup merge of #84622 - jackh726:gats-trait-object, r=nikomatsakisYuki Okushi-21/+160
Make traits with GATs not object safe Closes #81823 r? `@nikomatsakis`
2021-04-28Rollup merge of #84616 - GuillaumeGomez:fix-empty-dom-toggle, r=jshaYuki Okushi-5/+24
Fix empty dom toggle Currently, the empty impl blocks have toggles: ![Screenshot from 2021-04-27 15-15-03](https://user-images.githubusercontent.com/3050060/116249703-5ee0d980-a76d-11eb-9e15-738c06e4fb1b.png) So when you expand it, nothing happens: ![Screenshot from 2021-04-27 15-15-07](https://user-images.githubusercontent.com/3050060/116249746-686a4180-a76d-11eb-8dc1-221ca0ac57c5.png) So now, in case the impl block is empty, we simply don't generate the details/summary wrapping (which also makes DOM lighter, yeay!): ![Screenshot from 2021-04-27 15-14-15](https://user-images.githubusercontent.com/3050060/116249825-7a4be480-a76d-11eb-9637-b26151311ebd.png) r? `@jsha`
2021-04-28Rollup merge of #84529 - richkadel:issue-84180, r=tmandryYuki Okushi-2/+171
Improve coverage spans for chained function calls Fixes: #84180 For chained function calls separated by the `?` try operator, the function call following the try operator produced a MIR `Call` span that matched the span of the first call. The `?` try operator started a new span, so the second call got no span. It turns out the MIR `Call` terminator has a `func` `Operand` for the `Constant` representing the function name, and the function name's Span can be used to reset the starting position of the span. r? `@tmandry` cc: `@wesleywiser`
2021-04-28Auto merge of #83713 - spastorino:revert-pub-macro-rules, r=nikomatsakisbors-170/+24
Revert "Rollup merge of #82296 - spastorino:pubrules, r=nikomatsakis" This reverts commit e2561c58a41023a14e0e583113dcf55e1ecb236a, reversing changes made to 2982ba50fc4bb629b8fe4108a81cb2f9b053510b. As discussed in #83641 this feature is not complete and in particular doesn't work cross macros and given that this is not going to be included in edition 2021 nobody seems to be trying to fix the underlying problem. When can add this again I guess, whenever somebody has the time to make it work cross crates. r? `@nikomatsakis`
2021-04-27unignore a couple of testsmark-4/+0