about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2022-12-22Move z-crate-attr test to the attributes dirYuki Okushi-0/+0
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-22Add regression test for #99647Yuki Okushi-0/+15
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-22Auto merge of #106025 - matthiaskrgr:rollup-vz5rqah, r=matthiaskrgrbors-4/+93
Rollup of 6 pull requests Successful merges: - #105837 (Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity) - #105932 (Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15) - #105960 (Various cleanups) - #105985 (Method chain nitpicks) - #105996 (Test that async blocks are `UnwindSafe`) - #106012 (Clarify that raw retags are not permitted in Mir) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-22Suggest associated const on capitalization errorMichael Goulet-0/+72
2022-12-22Auto merge of #106023 - JohnTitor:rollup-k8mettz, r=JohnTitorbors-0/+29
Rollup of 8 pull requests Successful merges: - #105584 (add assert messages if chunks/windows are length 0) - #105602 (interpret: add read_machine_[ui]size convenience methods) - #105824 (str.lines() docstring: clarify that line endings are not returned) - #105980 (Refer to "Waker" rather than "RawWaker" in `drop` comment) - #105986 (Fix typo in reading_half_a_pointer.rs) - #105995 (Add regression test for #96530) - #106008 (Sort lint_groups in no_lint_suggestion) - #106014 (Add comment explaining what the scrape-examples-toggle.goml GUI test is about) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-22Rollup merge of #105996 - Swatinem:async-is-unwindsafe, r=petrochenkovMatthias Krüger-0/+68
Test that async blocks are `UnwindSafe` This was a regression from the reverted #105250 which is now covered by a test.
2022-12-22Rollup merge of #105985 - compiler-errors:method-chain-nitpicks, r=estebankMatthias Krüger-4/+4
Method chain nitpicks Just fixing some little things I didn't see in review from that method chain PR. r? `@estebank`
2022-12-22Rollup merge of #105837 - compiler-errors:issue-105728, r=estebankMatthias Krüger-0/+21
Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity These expressions are just used for their spans, so make it best-effort here. Fixes #105728
2022-12-22Rollup merge of #105995 - JohnTitor:issue-96530, r=compiler-errorsYuki Okushi-0/+29
Add regression test for #96530 Closes #96530 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-21Update track_caller tests; run fmtBryan Garza-15/+7
2022-12-21Auto merge of #105613 - Nilstrieb:rename-assert_uninit_valid, r=RalfJungbors-3/+3
Rename `assert_uninit_valid` intrinsic It's not about "uninit" anymore but about "filling with 0x01 bytes" so the name should at least try to reflect that. This is actually not fully correct though, as it does still panic for all uninit with `-Zstrict-init-checks`. I'm not sure what the best way is to deal with that not causing confusion. I guess we could just remove the flag? I don't think having it makes a lot of sense anymore with the direction that we have chose to go. It could be relevant again if #100423 lands so removing it may be a bit over eager. r? `@RalfJung`
2022-12-21Test the borrowck behavior of if-let guardsLéo Lanteri Thauvin-62/+645
2022-12-21Give opaque types a better coherence errorOli Scherer-1/+1
2022-12-21Test that async blocks are UnwindSafeArpad Borsos-0/+68
This was a regression from the reverted #105250 which is now covered by a test.
2022-12-21Add regression test for #96530Yuki Okushi-0/+29
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-21Substitute things correctlyMichael Goulet-4/+4
2022-12-21forgot a return in drop tracking handle_uninhabited_returnMichael Goulet-11/+91
2022-12-21Improve code based on feedback.Bryan Garza-23/+7
This patch improves the readability of some of the code by using if-let-chains. Also, make use of the `add_feature_diagnostics` function.
2022-12-21Update track_caller logic/lint after rebaseBryan Garza-7/+12
2022-12-21update wording of lintBryan Garza-2/+2
2022-12-21Update code based on PR commentsBryan Garza-102/+40
This patch does the following: - Refactor some repeated lines into a single one - Split the `ungated_async_fn_caller` lint into multiple lines, and make one of those lines only print out on nightly - Use test revisions instead of copying an existing test
2022-12-21Switch `#[track_caller]` back to a no-op unless feature gate is enabledBryan Garza-0/+111
This patch fixes a regression, in which `#[track_caller]`, which was previously a no-op, was changed to actually turn on the behavior. This should instead only happen behind the `closure_track_caller` feature gate. Also, add a warning for the user to understand how their code will compile depending on the feature gate being turned on or not. Fixes #104588
2022-12-20Rollup merge of #105897 - oli-obk:tait_patterns, r=TaKO8KiMatthias Krüger-0/+10
Fix an opaque type ICE fixes #104551 The issue is that if you have ```rust type T = impl Sized; let (_a, _b): T = .. ``` we have only the type annotation `T`, but want to use that ascription for `_a` and `_b`, so what we generate is a type ascription plus a field projection saying `_a`'s type is `T::0`. Of course `T` has no fields. Of course we could also not generate type annotations for projections into opaque types at all, but that's more fragile, as we now have to make sure that https://github.com/rust-lang/rust/blob/12bbdbdb440119a0b86d2ee742ec1460cdb2c5b9/compiler/rustc_mir_build/src/build/matches/mod.rs#L709 doesn't have any arm that introduces a user type annotation except for `PatKind::Binding`.
2022-12-20Rollup merge of #105791 - Ezrashaw:add-e0472-long-docs, r=GuillaumeGomezMatthias Krüger-0/+2
docs: add long error explanation for error E0472 Add long-form error docs for E0472: "inline assembly not supported on this target" and update UI tests. R? `@GuillaumeGomez`
2022-12-20Re-enable fn trait call notation errorMichael Goulet-0/+26
2022-12-20Hackily fix an opaque type ICEOli Scherer-0/+10
2022-12-20Rollup merge of #105945 - JohnTitor:issue-57404, r=compiler-errorsMatthias Krüger-0/+23
Add regression test for #57404 r? `@compiler-errors` Closes https://github.com/rust-lang/rust/issues/57404 Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20Rollup merge of #105944 - JohnTitor:issue-80816, r=compiler-errorsMatthias Krüger-0/+81
Add regression test for #80816 Closes #80816 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20Rollup merge of #105943 - JohnTitor:issue-102206, r=compiler-errorsMatthias Krüger-0/+31
Add regression test for #102206 Closes #102206 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20Add regression test for #57404Yuki Okushi-0/+23
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20Add regression test for #80816Yuki Okushi-0/+81
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20Add regression test for #102206Yuki Okushi-0/+31
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20docs: add long error explanation for error E0472Ezra Shaw-0/+2
2022-12-20Rollup merge of #105935 - Ezrashaw:add-test+docs-for-e0377, r=GuillaumeGomezMatthias Krüger-0/+23
docs/test: add UI test and long-form error docs for `E0377`
2022-12-20docs/test: add UI test and long-form error docs for `E0377`Ezra Shaw-0/+23
2022-12-20Auto merge of #105575 - compiler-errors:impl-wf-lint, r=oli-obkbors-0/+75
Add `IMPLIED_BOUNDS_ENTAILMENT` lint Implements a lint (#105572) version of the hard-error introduced in #105483. Context is in that PR. r? `@lcnr` cc `@oli-obk` who had asked for this to be a lint first Not sure if this needs to be an FCP, since it's a lint for now.
2022-12-20Auto merge of #105918 - matthiaskrgr:rollup-mmazd62, r=matthiaskrgrbors-23/+70
Rollup of 7 pull requests Successful merges: - #105801 (Realistic `Path::as_mut_os_str` doctest) - #105860 (Add long error docs for `E0460` and `E0457`) - #105895 (Test that we don't add a new kind of breaking change with TAITs) - #105902 (docs: improve pin docs) - #105910 (Update books) - #105913 (rustdoc: remove width-limiter from source pages, stop overriding CSS) - #105915 (Revert "Replace usage of `ResumeTy` in async lowering with `Context`") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-19Rollup merge of #105915 - andrewpollack:revert-105250-async-rm-resumety, ↵Matthias Krüger-23/+16
r=tmandry Revert "Replace usage of `ResumeTy` in async lowering with `Context`" Reverts rust-lang/rust#105250 Fixes: #105501 Following instructions from [forge](https://forge.rust-lang.org/compiler/reviews.html#reverts). This change introduced a breaking change that is not actionable nor relevant, and is blocking updates to our toolchain. Along with other comments on the CL marking issues that are fixed by reverts, reverting is best until these issues can be resolved cc. `@Swatinem`
2022-12-19Rollup merge of #105895 - oli-obk:tait_coherence, r=lcnrMatthias Krüger-0/+46
Test that we don't add a new kind of breaking change with TAITs r? ``@lcnr``
2022-12-19Rollup merge of #105860 - Ezrashaw:add-long-errors-0460-0457, ↵Matthias Krüger-0/+8
r=jruderman,GuillaumeGomez Add long error docs for `E0460` and `E0457` Final docs for errors in #61137 that have UI tests, my next PRs will also add these tests. r? ``@GuillaumeGomez``
2022-12-19Revert "Replace usage of `ResumeTy` in async lowering with `Context`"Andrew Pollack-23/+16
2022-12-19add non-regression test for issue 105809Rémy Rakic-0/+36
2022-12-19Downgrade IMPLIED_BOUNDS_ENTAILMENT to warn by default, add it to builtin ↵Michael Goulet-26/+16
lint list
2022-12-19Add IMPLIED_BOUNDS_ENTAILMENT lintMichael Goulet-0/+85
2022-12-19implement the skeleton of the updated trait solverlcnr-0/+54
2022-12-19add function to tell if the current ambiguity error matches a previous one ↵Yiming Lei-54/+8
in ambiguity_errors if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same then these 2 ambiguity errors matched prevent identical ambiguity error from pushing into vector of ambiguity_errors this will fix #105177
2022-12-19Revert "Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr"Rémy Rakic-76/+0
This reverts commit 03770f0e2b60c02db8fcf52fed5fb36aac70cedc, reversing changes made to 01ef4b21dc5251b58bd9c6fd6face2ae95d56da1.
2022-12-19Test that we don't add a new kind of breaking change with TAITsOli Scherer-0/+46
2022-12-19Rollup merge of #105882 - compiler-errors:issue-105832, r=jackh726Dylan DPC-0/+32
Don't ICE in closure arg borrow suggestion Fixes #105832
2022-12-19Rollup merge of #105839 - LegionMammal978:mut-upvar-not-send, r=lcnrDylan DPC-0/+81
Suggest a `T: Send` bound for `&mut T` upvars in `Send` generators Right now, we suggest a `T: Sync` bound for both `&T` and `&mut T` upvars. A user on URLO [found this confusing](https://users.rust-lang.org/t/error-complains-about-missing-sync-but-send-is-whats-missing/86021), so I wrote this quick fix to look at the mutability before making the suggestion.