summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2021-06-14regression test for issue 85713.Felix S. Klock II-0/+21
2021-06-14Revert "Allow specifying alignment for functions"Felix S. Klock II-40/+41
This reverts commit 448d07683a6defd567996114793a09c9a8aef5df to address issue 85713 on beta.
2021-06-11Preserve `SyntaxContext` for invalid/dummy spans in crate metadataAaron Hill-0/+68
Fixes #85197 We already preserved the `SyntaxContext` for invalid/dummy spans in the incremental cache, but we weren't doing the same for crate metadata. If an invalid (lo/hi from different files) span is written to the incremental cache, we will decode it with a 'dummy' location, but keep the original `SyntaxContext`. Since the crate metadata encoder was only checking for `DUMMY_SP` (dummy location + root `SyntaxContext`), the metadata encoder would treat it as a normal span, encoding the `SyntaxContext`. As a result, the final span encoded to the metadata would change across sessions, even if the crate itself was unchanged. This PR updates our encoding of spans in the crate metadata to mirror the encoding of spans into the incremental cache. We now always encode a `SyntaxContext`, and encode location information for spans with a non-dummy location.
2021-06-11Build crtbengin.o/crtend.o from source code12101111-0/+32
2021-06-11Fix incorrect gating of nonterminals in key-value attributesAaron Hill-0/+30
Fixes #85432 When processing a `#[derive]` or `#[cfg_eval]` attribute, we need to re-parse our attribute target, which requires flattenting all `Nonterminals`. However, this caused us to incorrectly gate on a (flattented) nonterminal in a key-value attribute, which is supposed to be allowed. Since we already perform this gating during the initial parse, we suppress it in `capture_cfg` mode.
2021-06-10Regression test for issue 84297.Felix S. Klock II-0/+9
2021-06-10Change test to use `likely`/`unlikely` instead of `copy`/`copy_overlapping`.Felix S. Klock II-7/+7
Test was added in PR #84404. The intent here is: The `copy`/`copy_overlapping` intrinsics are going through some flip-flopping now of "are they intrinsics or not". We can achieve the same effect that the test intended by using `likely`/`unlikely`.
2021-06-10Remove tests that were also added in PR 79684.Felix S. Klock II-75/+0
2021-06-10Revert PRs 81238 and 82967 (which made copy and copy_nonoverlapping intrinsics).Felix S. Klock II-114/+0
This is to address issue 84297.
2021-06-09Auto merge of #86036 - nikic:disable-mutable-noalias, r=Mark-Simulacrumbors-3/+3
[beta] Disable mutable noalias for Rust 1.53 Disable mutable noalias for the upcoming release to give this change more time to bake. I believe that was the consensus, and I wanted to make sure we don't forget :) r? `@Mark-Simulacrum`
2021-06-05Disable mutable noalias for Rust 1.53Nikita Popov-3/+3
2021-06-01no thir-unsafeck in betaFelix S Klock II-2/+0
remove testing via `-Z thir-unsafeck`, since it is not appropriate for beta branch.
2021-06-01Regression test for issue 85435.Felix S. Klock II-0/+27
Apply suggestions from code review: 1. (removing confusing comment from my test, since the comment reflects the bad undesirable behavior that is being fixed here.) 2. test THIR unsafeck too. Co-authored-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com>
2021-05-22Disallows `#![feature(no_coverage)]` on stable and betaRich Kadel-43/+10
using allow_internal_unstable (as recommended) Fixes: #84836 ```shell $ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc src/test/run-make-fulldeps/coverage/no_cov_crate.rs error[E0554]: `#![feature]` may not be used on the dev release channel --> src/test/run-make-fulldeps/coverage/no_cov_crate.rs:2:1 | 2 | #![feature(no_coverage)] | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0554`. ```
2021-05-22Do not ICE on invalid const paramEsteban Küber-0/+35
When encountering a path that can't have generics, do not call `generics_of`. This would happen when writing something like `path::this_is_a_mod<const_val>`. Fix #84831.
2021-05-06Account for unsatisfied bounds in E0599Esteban Küber-2/+25
Fix #84769, follow up to #84499, #83667.
2021-05-06Deduplicate ParamCandidates with the same value except for bound varsJack Huey-0/+20
2021-05-05Revert PR 83866Pietro Albini-12/+0
That PR caused multiple test failures when Rust's channel is changed from nightly to anything else. The commit will have to be landed again after the test suite is fixed.
2021-05-04Revert PR 81473 to resolve (on beta) issues 81626 and 81658.Felix S. Klock II-114/+0
Revert "Add missing brace" This reverts commit 85ad773049536d7fed9a94ae0ac74f97135c8655. Revert "Simplify base_expr" This reverts commit 899aae465eb4ef295dc1eeb2603f744568e0768c. Revert "Warn write-only fields" This reverts commit d3c69a4c0dd98af2611b7553d1a65afef6a6ccb0.
2021-05-04Remove assert_matches usersMark Rousskov-11/+0
2021-05-04regression test for issue 82465.Felix S. Klock II-0/+16
2021-05-04manually crafted revert of PR #80653, to address issue #82465.Felix S. Klock II-83/+2
(update: placated tidy)
2021-05-04Update fulldeps testMark Rousskov-29/+18
2021-04-30Update LLVM submoduleAmanieu d'Antras-2/+0
Fixes #84025
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-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-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-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-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`