about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2022-09-16Add test for #101844Jack Huey-0/+73
2022-09-16Revert "Better errors for implied static bound"Jack Huey-67/+0
This reverts commit c75817b0a75d4b6b01ee10900ba5d01d4915e6a8.
2022-09-16Revert "Use Predicate ConstraintCategory when normalizing"Jack Huey-133/+0
This reverts commit aae37f87632dd74856d55c0cd45d2c192379c990.
2022-09-16Revert "Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, ↵Oli Scherer-24/+122
r=estebank"" This reverts commit 4a742a691e7dd2522bad68b86fe2fd5a199d5561.
2022-09-16Rollup merge of #101843 - chenyukang:fix-101797, r=oli-obkGuillaume Gomez-0/+28
Suggest associated const for incorrect use of let in traits Fixes #101797
2022-09-16Rollup merge of #101753 - oli-obk:tait_closure_args, r=compiler-errorsDylan DPC-8/+47
Prefer explict closure sig types over expected ones fixes #100800 Previously we only checked that given closure arguments are equal to expected closure arguments, but now we choose the given closure arguments for the signature that is used when type checking the closure body, and keep the other signature for the type of the closure as seen outside of it.
2022-09-16Bless ui tests after typeck code changeDeadbeef-123/+101
2022-09-16do const trait method bounds check later in rustc_const_evalDeadbeef-63/+89
2022-09-16bless testsDeadbeef-163/+228
2022-09-16Add testDeadbeef-0/+23
2022-09-16do not suggest a placeholder to const and static without a typeTakayuki Maeda-0/+28
2022-09-15Auto merge of #101831 - compiler-errors:issue-75899, r=jackh726bors-0/+39
Normalize struct field types in `confirm_builtin_unsize_candidate` Fixes #75899 --- edited to move the normalization into `confirm_builtin_unsize_candidate` instead of the coercion code.
2022-09-15Remove the let_else feature gate from the testsuiteest31-78/+62
Result of running: rg -l "feature.let_else" src/test/ | xargs sed -s -i "s#^...feature.let_else..\$##" Plus manual tidy fixes.
2022-09-15Remove feature gate from let else suggestionest31-8/+8
The let else suggestion added by 0d92752b8aac53e033541d04fc7d9677d8bca227 does not need a feature gate any more.
2022-09-15Stabilize the let_else featureest31-19/+8
2022-09-16tweak suggestionyukang-1/+1
2022-09-15Future-proof against loose bounds if default variant is non-exhaustive.Daniel Henry-Mantilla-1/+32
Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
2022-09-15Auto merge of #101410 - dingxiangfei2009:fix-let-else-scoping, r=jackh726bors-1/+22
Reorder nesting scopes and declare bindings without drop schedule Fix #99228 Fix #99975 Storages are previously not declared before entering the `else` block of a `let .. else` statement. However, when breaking out of the pattern matching into the `else` block, those storages are recorded as scheduled for drops. This is not expected. This MR fixes this issue by not scheduling the drops for those storages. cc `@est31`
2022-09-15more tweak on diagnostic messagesyukang-21/+53
2022-09-15fix 101793, fix the wording of help msg for bitwise notyukang-6/+16
2022-09-15fix #101797: Suggest associated const for incorrect use of let in traitsyukang-0/+28
2022-09-15correct span, add help message and add UI test when query depth overflowsSparrowLii-0/+42
2022-09-15Rollup merge of #101740 - andrewpollack:add-ignore-fuchsia-ui-tests, r=tmandryMatthias Krüger-0/+6
Adding ignore-fuchsia arg to non-applicable compiler ui tests Adding `ignore-fuchsia` flag to tests involving `std::process::Command` calls, and `execve` calls
2022-09-15enclose else block in terminating scopeDing Xiang Fei-2/+1
2022-09-15add test for #99975Ding Xiang Fei-0/+20
2022-09-15reorder nesting scopes and declare bindings without drop scheduleDing Xiang Fei-1/+3
2022-09-15Normalize struct types in confirm_builtin_unsize_candidateMichael Goulet-0/+39
2022-09-15Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obkbors-19/+74
Compute lint levels by definition Lint levels are currently computed once for the whole crate. Any code that wants to emit a lint depends on this single `lint_levels(())` query. This query contains the `Span` for each attribute that participates in the lint level tree, so any code that wants to emit a lint basically depends on the spans in all files in the crate. Contrary to hard errors, we do not clear the incremental session on lints, so this implicit world dependency pessimizes incremental reuse. (And is furthermore invisible for allowed lints.) This PR completes https://github.com/rust-lang/rust/pull/99634 (thanks for the initial work `@fee1-dead)` and includes it in the dependency graph. The design is based on 2 queries: 1. `lint_levels_on(HirId) -> FxHashMap<LintId, LevelAndSource>` which accesses the attributes at the given `HirId` and processes them into lint levels. The `TyCtxt` is responsible for probing the HIR tree to find the user-visible level. 2. `lint_expectations(())` which lists all the `#[expect]` attributes in the crate. This PR also introduces the ability to reconstruct a `HirId` from a `DepNode` by encoding the local part of the `DefPathHash` and the `ItemLocalId` in the two `u64` of the fingerprint. This allows for the dep-graph to directly recompute `lint_levels_on` directly, without having to force the calling query. Closes https://github.com/rust-lang/rust/issues/95094. Supersedes https://github.com/rust-lang/rust/pull/99634.
2022-09-14Remove noop from test that expects no noopAndrew Pollack-3/+1
2022-09-14Auto merge of #101212 - eholk:dyn-star, r=compiler-errorsbors-3/+134
Initial implementation of dyn* This PR adds extremely basic and incomplete support for [dyn*](https://smallcultfollowing.com/babysteps//blog/2022/03/29/dyn-can-we-make-dyn-sized/). The goal is to get something in tree behind a flag to make collaboration easier, and also to make sure the implementation so far is not unreasonable. This PR does quite a few things: * Introduce `dyn_star` feature flag * Adds parsing for `dyn* Trait` types * Defines `dyn* Trait` as a sized type * Adds support for explicit casts, like `42usize as dyn* Debug` * Including const evaluation of such casts * Adds codegen for drop glue so things are cleaned up properly when a `dyn* Trait` object goes out of scope * Adds codegen for method calls, at least for methods that take `&self` Quite a bit is still missing, but this gives us a starting point. Note that this is never intended to become stable surface syntax for Rust, but rather `dyn*` is planned to be used as an implementation detail for async functions in dyn traits. Joint work with `@nikomatsakis` and `@compiler-errors.` r? `@bjorn3`
2022-09-14Bless ui test.Camille GILLOT-11/+66
2022-09-14Disallow defaults on type GATsJack Huey-0/+54
2022-09-14Compute `lint_levels` by definitionDeadbeef-8/+8
2022-09-14change AccessLevels representationBryanskiy-114/+106
2022-09-14Rollup merge of #101779 - eholk:drop-tracking-test-output, r=jyn514Dylan DPC-72/+372
Update test output for drop tracking #97334 has a lot of updates to test outputs that makes the PR larger than it needs to be. This PR pulls those changes out so we can keep the other one as simple as possible. r? `@jyn514`
2022-09-14Prefer explict closure sig types over expected onesOli Scherer-8/+47
2022-09-13Use Predicate ConstraintCategory when normalizingJack Huey-0/+133
2022-09-13Better errors for implied static boundJack Huey-0/+67
2022-09-13Update parsing testEric Holk-3/+3
2022-09-13Update must_not_suspend/ref.rsEric Holk-10/+37
2022-09-13Update partial-drop-partial-reinit.rsEric Holk-7/+45
2022-09-13Update issue-65436-raw-ptr-not-send.rsEric Holk-6/+10
2022-09-13Update issue-70935-complex-spans.rsEric Holk-10/+11
2022-09-13Address code review commentsEric Holk-2/+7
2022-09-13Update issue-68114.rsEric Holk-16/+103
2022-09-13Update issue-64130-4-async-move.rsEric Holk-6/+36
2022-09-13Update async-await-let-else for drop trackingEric Holk-17/+130
2022-09-13Auto merge of #101086 - cjgillot:thir-param, r=oli-obkbors-309/+111
Compute information about function parameters on THIR This avoids some manipulation of typeck results while building MIR.
2022-09-13Emit an error instead of reconstructing token stream.Camille GILLOT-1/+8
2022-09-13Manually cleanup token stream when macro expansion aborts.Camille GILLOT-0/+41