about summary refs log tree commit diff
path: root/src/test/ui/use
AgeCommit message (Collapse)AuthorLines
2021-01-08Change wording of noteAaron Hill-2/+2
2020-09-09Rollup merge of #75984 - kornelski:typeormodule, r=matthewjasperTyler Mandry-4/+4
Improve unresolved use error message "use of undeclared type or module `foo`" doesn't mention that it could be a crate. This error can happen when users forget to add a dependency to `Cargo.toml`, so I think it's important to mention that it could be a missing crate. I've used a heuristic based on Rust's naming conventions. It complains about an unknown type if the ident starts with an upper-case letter, and crate or module otherwise. It seems to work very well. The expanded error help covers both an unknown type and a missing crate case.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-2/+2
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-09-01Clarify message about unresolved useKornel-4/+4
2020-06-26Explain move errors that occur due to method calls involving `self`Aaron Hill-2/+14
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-22Revert "Rollup merge of #72389 - Aaron1011:feature/move-fn-self-msg, ↵Aaron Hill-14/+2
r=nikomatsakis" This reverts commit 372cb9b69c76a042d0b9d4b48ff6084f64c84a2c, reversing changes made to 5c61a8dc34c3e2fc6d7f02cb288c350f0233f944.
2020-06-11Use `fn_span` to point to the actual method callAaron Hill-2/+2
2020-06-11Explain move errors that occur due to method calls involving `self`Aaron Hill-2/+14
2020-05-19Alter wording for `use foo::self` helpmibac138-8/+8
2020-05-19Add error recovery for `use foo::self`mibac138-1/+63
2020-05-19Suggest fixes for `use foo::self`mibac138-5/+23
2020-05-07reword "possible candidate" import suggestionAndy Russell-1/+1
2020-03-22Normalize wording of privacy access labelsEsteban Küber-4/+4
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-1/+1
Address inconsistency in using "is" with "declared here" "is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout. r? @Centril
2020-01-24Normalise notes with the/isvarkor-1/+1
2020-01-23add a test for #60976Tuomas Lappeteläinen-0/+10
The test fails on 1.36.0 but passes on master.
2020-01-16resolve: Point at the private item definitions in privacy errorsVadim Petrochenkov-4/+28
2020-01-09Update testsVadim Petrochenkov-3/+10
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-10-13Update ui testsGuillaume Gomez-0/+1
2019-10-04metadata: Remove `locator::Context::ident`Vadim Petrochenkov-2/+2
It's a crate name after renaming, so it's entirely irrelevant to crate loading
2019-08-05Don't recommend `extern crate` syntaxKornel-1/+1
2019-05-29Update ui test suite to use dynmemoryruins-2/+2
2019-04-22update tests for migrate mode by defaultMatthew Jasper-72/+20
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-8/+7
2019-04-10clarify what the item is in "not a module" errorAndy Russell-21/+36
2019-03-23Mark duplicate import removal suggestion tool onlyEsteban Küber-1/+0
2019-03-23Tweak unnecessary import suggestionEsteban Küber-4/+2
2019-03-14Moved issue tests to subdirs and normalised names.Alexander Regueiro-1/+20
2019-03-11Update NLL testsVadim Petrochenkov-3/+3
2019-03-11Update testsVadim Petrochenkov-17/+17
2019-03-09use structured suggestions for E0432Andy Russell-1/+4
2019-02-11Use hidden suggestions for unused imports lintEsteban Küber-5/+3
2019-02-08unused_imports: update testsPietro Albini-6/+8
2019-01-31Add suggestion for duplicated import.David Wood-10/+8
This commit adds a suggestion when a import is duplicated (ie. the same name is used twice trying to import the same thing) to remove the second import.
2019-01-24Fix --compare-mode=nll testsEsteban Küber-8/+9
2018-12-29add non-copy note to stderrcsmoe-1/+3
2018-12-27retrieve ty info from place_tycsmoe-1/+1
describe index with _
2018-12-25Remove licensesMark Rousskov-229/+47
2018-11-18resolve: Avoid sentence breaks in diagnosticsVadim Petrochenkov-15/+15
2018-10-28resolve: More precise spans for privacy errorsVadim Petrochenkov-14/+14
2018-10-23Auto merge of #55113 - mockersf:master, r=estebankbors-2/+2
#45829 when a renamed import conflict with a previous import Fix the suggestion when a renamed import conflict. It check if the snipped contains `" as "`, and if so uses everything before for the suggestion.
2018-10-17fix other tests failing due to change in case or new suggestion for extern crateFrançois Mockers-2/+2
2018-10-16updates to expected output for other ui tests.Felix S. Klock II-1/+14
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+879