about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
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-21Add regression test for #96530Yuki Okushi-0/+29
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
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-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-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.
2022-12-18Rollup merge of #105842 - compiler-errors:arg-name-sugg, r=petrochenkovMatthias Krüger-7/+7
print argument name in arg mismatch if possible A bit more contextual than just `/* value */`, at least when the argument is named something related to its context. The UI test cases are... not super convincing, but also they're minimized tests.
2022-12-18Rollup merge of #105447 - TaKO8Ki:add-test-for-103095, r=petrochenkovMatthias Krüger-0/+30
Add a test for #103095 closes #103095
2022-12-18Rollup merge of #105419 - YC:issue-41731, r=petrochenkovMatthias Krüger-0/+106
Add tests for #41731 Closes #41731
2022-12-18Don't ICE in closure arg borrow suggestionMichael Goulet-0/+32
2022-12-19docs: add long-form error-code docs for E0460Ezra Shaw-0/+8
2022-12-18Auto merge of #104417 - mejrs:mir_build, r=davidtwcobors-11/+11
Migrate rustc_mir_build diagnostics Rebases https://github.com/rust-lang/rust/pull/100854 ~~The remaining issue is how to better resolve https://github.com/rust-lang/rust/commit/72bea68af4ee2a41c44998916f6a789163f12e7d~~ ~~The diagnostic macros seems to generate a broken diagnostic, and I couldn't figure out how to manually format the fluent message, so I hardcoded the format string for now. I'd like pointers to a better fix for this.~~ Also, I'm not 100% sure I didn't mess up a rebase somewhere 🙂 r? `@davidtwco`
2022-12-17Rollup merge of #105792 - Ezrashaw:add-e0320-long-docs, r=GuillaumeGomezMatthias Krüger-0/+4
docs: add long error explanation for error E0320 Continuation of #105791 r? ``@GuillaumeGomez``
2022-12-17print argument name in arg mismatch if possibleMichael Goulet-7/+7
2022-12-17Suggest a `T: Send` bound for `&mut T` upvars in `Send` generatorsMatthew House-0/+81
2022-12-17Try to fix ICEmejrs-11/+11
2022-12-17Auto merge of #105800 - lqd:dylib-thinlto, r=bjorn3bors-0/+52
Don't copy symbols from dylibs with `-Zdylib-lto` When `rustc_driver` started being built with `-Zdylib-lto -Clto=thin`, some libstd symbols were copied by the LTO process into the dylib. That causes duplicate local symbols that are not present otherwise. Depending on the situation (lib loading order apparently), the duplicated symbols could cause issues: `rustc_driver` overrode the panic hook, but it didn't apply to rustc main's hook (the default from libstd). This is the cause of #105637, in some situations the panic hook installed by `rustc_driver` isn't executed, and only libstd's backtrace is shown (and a double panic). The query stack, as well as the various notes to open a GH about the ICE, don't appear. It's not clear exactly what is needed to trigger the issue, but I have simulated a reproducer [here](https://github.com/lqd/issue-105637) with cargo involved, the incorrect panic hook is executed on my machine. It is hard to reproduce in a unit test: `cargo run` + `rustup` involves LD_LIBRARY_PATH, which is not the case for `compiletest`. cargo also adds unconditional flags that are then overridden in [`bootstrap` when building rustc with `rust.lto = thin`](https://github.com/rust-lang/rust/blob/9c07efe84f28a44f3044237696acc295aa407ee5/src/bootstrap/compile.rs#L702-L714) as done on CI). All this to say the compilation and execution environment in `bootstrap` leading to the bug building `rustc_driver` is different from our UI tests, and I believe one of the reasons it's hard to make an exact reproducer test. Thankfully there's _still_ a difference in the behavior though: although in the unit test the correct panic hook seems to be executed compared to my repro and the current nightly, only the fix removes the double panic here. The `7e8277aefa12f1469fb1df01418ff5846a7854a9` `try` build: - fixes the reproducer repo linked above - restores the ICE messages from https://github.com/rust-lang/rust/issues/105321 back to the state in its OP compared to the description in https://github.com/rust-lang/rust/issues/105637 - restores the ICE message and the query stack from https://github.com/rust-lang/rust/issues/105777 compared to nightly While I believe this technically fixes the P-critical issue https://github.com/rust-lang/rust/issues/105637, I would not want to close it yet as we may want to backport to beta/stable (if a point release happens, it would fix the ICEs reported on 1.66.0, which is built with ThinLTO on linux). Once this PR lands, I'll also open another PR to re-enable ThinLTO on x64 darwin's dist builder.
2022-12-17Auto merge of #105421 - jacobbramley:jb/branch-prot-check, r=nagisabors-2/+2
Check AArch64 branch-protection earlier in the pipeline. As suggested in #93516. r? `@nagisa`
2022-12-17Rollup merge of #105785 - JohnTitor:issue-55976-2, r=compiler-errorsMatthias Krüger-0/+13
Add regression test for #55976 Closes #55976 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-17Auto merge of #105804 - matthiaskrgr:rollup-iaqlbl3, r=matthiaskrgrbors-0/+88
Rollup of 6 pull requests Successful merges: - #105493 (Help rust-analyzer normalize query return types) - #105710 (Don't bug if we're trying to cast `dyn*` to another type) - #105711 (bail in `collect_trait_impl_trait_tys` if signatures reference errors) - #105768 (Detect inherent associated types not having CamelCase) - #105780 (rustdoc: Don't add "Read more" link if there is no extra content) - #105802 (Make enum-match.rs test robust against variable name changes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-17Rollup merge of #105768 - fee1-dead-contrib:iat-style, r=eholkMatthias Krüger-0/+26
Detect inherent associated types not having CamelCase Fixes #105341.
2022-12-17Rollup merge of #105711 - compiler-errors:rpitit-references-errors, r=eholkMatthias Krüger-0/+42
bail in `collect_trait_impl_trait_tys` if signatures reference errors Fixes #105290
2022-12-17Rollup merge of #105710 - compiler-errors:dyn-star-rigid-cast, r=eholkMatthias Krüger-0/+20
Don't bug if we're trying to cast `dyn*` to another type Fixes #105097
2022-12-16Auto merge of #102318 - Amanieu:default_alloc_error_handler, r=oli-obkbors-101/+34
Stabilize default_alloc_error_handler Tracking issue: #66741 This turns `feature(default_alloc_error_handler)` on by default, which causes the compiler to automatically generate a default OOM handler which panics if `#[alloc_error_handler]` is not provided. The FCP completed over 2 years ago but the stabilization was blocked due to an issue with unwinding. This was fixed by #88098 so stabilization can be unblocked. Closes #66741
2022-12-16add simulated non-regression test for issue 105637Rémy Rakic-0/+52
2022-12-17docs: add long error explanation for error E0320Ezra Shaw-0/+4
2022-12-16Auto merge of #105775 - matthiaskrgr:rollup-2o8qn7e, r=matthiaskrgrbors-67/+98
Rollup of 8 pull requests Successful merges: - #105725 (Allow `impl ~const Trait` opaque types) - #105744 (Rewrite `E0158` error-code docs for clarity) - #105747 (Fix ICE calling method on auto trait) - #105748 (doc: Fix a few small issues) - #105756 (rustdoc: simplify CSS for codeblock tooltips) - #105757 (rustdoc: remove unused CSS `.sub-settings`) - #105764 (rustdoc: name the source page sidebar-toggle `#src-sidebar-toggle`) - #105774 (Remove unused stderr files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-16Detect inherent associated types not having CamelCaseDeadbeef-0/+26
Fixes #105341.
2022-12-16Rollup merge of #105774 - TaKO8Ki:remove-unused-stderr-files, r=tmiaskoMatthias Krüger-16/+0
Remove unused stderr files