about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2022-07-01Auto merge of #98730 - matthiaskrgr:rollup-2c4d4x5, r=matthiaskrgrbors-6/+62
Rollup of 10 pull requests Successful merges: - #97629 ([core] add `Exclusive` to sync) - #98503 (fix data race in thread::scope) - #98670 (llvm-wrapper: adapt for LLVMConstExtractValue removal) - #98671 (Fix source sidebar bugs) - #98677 (For diagnostic information of Boolean, remind it as use the type: 'bool') - #98684 (add test for 72793) - #98688 (interpret: add From<&MplaceTy> for PlaceTy) - #98695 (use "or pattern") - #98709 (Remove unneeded methods declaration for old web browsers) - #98717 (get rid of tidy 'unnecessarily ignored' warnings) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-01Rollup merge of #98686 - matthiaskrgr:test-46511, r=compiler-errorsMatthias Krüger-0/+29
add ice test for 46511 Fixes #46511 r? ``@compiler-errors``
2022-07-01Rollup merge of #98610 - lcnr:emit_inference_failure_err-ice, r=estebankMatthias Krüger-0/+100
fix `emit_inference_failure_err` ICE fixes #98598 this fix doesn't make me too happy, but :shrug:
2022-06-30fix grammar in useless doc comment lintAndy Russell-1/+1
2022-06-30Specialize a few tests depending on opt-level.Camille GILLOT-40/+56
2022-06-30Allow inlining `#[inline]` functions.Camille GILLOT-44/+33
2022-06-30Test enabling MIR inlinerWesley Wiser-1/+1
2022-06-30Skip inlining if there are normalization issues.Camille GILLOT-61/+0
2022-06-30ui: improve suggestion test by addig the help messageVincenzo Palazzo-15/+37
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-06-30Rollup merge of #98684 - matthiaskrgr:ice-test-72793, r=oli-obkMatthias Krüger-0/+25
add test for 72793 Fixes #72793 r? ````@oli-obk````
2022-06-30Rollup merge of #98677 - lyming2007:issue-98492-fix, r=lcnrMatthias Krüger-6/+37
For diagnostic information of Boolean, remind it as use the type: 'bool' Fixes #98492. It helps programmers coming from other languages modified: compiler/rustc_resolve/src/late/diagnostics.rs
2022-06-30For diagnostic information of Boolean, remind it as use the type: 'bool'Yiming Lei-6/+37
It helps programmers coming from other languages modified: compiler/rustc_resolve/src/late/diagnostics.rs modified: src/test/ui/lint/recommend-literal.rs modified: src/test/ui/lint/recommend-literal.stderr modified: compiler/rustc_resolve/src/late/diagnostics.rs modified: src/test/ui/lint/recommend-literal.rs modified: src/test/ui/lint/recommend-literal.stderr modified: compiler/rustc_resolve/src/late/diagnostics.rs modified: src/test/ui/lint/recommend-literal.rs modified: src/test/ui/lint/recommend-literal.stderr
2022-06-30Stabilize `into_future`Yoshua Wuyts-2/+0
2022-06-30promote placeholder bounds to 'static obligationsNiko Matsakis-1/+52
In NLL, when we are promoting a bound out from a closure, if we have a requirement that `T: 'a` where `'a` is in a higher universe, we were previously ignoring that, which is totally wrong. We should be promoting those constraints to `'static`, since universes are not expressible across closure boundaries.
2022-06-30add ice test for #97047Matthias Krüger-0/+86
Fixes #97047
2022-06-30Make `evaluate_obligation` not succeed unconditionally if it registered new ↵Oli Scherer-2/+4
hidden types for opaque types
2022-06-30lint: port non-fmt-panic diagnosticsDavid Wood-52/+52
Signed-off-by: David Wood <david.wood@huawei.com>
2022-06-30add regression test for #50439Takayuki Maeda-0/+39
2022-06-30Skip ffi-unwind lint test with `-Cpanic=abort`Gary Guo-3/+5
2022-06-30Auto merge of #98691 - matthiaskrgr:rollup-ymsa64p, r=matthiaskrgrbors-171/+367
Rollup of 6 pull requests Successful merges: - #96727 (Make TAIT behave exactly like RPIT) - #98681 (rustdoc-json: Make default value of blanket impl assoc types work) - #98682 (add tests for ICE 94432) - #98683 (add test for ice 68875) - #98685 (Replace `sort_modules_alphabetically` boolean with enum) - #98687 (add test for 47814) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-30ui test: add test of blanklet implementationVincenzo Palazzo-0/+143
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-06-30Rollup merge of #98687 - matthiaskrgr:test_47814, r=compiler-errorsMatthias Krüger-0/+27
add test for 47814 not sure if the issue should actually get closed though, hm r? ``@compiler-errors``
2022-06-30Rollup merge of #98683 - matthiaskrgr:ice-test-68875, r=compiler-errorsMatthias Krüger-0/+19
add test for ice 68875 Fixes #68875
2022-06-30Rollup merge of #98682 - matthiaskrgr:test-94432, r=compiler-errorsMatthias Krüger-0/+10
add tests for ICE 94432 Fixes #94432
2022-06-30Rollup merge of #96727 - oli-obk:no_expect, r=lcnrMatthias Krüger-171/+311
Make TAIT behave exactly like RPIT fixes https://github.com/rust-lang/rust/issues/96552 This makes type-alias-impl-trait behave like return-position-impl-trait. Unfortunately it also causes some cases to stop compiling due to "needing type annotations" and makes panicking cause fallback for the hidden type to `()`. All of these are addressable, but we should probably address them for RPIT and TAIT together r? ``@lcnr``
2022-06-29Auto merge of #98520 - RalfJung:invalid, r=compiler-errorsbors-192/+192
interpret: adjust error from constructing an invalid value
2022-06-29add test for 47814Matthias Krüger-0/+27
not sure if the issue should actually get closed though, hm r? @compiler-errors
2022-06-29add ice test for 46511Matthias Krüger-0/+29
Fixes #46511
2022-06-29add test for 72793Matthias Krüger-0/+25
Fixes #72793 r? @oli-obk
2022-06-29add test for ice 68875Matthias Krüger-0/+19
Fixes #68875
2022-06-29add tests for ICE 94432Matthias Krüger-0/+10
Fixes #94432
2022-06-29Rollup merge of #98665 - ChrisDenton:deprecated-suggestion, r=compiler-errorsMatthias Krüger-5/+27
Use verbose help for deprecation suggestion Fixes #98631 r? `@compiler-errors`
2022-06-29Rollup merge of #98660 - eddyb:invalid-punct-stage1, r=lqdMatthias Krüger-14/+6
Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`. #98188 broke `./x.py test --stage 1` (which I thought we ran in PR CI, cc `@rust-lang/infra)` i.e. the default `./x.py test` in dev checkouts, as the panic in `src/test/ui/proc-macro/invalid-punct-ident-1.rs` moved from the server (`rustc`) to the client (proc macro), and that means it's now affected by #59998. I made the test look like `src/test/ui-fulldeps/issue-76270-panic-in-libproc-macro.rs` tho I'm a bit confused why that one is in `src/test/ui-fulldeps`, it should still work in `src/test/ui`, no? (cc `@Aaron1011)`
2022-06-29Rollup merge of #98643 - voidc:valtree-ref-pretty, r=lcnrMatthias Krüger-0/+48
Improve pretty printing of valtrees for references This implements the changes outlined in https://github.com/rust-lang/rust/issues/66451#issuecomment-1168859638. r? `@lcnr` Fixes #66451
2022-06-29Rollup merge of #98642 - yanchen4791:issue-98260-fix, r=spastorinoMatthias Krüger-0/+21
Fix #98260 Fixes https://github.com/rust-lang/rust/issues/98260
2022-06-29fix ICE with -Wrust-2021-incompatible-closure-capturesMatthias Krüger-0/+150
Fixes #93117 Fixes #96258
2022-06-29pessimistically treat all function items as containing an opaque typeOli Scherer-4/+58
2022-06-29fix stderr by hand since that test is not run on my systemRalf Jung-4/+4
2022-06-29interpret: adjust error from constructing an invalid valueRalf Jung-188/+188
2022-06-29Rollup merge of #98607 - compiler-errors:tuple-wrap-suggestion, r=oli-obkDylan DPC-17/+104
Clean up arg mismatch diagnostic, generalize tuple wrap suggestion This is based on top of #97542, so just look at the last commit which contains the relevant changes. 1. Remove `final_arg_types` which was one of the last places we were using raw (`usize`) indices instead of typed indices in the arg mismatch suggestion code. 2. Improve the tuple wrap suggestion, now we suggest things like `call(a, b, c, d)` -> `call(a, (b, c), d)` :smiley_cat: 3. Folded in fix #98645
2022-06-29Rollup merge of #98499 - JulianKnodt:erase_lifetime, r=lcnrDylan DPC-0/+33
Erase regions in New Abstract Consts When an abstract const is constructed, we previously included lifetimes in the set of substitutes, so it was not able to unify two abstract consts if their lifetimes did not match but the values did, despite the values not depending on the lifetimes. This caused code that should have compiled to not compile. Fixes #98452 r? ```@lcnr```
2022-06-29Rollup merge of #98415 - ↵Dylan DPC-18/+18
compiler-errors:rustc-borrowck-session-diagnostic-1, r=davidtwco Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic` Self-explanatory r? ```@davidtwco```
2022-06-29Add more testsOli Scherer-2/+28
2022-06-29Make RPIT and TAIT work exactly the sameOli Scherer-183/+297
2022-06-29Use verbose help for deprecation suggestionChris Denton-5/+27
2022-06-29Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.Eduard-Mihai Burtescu-14/+6
2022-06-29Rollup merge of #98603 - compiler-errors:minor-borrowck-diagnostic-fixes, ↵Dylan DPC-25/+108
r=davidtwco Some borrowck diagnostic fixes 1. Remove some redundant `.as_ref` suggestion logic from borrowck, this has the consequence of also not suggesting `.as_ref` after `Option` methods, but (correctly) before. 2. Fix a bug where we were replacing a binding's name with a type. Instead, make it a note. This is somewhat incomplete. See `src/test/ui/borrowck/suggest-as-ref-on-mut-closure.rs` for more improvements.
2022-06-29Rollup merge of #98525 - JohnTitor:issue-79224, r=compiler-errorsDylan DPC-0/+53
Add regression test for #79224 Closes #79224 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-06-29Rollup merge of #98277 - compiler-errors:issue-93596, r=estebankDylan DPC-48/+83
Fix trait object reborrow suggestion Fixes #93596 Slightly generalizes the logic we use to suggest fix first implemented in #95609, specifically when we have a `Sized` obligation that comes from a struct's unsized tail.
2022-06-29Rollup merge of #97542 - compiler-errors:arg-mismatch, r=jackh726Dylan DPC-48/+47
Use typed indices in argument mismatch algorithm I kinda went overboard with the renames, but in general, "arg" is renamed to "expected", and "input" is renamed to "provided", and we use new typed indices to make sure we're indexing into the right sized array. Other drive-by changes: 1. Factor this logic into a new function, so we don't need to `break 'label` to escape it. 1. Factored out dependence on `final_arg_types`, which is never populated for arguments greater than the number of expected args. Instead, we just grab the final coerced expression type from `in_progress_typeck_results`. 1. Adjust the criteria we use to print (provided) type names, before we didn't suggest anything that had infer vars, but now we suggest thing that have infer vars but aren't `_`. ~Also, sorry in advance, I kinda want to backport this but I know I have folded in a lot of unnecessary drive-by changes that might discourage that. I would be open to brainstorming how to get some of these changes on beta at least.~ edit: Minimized the ICE-fixing changes to #97557 cc `@jackh726` as author of #92364, and `@estebank` as reviewer of the PR. fixes #97484