about summary refs log tree commit diff
path: root/src/test/ui/inference
AgeCommit message (Collapse)AuthorLines
2021-09-17Make diagnostics clearer for `?` operatorsYuki Okushi-0/+22
2021-08-16Use note to point at bound introducing requirementEsteban Küber-6/+10
2021-08-14Auto merge of #87600 - JohnTitor:classify-ui-tests, r=petrochenkovbors-0/+220
Move some UI tests to more suitable subdirs The classifui result: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427/e06c42226c6038da91e403c33b9947843420cf44 Some notes: - backtrace-debuginfo.rs: previously I skipped this, I'm still not sure what the best dir is. Any ideas? - estr-subtyping.rs: Seems a quite old test so removed, shouldn't? - deref-suggestion.rs: moved to inference as `suggestions` is not an ideal dir. - issue-43023.rs: a bit misclassified, moved to `derives` cc #73494 r? `@petrochenkov`
2021-08-11Modify structured suggestion outputEsteban Küber-4/+4
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-08-10Move some UI tests to more suitable subdirsYuki Okushi-0/+218
2021-08-03Do not suggest impl traits as type argumentsYuki Okushi-0/+51
2021-07-26Actually infer args in visitorskadmin-0/+60
2021-07-18Remove impl_trait_in_bindings handling on inference error reportingSantiago Pastorino-38/+0
2021-07-02Add a regression test for issue-70703Yuki Okushi-0/+26
2021-06-25Address PR feedbackRyan Levick-2/+2
2021-06-25Change how edition based future compatibility warnings are handledRyan Levick-2/+2
2021-05-06Better rustc_on_unimplemented, and UI test fixesScott McMurray-24/+20
2021-04-05Rollup merge of #81922 - magurotuna:issue81522, r=matthewjasperDylan DPC-0/+31
Let `#[allow(unstable_name_collisions)]` work for things other than function Fixes #81522 In addition to the report in #81522, currently `#[allow(unstable_name_collisions)]` doesn't suppress the corresponding diagnostics even if this attribute is appended to an expression statement or a let statement. It seems like this is because the wrong `HirId` is passed to `struct_span_lint_hir`. It's fixed in this PR, and a regression test for it is also added.
2021-03-30Do not emit a suggestion that causes the E0632 errorJohnTitor-0/+21
2021-03-24Add regression test to ensure `#[allow(unstable_name_collisions)]` worksYusuke Tanaka-0/+31
2021-02-25Rollup merge of #81713 - estebank:unstable-assoc-item-lint, r=oli-obkDylan DPC-7/+28
Account for associated consts in the "unstable assoc item name colission" lint Fix #81663.
2021-02-24Account for associated consts in the "unstable assoc item name colission" lintEsteban Küber-7/+28
Fix #81663.
2021-02-06path trimming: ignore type aliasesDan Aloni-9/+9
2021-01-10Tweak `?` inference error messagesWilliam Bain-8/+8
2021-01-10Note inference failures using `?` conversionWilliam Bain-3/+68
2020-10-23Add regression test for issue-71732Yuki Okushi-0/+36
2020-10-23Add a regression test for issue-72616Yuki Okushi-0/+42
2020-10-06Fix tests from rebaseMatthew Jasper-1/+1
2020-10-06Separate bounds and predicates for associated/opaque typesMatthew Jasper-7/+7
2020-09-02pretty: trim paths of unique symbolsDan Aloni-8/+8
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-05-09adjust testsRalf Jung-2/+3
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-2/+2
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-11rustc: Add a warning count upon completionRoccoDev-1/+5
2020-02-15Rollup merge of #68129 - varkor:infer-binary-operand-behind-reference, ↵Yuki Okushi-0/+30
r=nikomatsakis Correct inference of primitive operand type behind binary operation Fixes https://github.com/rust-lang/rust/issues/57447. r? @nikomatsakis
2020-02-09--bless --compare-mode=nllMatthias Prechtl-1/+1
2020-02-09Add more testsvarkor-0/+17
2020-02-09Correct inference of primitive operand type behind binary operationvarkor-0/+13
2019-12-11Use structured suggestion for disambiguating method callsEsteban Küber-2/+8
Fix #65635.
2019-11-10Make error and warning annotations mandatory in UI testsTomasz Miąsko-1/+3
This change makes error and warning annotations mandatory in UI tests. The only exception are tests that use error patterns to match compiler output and don't have any annotations.
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+1
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-08-20--bless post no async_await gates in tests.Mazdak Farrokhzad-3/+3
2019-08-20Remove async_await gates from tests.Mazdak Farrokhzad-2/+0
2019-08-13Suggest giving return type to closures on E0282Esteban Küber-3/+5
2019-08-13review commentsEsteban Küber-1/+1
2019-08-12Fix tidyEsteban Küber-4/+4
2019-08-12Resolve types when suggesting boxed closureEsteban Küber-7/+7
2019-08-12When needing type annotations in local bindings, account for impl Trait and ↵Esteban Küber-0/+81
closures Do not suggest nonsensical types when the type inference is failing on `impl Trait` or anonymous closures.
2019-07-24Adjust tests for method disambiguation helpIlija Tovilo-0/+2
2019-07-17normalize use of backticks in compiler messages for librustc/lintSamy Kacimi-2/+2
https://github.com/rust-lang/rust/issues/60532
2019-07-09normalize use of backticks in compiler messages for libsyntax/feature_gateSamy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532
2019-07-07normalize use of backticks in compiler messages for librustc_typecheckSamy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532
2019-07-03Migrate compile-pass annotations to build-passYuki Okushi-1/+1
2019-04-11Reword tracking issue noteEsteban Küber-1/+1
2019-04-10Tweak unstable diagnostic outputEsteban Küber-1/+2
2019-03-11Update testsVadim Petrochenkov-2/+2