133 Commits

Author SHA1 Message Date
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
Vadim Petrochenkov
c84efe9b6c resolve: Say "import" when reporting private imports 2020-01-16 21:59:11 +03:00
Vadim Petrochenkov
28c3f6eb40 resolve: Point at the private item definitions in privacy errors 2020-01-16 21:59:11 +03:00
varkor
e84248921b Add backticks in appropriate places 2020-01-12 15:37:50 +00:00
Vadim Petrochenkov
642669c74d Update tests 2020-01-09 21:23:12 +03:00
Yuki Okushi
c818f4c88e try to fix ui errors 2020-01-04 14:27:29 +05:30
mental
c0da63951a Thank you Dylan and JohnTitor for blessing me. 2020-01-03 11:50:12 +02:00
mental
56b3120bf4 Remove // check-pass for ui/import/import-crate-var.rs 2020-01-02 11:59:32 +02:00
mental
3323f1e57d Update src/test/ui 2020-01-02 10:16:07 +02:00
Esteban Küber
90bf0d2e33 Ignore i586-unknown-linux-gnu and i586-unknown-musl in tests 2019-12-28 12:26:48 -08:00
Mazdak Farrokhzad
5a6fd110b8
Rollup merge of #66007 - estebank:remove-here, r=Centril
Remove "here" from "expected one of X here"
2019-11-08 16:50:35 +01:00
Yuki Okushi
9dc5d0ec81
Rollup merge of #66049 - RalfJung:missing-spans, r=alexcrichton
consistent handling of missing sysroot spans

Due to https://github.com/rust-lang/rust/issues/53081, sysroot spans (pointing to code in libcore/libstd/...) fails to print on some x86 runners. This consolidates the ignore directives for that and references the relevant issue.

I also did that for the generated derive-error-span tests -- but there the script and the tests were not entirely in sync any more since https://github.com/rust-lang/rust/pull/64151. Cc @estebank @varkor
2019-11-08 13:42:16 +09:00
Mazdak Farrokhzad
a96811ee9c
Rollup merge of #66087 - tmiasko:ui-mode, r=Centril
Update some build-pass ui tests to use check-pass where applicable

Helps with issue https://github.com/rust-lang/rust/issues/62277.
2019-11-07 14:27:24 +01:00
Esteban Küber
52e8ec1432 Remove "here" from "expected one of X here" 2019-11-06 17:26:20 -08:00
Tomasz Miąsko
0501d8ab0d Use check-pass in ui tests where appropriate 2019-11-04 16:03:46 +01:00
Vadim Petrochenkov
90f891d8ae syntax: Avoid span arithmetics for delimiter tokens 2019-11-03 14:58:12 +03:00
Ralf Jung
05c07916ed consistent handling of missing sysroot spans 2019-11-02 23:15:45 +01:00
Tyler Mandry
0d755ff672
Rollup merge of #65539 - traxys:fix_62334, r=petrochenkov
resolve: Turn the "non-empty glob must import something" error into a lint

This fixes #62334 by changing the error to a lint warning the glob. I changed the test but I'm very unsure of what I did as I do not know how to correctly check for the warning
2019-10-29 12:01:33 -07:00
Quentin Boyer
ed8585ffb5 forgot to add the changed stderr 2019-10-29 00:20:28 +01:00
Quentin Boyer
de9413bd34 changing non-empty glob must import something to a lint 2019-10-28 00:57:25 +01:00
Esteban Küber
b26ddb8af3 Point at local similarly named element and tweak references to variants
Point at the span for the definition of ADTs internal to the current
crate.

Look at the leading char of the ident to determine whether we're
expecting a likely fn or any of a fn, a tuple struct or a tuple variant.

Turn fn `add_typo_suggestion` into a `Resolver` method.
2019-10-27 11:50:43 -07:00
Esteban Küber
9a561872c4 Always emit unresolved import errors and hide unused import lint 2019-09-08 11:11:26 -07:00
Vadim Petrochenkov
7dc3839b50 resolve: Mark more erroneous imports as used 2019-09-07 21:30:42 +03:00
Matthew Jasper
6fcdb36ccb Make use of hygiene in AST passes 2019-09-05 15:07:16 +01:00
Vadim Petrochenkov
23b82c3229 resolve: Move macro resolution traces from Modules to Resolver
Traces already contain module info without that.
It's easy to forget to call `finalize_*` on a module.
In particular, macros enum and trait modules weren't finalized.
By happy accident macros weren't placed into those modules until now.
2019-08-15 20:39:27 +03:00
Vadim Petrochenkov
e18ad70d2b diagnostics: Describe crate root modules in DefKind::Mod as "crate" 2019-08-10 23:17:20 +03:00
Vadim Petrochenkov
cbcc7dd182 Give built-in macros stable addresses in the standard library 2019-08-10 00:05:37 +03:00
Kornel
3bfb4c3c25 Don't recommend extern crate syntax 2019-08-05 18:19:01 +01:00
Vadim Petrochenkov
5486cc69bd tests: Move run-pass tests with naming conflicts to ui 2019-07-27 18:56:17 +03:00
Vadim Petrochenkov
9be35f82c1 tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
Vadim Petrochenkov
8eaf17bca2 Introduce built-in macros through libcore 2019-07-26 13:09:54 +03:00
Samy Kacimi
e5e1397adb
normalize use of backticks in compiler messages for librustc/lint
https://github.com/rust-lang/rust/issues/60532
2019-07-17 22:49:48 +02:00
Samy Kacimi
41e71b0c93
normalize use of backticks in compiler messages for libsyntax/feature_gate
https://github.com/rust-lang/rust/issues/60532
2019-07-09 14:13:28 +02:00
Yuki Okushi
c004451a20 Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
Vadim Petrochenkov
932ea64175 compiletest: Remove skip-codegen 2019-06-16 12:23:22 +03:00
Vadim Petrochenkov
eb09daa762 Hygienize macros in the standard library 2019-06-12 20:27:29 +03:00
memoryruins
eb4580a570 Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
bors
9a9df55f07 Auto merge of #60252 - davidtwco:issue-57672, r=Mark-Simulacrum
Don't suggest changing extern crate w/ alias to use.

Fixes #57672.
2019-05-18 15:07:38 +00:00
Eduard-Mihai Burtescu
ff174fe09e rustc: rename hir::def::Def to Res (short for "resolution"). 2019-05-03 22:50:19 +03:00
Vadim Petrochenkov
fbbec76701 resolve: Consider erroneous imports used to avoid duplicate diagnostics 2019-04-28 22:36:57 +03:00
David Wood
8869bc5ada
Do not suggest use over extern crate w/ alias.
This commit stops `unused_extern_crates` lints from occuring on `extern
crate` statements that alias the crate as the suggestion to change to a
`use` statement would result in the aliased name no longer being added
to the prelude, thereby causing compilation errors if other imports
expected this to be the case.
2019-04-25 08:06:49 +01:00
Andy Russell
b6f148c8bd
hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00