Commit graph

174 commits

Author SHA1 Message Date
bors
0cb9899e78 Auto merge of #97892 - klensy:fix-spaces, r=oli-obk
diagnostics: remove trailing spaces

Remove few occurrences of trailing spaces and drive by fix of needless alloc of const string.
2022-06-17 17:30:16 +00:00
Maybe Waffle
a607cffc8c --bless ui 2022-06-16 17:08:26 +04:00
klensy
0ff8ae3111 diagnostics: fix trailing space 2022-06-16 14:40:28 +03:00
bors
f5507aa881 Auto merge of #97497 - c410-f3r:z-errors, r=petrochenkov
Move some tests to more reasonable places

r? `@petrochenkov`
2022-06-03 04:46:10 +00:00
Matthias Krüger
daedae7b23
Rollup merge of #97264 - TaKO8Ki:suggest-extern-crate-when-failing-to-resolve-use-crate, r=estebank
Suggest `extern crate foo` when failing to resolve `use foo`

closes #97095

r? ``@estebank``
2022-06-01 17:11:05 +02:00
Caio
79c9001c12 Move some tests to more reasonable places 2022-05-28 18:38:34 -03:00
Takayuki Maeda
b2480a0251 suggest extern crate foo when failing to resolve use foo
fix ci error
2022-05-25 09:58:19 +09:00
Ken Matsui
03007dee79
Omit unnecessary help to add #[cfg(test)] when already annotated 2022-05-17 06:50:07 +09:00
Fausto
8c2353b6c1 remove find_use_placement
A more robust solution to finding where to place use suggestions was added.
The algorithm uses the AST to find the span for the suggestion so we pass this span
down to the HIR during lowering and use it.

Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-03-31 17:20:03 -04:00
Matthias Krüger
790950a530
Rollup merge of #91770 - TaKO8Ki:suggest-adding-cfg-test, r=joshtriplett
Suggest adding a `#[cfg(test)]` to to a test module

closes #88138
2021-12-21 08:33:39 +01:00
Michael Goulet
682a3428a3 Fixup tests for issue-86035 2021-12-20 19:53:31 -08:00
Michael Goulet
48dab5c960 Test for issue-86035 2021-12-20 19:50:06 -08:00
Takayuki Maeda
6f8ad6d83a suggest adding a #[cfg(test)] to test modules
remove a empty line

import `module_to_string`

use `contains("test")`

show a suggestion in case module starts_with/ends_with "test"

replace `parent` with `containing`
2021-12-16 11:48:58 +09:00
Tom Farmer
3827b6451c Update invalid crate attributes, add help message
tidy run

update invalid crate attributes, improve error

update test outputs

de-capitalise error

update tests

Update invalid crate attributes, add help message

Update - generate span without using BytePos

Add correct dependancies

Update - generate suggestion without BytePos

Tidy run

update tests

Generate Suggestion without BytePos

Add all builtin attributes

add err builtin inner attr at top of crate

fix tests

add err builtin inner attr at top of crate

tidy fix

add err builtin inner attr at top of crate
2021-12-03 18:38:32 +00:00
Michael
2ca9333011 Improve suggestion for extern crate self error message 2021-12-01 21:59:54 +00:00
Caio
41d9abd76c Move some tests to more reasonable directories 2021-11-18 12:09:34 -03:00
Caio
ab5434f9b8 Move some tests to more reasonable directories 2021-11-14 14:38:42 -03:00
pierwill
7de1ff1ba8 Edit error messages for rustc_resolve::AmbiguityKind variants
Emit description of the ambiguity as a note.

