Mazdak Farrokhzad
de6046fa0f
remove rustc_error_codes deps except in rustc_driver
2020-01-18 21:53:53 +01:00
Tyler Mandry
fca3264406
Rollup merge of #68204 - ecstatic-morse:item-kind-impl, r=oli-obk
...
Use named fields for `{ast,hir}::ItemKind::Impl`
Currently, the widely used `ItemKind::Impl` variant is a tuple with seven fields. I want to add an eighth in #68140 , which means I have to update most matches on this variant anyways. Giving a name to each field improves readability and makes future changes of this nature much simpler.
This change will cause several tools to break. I will fix them once this is merged.
2020-01-17 17:28:14 -08:00
Tyler Mandry
c854aecd62
Rollup merge of #66660 - jumbatm:dont_warn_about_snake_case_in_patterns, r=centril
...
Don't warn about snake case for field puns.
Closes #66362 .
2020-01-17 17:28:10 -08:00
Dylan MacKenzie
4743995ed3
Use named fields for hir::ItemKind::Impl
2020-01-17 16:14:29 -08:00
Dylan MacKenzie
d461e6d6cb
Use named fields for ast::ItemKind::Impl
2020-01-17 15:59:07 -08:00
Matthias Krüger
7fbd30b1ae
don't clone types that are copy
...
found via clippy
2020-01-16 23:48:49 +01:00
jumbatm
25a8f9473f
Don't warn about snake case for field puns that don't introduce a new name.
2020-01-17 05:57:39 +10:00
Dylan DPC
1389caf860
Rollup merge of #68096 - varkor:diagnostic-cleanup, r=Centril
...
Clean up some diagnostics by making them more consistent
In general:
- Diagnostic should start with a lowercase letter.
- Diagnostics should not end with a full stop.
- Ellipses contain three dots.
- Backticks should encode Rust code.
I also reworded a couple of messages to make them read more clearly.
It might be sensible to create a style guide for diagnostics, so these informal conventions are written down somewhere, after which we could audit the existing diagnostics.
r? @Centril
2020-01-16 11:58:02 +05:30
Yuki Okushi
fd162a48bc
Rollup merge of #67854 - afnanenayet:afnan/report-external-macro-lints, r=petrochenkov
...
Use `report_in_external_macro` for internal lints
Add the option to report lints in external macros for rustc internal lints to resolve #66370
2020-01-14 14:02:16 +09:00
Yuki Okushi
0c25ab051c
Rollup merge of #68156 - JohnTitor:fix-path-in-doc, r=Dylan-DPC
...
Fix crate paths in comments
Tiny follow-up of #67806 and others
r? @Centril
2020-01-13 16:44:21 +09:00
Afnan Enayet
9d95eaa49b
Use report_in_external_macro for internal lints
...
Add the option to report lints in external macros for rustc internal
lints
2020-01-12 23:21:02 -08:00
Yuki Okushi
27b99d4050
Fix crate paths in comments
2020-01-13 01:07:43 +09:00
varkor
e84248921b
Add backticks in appropriate places
2020-01-12 15:37:50 +00:00
varkor
0810210bcb
Diagnostics should start lowercase
2020-01-12 15:36:40 +00:00
Yuki Okushi
a404cfabc7
Expose context::CheckLintNameResult
...
Clippy needs it
2020-01-12 15:25:41 +09:00
Mazdak Farrokhzad
8be2a04c7e
pacify the parallel compiler
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
b59235975e
lints: move a comment
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
f58db20362
move rustc::lint::{context, passes} to rustc_lint.
...
Also do some cleanup of the interface.
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
8c12c424e2
{rustc::lint -> rustc_lint}::internal
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
03dfa642d9
lints: promote levels.rs to lint.rs & extract passes.rs
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
03bdfe9db3
move logic to LintLevelsBuilder
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
6f1a79cabe
GlobalCtxt: Erase LintStore type.
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
45f27643db
prepare moving HardwiredLints to rustc_session
2020-01-11 03:26:16 +01:00
Mazdak Farrokhzad
7dbccf5b55
buffered lint infra -> rustc_session
2020-01-11 03:21:34 +01:00
Yuki Okushi
7ae0618e0a
Rollup merge of #68050 - Centril:canon-error, r=Mark-Simulacrum
...
Canonicalize rustc_error imports
r? @Mark-Simulacrum
2020-01-11 04:50:53 +09:00
Mazdak Farrokhzad
8bd3d240e3
nix syntax::errors & prefer rustc_errors over errors
2020-01-10 07:41:30 +01:00
Mazdak Farrokhzad
d5598aa7a0
Introduce #![feature(half_open_range_patterns)].
...
This feature adds `X..`, `..X`, and `..=X` patterns.
2020-01-10 07:29:04 +01:00
Yuki Okushi
a366aa6249
Rollup merge of #68040 - sinkuu:unused, r=petrochenkov
...
Cleanup
2020-01-10 04:18:42 +09:00
John Kåre Alsaker
5427601e9e
Change -Z time event naming scheme and make them generic activities
2020-01-09 07:06:40 +01:00
Shotaro Yamada
f443ae68c2
Remove unused dependencies
2020-01-09 11:52:03 +09:00
Mazdak Farrokhzad
0997388b87
normalize rustc::hir::intravisit imports
2020-01-08 22:09:42 +01:00
Mazdak Farrokhzad
8351667091
intravisit: abstract over HIR Map
2020-01-08 22:01:07 +01:00
Camille GILLOT
700ac84eae
Rename traits::drop -> traits::misc.
2020-01-07 19:36:50 +01:00
Camille GILLOT
f629baf96c
Move magic traits queries to rustc::traits::drop.
2020-01-07 18:14:32 +01:00
Yuki Okushi
b065031096
Rollup merge of #67936 - euclio:assoc-type-bad-style, r=Centril
...
fire "non_camel_case_types" for associated types
Fixes #67920 .
2020-01-07 13:46:13 +09:00
Andy Russell
a7727c59ac
fire "non_camel_case_types" for associated types
2020-01-06 09:51:23 -05:00
Mazdak Farrokhzad
ebfd8673a7
Remove rustc_hir reexports in rustc::hir.
2020-01-05 12:49:22 +01:00
Mazdak Farrokhzad
62ac10ffde
simplify reexports in rustc::hir
2020-01-05 12:47:11 +01:00
John Kåre Alsaker
5a485ce4a3
Use self profile infrastructure for -Z time and -Z time-passes
2020-01-05 02:57:14 +01:00
Mazdak Farrokhzad
2f64ab6633
{HirId,ItemLocal}{Map,Set} -> rustc::hir & nix rustc::nodemap
2020-01-04 19:01:42 +01:00
Mazdak Farrokhzad
7901c7f707
canonicalize FxHash{Map,Set} imports
2020-01-04 18:57:22 +01:00
bors
79cf5e4fe2
Auto merge of #67788 - cjgillot:delint-day, r=Zoxc
...
Move early and late lint mechanisms to librustc_lint.
As requested, split from #67737
r? @Zoxc
2020-01-04 09:32:29 +00:00
Mazdak Farrokhzad
b32dc91372
Rollup merge of #67810 - crlf0710:uncommon_codepoints_lint, r=Manishearth
...
Implement uncommon_codepoints lint.
Part of #55467 . The checks of `$crate` and `{{root}}` are very unfortunate. But i'm not sure where they belongs to.
2020-01-04 02:19:52 +01:00
Charles Lew
485e98aae2
Implement uncommon_codepoints lint.
2020-01-03 08:20:12 +08:00
Mazdak Farrokhzad
b1aad76586
Normalize syntax::edition imports.
2020-01-02 19:31:38 +01:00
Mazdak Farrokhzad
4ff12ce4c1
Normalize syntax::symbol imports.
2020-01-02 13:57:04 +01:00
Mazdak Farrokhzad
75e4783f63
Normalize syntax::source_map imports.
2020-01-02 13:57:04 +01:00
Camille GILLOT
1fab03e908
Move lint levels machanism in librustc_lint.
2020-01-01 13:20:33 +01:00
Camille GILLOT
96180ff655
Move late lint machanism in librustc_lint.
2020-01-01 13:20:18 +01:00
Camille GILLOT
3a350e1a39
Move early lint machanism in librustc_lint.
2020-01-01 13:16:43 +01:00