about summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2020-07-26report kind of deprecated item in messageAndy Russell-2/+2
This is important for fields, which are incorrectly referred to as "items".
2020-07-26Remove more obsolete test flagsOliver Scherer-1/+0
2020-07-25Clean up some uses of logging in ui testsOliver Scherer-1/+1
2020-07-25Ensure stack when type checking and building MIR for large if expressionsKan-Ru Chen-0/+10419
2020-07-25Fix commas.Steven Malis-1/+1
2020-07-25Use the proper span when WF-checking an impl self typeAaron Hill-2/+2
2020-07-23Add missing backticks in diagnostics noteYuki Okushi-1/+1
2020-07-22Rollup merge of #73783 - estebank:impl-dyn-trait-static-lifetime, r=nikomatsakisManish Goregaokar-3/+2
Detect when `'static` obligation might come from an `impl` Partly address #71341.
2020-07-22Further tweak wording of E0759 and introduce E0767Esteban Küber-3/+2
2020-07-22tests: add regression test for #74614David Wood-0/+17
This commit adds a regression test for #74614 so that it is fixed before polymorphisation is re-enabled. Signed-off-by: David Wood <david@davidtw.co>
2020-07-20Fix an ICE on an invalid `binding @ ...` in a tuple struct patternJakub Adam Wieczorek-0/+33
2020-07-16Rollup merge of #73269 - mzohreva:mz/sgx-wait-timeout, r=jethrogbManish Goregaokar-2/+0
Enable some timeouts in SGX platform This would partially resolve https://github.com/fortanix/rust-sgx/issues/31 cc @jethrogb and @Goirad
2020-07-14Handle case of incomplete local ty more gracefullyEsteban Küber-51/+10
When encountering a local binding with a type that isn't completed, the parser will reach a `=` token. When this happen, consider the type "complete" as far as the parser is concerned to avoid further errors being emitted by parse recovery logic.
2020-07-14Rollup merge of #74336 - ↵Manish Goregaokar-0/+43
davidtwco:issue-73112-cross-crate-packed-type-diagnostic, r=estebank typeck: use `item_name` in cross-crate packed diag Fixes #73112. This PR replaces the use of `expect_local` and `hir().get` to fetch the identifier for a ADT with `item_name` - which works across crates.
2020-07-14Rollup merge of #74228 - estebank:unsized-param, r=davidtwcoManish Goregaokar-39/+48
Provide structured suggestion on unsized fields and fn params * Suggest borrowing or boxing unsized fields * Suggest borrowing fn parameters * Remove some verbosity of unsized errors * Remove `on_unimplemented` note from `trait Sized` Fix #23286, fix #28653. r? @davidtwco
2020-07-14Rollup merge of #74211 - estebank:struct-pat-as-unit, r=petrochenkovManish Goregaokar-8/+13
Structured suggestion when not using struct pattern r? @petrochenkov
2020-07-14Reword messageEsteban Küber-2/+2
2020-07-14Remove redundant explanatory `note` for type parametersEsteban Küber-3/+0
2020-07-14Suggest borrowing in more unsized fn param casesEsteban Küber-2/+8
2020-07-14Remove `Sized` `on_unimplemented` noteEsteban Küber-24/+0
2020-07-14Suggest boxing or borrowing unsized fieldsEsteban Küber-6/+24
2020-07-14Suggest borrowing unsized argument typesEsteban Küber-4/+16
2020-07-14Suggest struct pat on incorrect unit or tuple patEsteban Küber-8/+13
When encountering a unit or tuple pattern for a struct-like item, suggest using the correct pattern. Use `insert_field_names_local` when evaluating variants and store field names even when the list is empty in order to produce accurate structured suggestions.
2020-07-14typeck: use `item_name` in cross-crate packed diagDavid Wood-0/+43
This commit replaces the use of `expect_local` and `hir().get` to fetch the identifier for a ADT with `item_name` - which works across crates. Signed-off-by: David Wood <david@davidtw.co>
2020-07-14Rollup merge of #74270 - davidtwco:issue-74086-more-placeholder-type-error, ↵Manish Goregaokar-0/+16
r=estebank typeck: report placeholder type error w/out span Fixes #74086. This PR fixes a regression introduced in rust-lang/rust#70369 which meant that an error was not being emitted for invalid placeholder types when there wasn't a span available. r? @estebank
2020-07-14Rollup merge of #73965 - davidtwco:issue-73886-non-primitive-slice-cast, ↵Manish Goregaokar-0/+21
r=estebank typeck: check for infer before type impls trait Fixes #73886. This PR checks that the target type of the cast (an error related to which is being reported) does not have types to be inferred before checking if it implements the `From` trait. r? @estebank
2020-07-12typeck: report placeholder type error w/out spanDavid Wood-0/+16
This commit fixes a regression introduced in rust-lang/rust#70369 which meant that an error was not being emitted for invalid placeholder types when there wasn't a span available. Signed-off-by: David Wood <david@davidtw.co>
2020-07-11Rollup merge of #74240 - da-x:fix-74081, r=ManishearthManish Goregaokar-0/+28
Fix #74081 and add the test case from #74236
2020-07-11Add the test case mentioned in #74236Dan Aloni-0/+28
2020-07-10Rollup merge of #74109 - nbdd0121:issue-74082, r=petrochenkovManish Goregaokar-0/+28
Only allow `repr(i128/u128)` on enum Fixes #74082
2020-07-08Avoid "blacklist"Tamir Duberstein-1/+1
Other terms are more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work. The target configuration option "abi-blacklist" has been depreciated and renamed to "unsupported-abis". The old name continues to work.
2020-07-06Rollup merge of #73953 - JohnTitor:audit-hidden-sugg, r=estebankManish Goregaokar-16/+56
Audit hidden/short code suggestions Should fix #73641. Audit uses of `span_suggestion_short` and `tool_only_span_suggestion` (`span_suggestion_hidden` is already tested with `run-rustfix`). Leave some FIXMEs for futher improvements/fixes. r? @estebank
2020-07-06Add UI test for issue 74082Gary Guo-0/+28
2020-07-05Rollup merge of #73871 - da-x:private-types-2018-no-extern, r=petrochenkovManish Goregaokar-0/+53
Fix try_print_visible_def_path for Rust 2018 The recursive check of `try_print_visible_def_path` did not properly handle the Rust 2018 case of crate-paths without 'extern crate'. Instead, it returned a "not found" via (false, self). This fixes #56175.
2020-07-02typeck: check for infer before type impls traitDavid Wood-0/+21
This commit checks that the target type of the cast (an error related to which is being reported) does not have types to be inferred before checking if it implements the `From` trait. Signed-off-by: David Wood <david@davidtw.co>
2020-07-02resolve: disallow label use through closure/asyncDavid Wood-7/+144
This commit modifies resolve to disallow `break`/`continue` to labels through closures or async blocks. This doesn't make sense and should have been prohibited anyway. Signed-off-by: David Wood <david@davidtw.co>
2020-07-02Audit uses of `span_suggestion_short`Yuki Okushi-16/+56
2020-06-29Fix try_print_visible_def_path for Rust 2018Dan Aloni-2/+2
The recursive check of `try_print_visible_def_path` did not properly handle the Rust 2018 case of crate-paths without 'extern crate'. Instead, it returned a "not found" via (false, self). This fixes issue #56175.
2020-06-29Add test for issue #56175Dan Aloni-0/+53
2020-06-28Auto merge of #72437 - ecstatic-morse:stabilize-const-if-match, r=oli-obkbors-26/+4
Stabilize `#![feature(const_if_match)]` Quoting from the [stabilization report](https://github.com/rust-lang/rust/issues/49146#issuecomment-616301045): > `if` and `match` expressions as well as the short-circuiting logic operators `&&` and `||` will become legal in all [const contexts](https://doc.rust-lang.org/reference/const_eval.html#const-context). A const context is any of the following: > > - The initializer of a `const`, `static`, `static mut` or enum discriminant. > - The body of a `const fn`. > - The value of a const generic (nightly only). > - The length of an array type (`[u8; 3]`) or an array repeat expression (`[0u8; 3]`). > > Furthermore, the short-circuiting logic operators will no longer be lowered to their bitwise equivalents (`&` and `|` respectively) in `const` and `static` initializers (see #57175). As a result, `let` bindings can be used alongside short-circuiting logic in those initializers. Resolves #49146. Ideally, we would resolve :whale: #66753 before this lands on stable, so it might be worth pushing this back a release. Also, this means we should get the process started for #52000, otherwise people will have no recourse except recursion for iterative `const fn`. r? @oli-obk
2020-06-28Update testsDylan MacKenzie-13/+2
2020-06-28Update testsDylan MacKenzie-13/+2
2020-06-28Rollup merge of #73817 - jumbatm:rename-to-clashing-extern-declarations, ↵Manish Goregaokar-6/+6
r=petrochenkov Rename clashing_extern_decl to clashing_extern_declarations. Rename clashing_extern_decl to clashing_extern_declarations to bring in-line with lint naming conventions. Fixes #73802. r? @petrochenkov
2020-06-27Rollup merge of #73708 - Aaron1011:feature/reland-move-fn-self-msg, r=davidtwcoManish Goregaokar-6/+39
Explain move errors that occur due to method calls involving `self` (take two) This is a re-attempt of #72389 (which was reverted in #73594) Instead of using `ExpnKind::Desugaring` to represent operators, this PR checks the lang item directly.
2020-06-28Rename the lint to clashing_extern_declarations.jumbatm-6/+6
Also, run RustFmt on the clashing_extern_fn test case and update stderrs.
2020-06-26Rollup merge of #73485 - estebank:dedup-preds, r=nikomatsakisManish Goregaokar-0/+26
Perform obligation deduplication to avoid buggy `ExistentialMismatch` Address #59326.
2020-06-26Explain move errors that occur due to method calls involving `self`Aaron Hill-6/+39
This is a re-attempt of #72389 (which was reverted in #73594) Instead of using `ExpnKind::Desugaring` to represent operators, this PR checks the lang item directly.
2020-06-26Show the values and computation that would overflow a const evaluation or ↵Oliver Scherer-72/+72
propagation
2020-06-25Rollup merge of #73674 - estebank:op-trait-bound-suggestion, r=davidtwcoManish Goregaokar-2/+7
Tweak binop errors * Suggest potentially missing binop trait bound (fix #73416) * Use structured suggestion for dereference in binop
2020-06-24Suggest type param trait bound for binop only when appropriateEsteban Küber-1/+0
Verify that the binop trait *is* implemented for the types *if* all the involved type parameters are replaced with fresh inferred types. When this is the case, it means that the type parameter was indeed missing a trait bound. If this is not the case, provide a generic `note` refering to the type that doesn't implement the expected trait.