Co-authored-by: Noah Lev <camelidcamel@gmail.com>
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2021-10-25 20:33:07 -05:00
Cameron Steffen
90f4521cfd Bless tests 2021-10-15 02:36:58 -05:00
Hirochika Matsumoto
3818981ca1 Practice diagnostic message convention 2021-10-03 16:16:28 +09:00
Fabian Wolff
750018e16e Improve diagnostics for inaccessible items 2021-09-26 19:22:20 +02:00
Fabian Wolff
65eb381dec Do not suggest importing inaccessible items 2021-09-26 18:43:58 +02:00
Mara Bos
8dc8649bd7 Add test or unused import removal suggestion with attributes. 2021-08-12 17:35:57 +02:00
Esteban Küber
99f2977031 Modify structured suggestion output
* On suggestions that include deletions, use a diff inspired output format
* When suggesting addition, use `+` as underline
* Color highlight modified span
2021-08-11 09:46:24 +00:00
Aaron Hill
0dd9f118d9
Show macro name in 'this error originates in macro' message
When there are multiple macros in use, it can be difficult to tell
which one was responsible for producing an error.
2021-05-12 19:03:06 -04:00
Charles Lew
e5f9271f36 Stablize non_ascii_idents feature. 2021-04-08 02:52:00 +08:00
Simon Jakobi
3ea62cb5d1 Remove redundant ignore-tidy-linelength annotations
This is step 2 towards fixing #77548.

In the codegen and codegen-units test suites, the `//` comment markers
were kept in order not to affect any source locations. This is because
these tests cannot be automatically `--bless`ed.
2021-04-03 22:30:20 +02:00
Camelid
bfae41d7b0 Fix ICE with use clippy:🅰️:b; 2021-03-21 14:20:28 -07:00
Mara Bos
218cf30c53 Update test output for edition preludes. 2021-02-25 13:43:11 +01:00
Caio
ad35979c50 Move some tests to more reasonable directories - 2
Address comments

Update limits
2021-01-16 19:46:54 -03:00
Mark Rousskov
8a3edb1d66 Update tests for extern block linting 2021-01-13 07:49:16 -05:00
Vadim Petrochenkov
4eb9da3b17 Move some tests to subdirectories 2020-12-07 02:25:09 +03:00
Mark Rousskov
ae4f80b4be Revert "Revert "resolve: Avoid "self-confirming" import resolutions in one more case""
This reverts commit b20bce8ce5.

It retains the test added in that commit as a check-pass test, intended to
prevent future (unintentional) regressions.
2020-11-06 11:22:13 -05:00
Vadim Petrochenkov
b20bce8ce5 Revert "resolve: Avoid "self-confirming" import resolutions in one more case" 2020-10-02 00:58:37 +03:00
Kornel
7ec1de062a Clarify message about unresolved use 2020-09-01 18:38:14 +01:00
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00
Yuki Okushi
9a164ff4c5
Skip tests on emscripten 2020-05-08 00:39:02 +09:00
Yuki Okushi
e69748ba4f
Move tests from test/run-fail to UI 2020-05-06 14:02:55 +09:00
Josh Stone
ccecae5fdd Fix unused results from mem::replace 2020-04-17 13:59:14 -07:00
RoccoDev
b85c64c3ea
rustc: Add a warning count upon completion 2020-04-11 16:15:24 +02:00
Eduard-Mihai Burtescu
8deff18529 tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
Mazdak Farrokhzad
906b399583
Rollup merge of #69942 - estebank:sized-verbose-sugg, r=matthewjasper
Increase verbosity when suggesting subtle code changes

Do not suggest changes that are actually quite small inline, to minimize the likelihood of confusion.

Fix #69243.
2020-03-23 10:29:09 +01:00
Esteban Küber
854b78fe22 Normalize wording of privacy access labels 2020-03-22 15:36:54 -07:00
Vadim Petrochenkov
e543e3187c resolve: Avoid "self-confirming" import resolutions in one more case 2020-03-21 20:48:37 +03:00
Vadim Petrochenkov
f4083c6455 Add the "consider importing it directly" label to public imports as well 2020-03-11 21:49:32 +03:00
Vadim Petrochenkov
580c6a29d4 resolve: Print import chains on privacy errors 2020-03-11 21:17:32 +03:00
Matthias Prechtl
7b555178ae --bless --compare-mode=nll 2020-02-09 20:43:49 +01:00
Eduard-Mihai Burtescu
4c7eb59e81 rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. 2020-02-06 21:46:38 +02:00
Eduard-Mihai Burtescu
f6fc80206e rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace. 2020-02-06 21:32:07 +02:00
varkor
24a2929ed1 Normalise notes with the/is 2020-01-24 16:24:50 +00:00