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
Vadim Petrochenkov
0f70daa9b0
resolve: Move privacy error reporting into a separate method
...
Give named fields to `struct PrivacyError`
Move `fn report_ambiguity_error` to `diagnostics.rs`
2020-01-16 21:59:11 +03: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
Matthias Krüger
312c3a067a
remove redundant clones, found by clippy
2020-01-15 15:00:25 +01:00
varkor
3de9b8a3b7
Fix formatting ellipses at the end of some diagnostics
2020-01-12 15:37:50 +00:00
varkor
e84248921b
Add backticks in appropriate places
2020-01-12 15:37:50 +00:00
varkor
8461fa5119
Diagnostics should not end with a full stop
2020-01-12 15:37:50 +00:00
bors
543b7d97d0
Auto merge of #65912 - estebank:variants-orig, r=petrochenkov
...
Point at the span for the definition of crate foreign ADTs
Follow up to #65421 . Partially addresses #65386 . Blocked on #53081 .
2020-01-11 06:15:59 +00:00
Mazdak Farrokhzad
b4809d0818
appease rustfmt
2020-01-11 03:30:20 +01:00
Mazdak Farrokhzad
7dbccf5b55
buffered lint infra -> rustc_session
2020-01-11 03:21:34 +01:00
Mazdak Farrokhzad
1af8c10bd4
simplify feature_err imports
2020-01-11 03:19:50 +01:00
Esteban Küber
6d97718886
./x.py fmt
2020-01-10 11:40:29 -08:00
Esteban Küber
8eb7ac561e
Use def_span to minimize definition span to first line when possible
2020-01-10 11:40:29 -08:00
Esteban Küber
39c96a0f53
Point at the span for the definition of crate foreign ADTs
2020-01-10 11:40:29 -08:00
Mazdak Farrokhzad
8bd3d240e3
nix syntax::errors & prefer rustc_errors over errors
2020-01-10 07:41:30 +01:00
Mazdak Farrokhzad
5dafa6a464
add CStore::item_generics_num_lifetimes
2020-01-09 09:26:55 +01:00
Mazdak Farrokhzad
b743af6a24
rename a method in Resolver trait
2020-01-09 08:57:25 +01:00
Mazdak Farrokhzad
7472f9ef13
lowering: remove dep on CrateStore
2020-01-09 08:57:24 +01: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
Mazdak Farrokhzad
2c3e5d3de0
- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}
...
- remove syntax::{help!, span_help!, span_note!}
- remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!}
- lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints
- inline syntax::{struct_span_warn!, diagnostic_used!}
- stringify_error_code! -> error_code! & use it more.
- find_plugin_registrar: de-fatalize an error
- de-fatalize metadata errors
- move type_error_struct! to rustc_typeck
- struct_span_err! -> rustc_errors
2020-01-08 04:25:33 +01: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
bors
7494250106
Auto merge of #67803 - Centril:librustc_hir, r=Zoxc
...
Extract `rustc_hir` out of `rustc`
The new crate contains:
```rust
pub mod def;
pub mod def_id;
mod hir;
pub mod hir_id;
pub mod itemlikevisit;
pub mod pat_util;
pub mod print;
mod stable_hash_impls;
pub use hir::*;
pub use hir_id::*;
pub use stable_hash_impls::HashStableContext;
```
Remains to be done in follow-up PRs:
- Move `rustc::hir::map` into `rustc_hir_map` -- this has to be a separate crate due to the `dep_graph` (blocked on https://github.com/rust-lang/rust/pull/67761 ).
- Move references to `rustc::hir` to `rustc_hir` where possible.
cc https://github.com/rust-lang/rust/issues/65031
r? @Zoxc
2020-01-04 21:50:12 +00:00
Dylan DPC
5dabc3b339
Rollup merge of #67775 - mental32:master, r=Dylan-DPC
...
Make "use $crate" a hard error
Closes #37390
2020-01-04 23:52:50 +05:30
Mazdak Farrokhzad
1f7b4e9a59
extract Export, ExportMap from hir::def
2020-01-04 19:03:27 +01:00
Mazdak Farrokhzad
2f64ab6633
{HirId,ItemLocal}{Map,Set} -> rustc::hir & nix rustc::nodemap
2020-01-04 19:01:42 +01:00
Mazdak Farrokhzad
ca297f8cf4
DefId{Map,Set} -> rustc::hir::def_id
2020-01-04 19:01:42 +01:00
Mazdak Farrokhzad
5ccc1e45bd
move Node{Map,Set} -> rustc_session::node_id
2020-01-04 18:59:28 +01:00
Mazdak Farrokhzad
7901c7f707
canonicalize FxHash{Map,Set} imports
2020-01-04 18:57:22 +01:00
Mazdak Farrokhzad
814e3af8bd
Rollup merge of #67786 - Centril:canon-span, r=petrochenkov
...
Nix reexports from `rustc_span` in `syntax`
Remove reexports `syntax::{source_map, symbol, edition}` and use `rustc_span` paths directly.
r? @petrochenkov
2020-01-04 02:19:49 +01:00
Mazdak Farrokhzad
a436293994
Rollup merge of #66913 - VirrageS:help-self, r=varkor,Centril
...
Suggest calling method when first argument is `self`
Closes : #66782
I've explored different approaches for this MR but I think the most straightforward is the best one.
I've tried to find out if the methods for given type exist (to maybe have a better suggestion), but we don't collect them anywhere and collecting them is quite problematic. Moreover, collecting all the methods would require rewriting big part of the code and also could potentially include performance degradation, which I don't think is necessary for this simple case.
2020-01-04 02:19:44 +01: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
mental
72ee3622d7
Forgot an .emit()
2020-01-01 14:44:19 +02:00
mental
37f4535d49
Make use $crate a hard error
2020-01-01 14:33:53 +02:00
Vadim Petrochenkov
70f1d57048
Rename syntax_pos to rustc_span in source code
2020-01-01 09:15:18 +03:00
bors
119307a83e
Auto merge of #67764 - Centril:rollup-ycbq3os, r=Centril
...
Rollup of 6 pull requests
Successful merges:
- #67574 (Extract `rustc_ast_lowering` crate from `rustc`)
- #67685 (Constify Result)
- #67702 (Add symbol normalization for proc_macro_server.)
- #67730 (Cleanup pattern type checking, fix diagnostics bugs (+ improvements))
- #67744 (parser: reduce diversity in error handling mechanisms)
- #67748 (Use function attribute "frame-pointer" instead of "no-frame-pointer-elim")
Failed merges:
r? @ghost
2019-12-31 19:41:36 +00:00
Mazdak Farrokhzad
52179c56be
librustc_ast_lowering: fix misc fallout.
2019-12-31 17:56:25 +01:00
Mazdak Farrokhzad
7b6ef2b369
librustc_ast_lowering: cargo changes.
2019-12-31 17:33:10 +01:00
Camille GILLOT
7e4345ca79
Simplify ResolveLiftimes creation.
2019-12-31 10:21:33 +01:00
Camille GILLOT
31f85d3fe2
Review comments.
2019-12-31 10:21:33 +01:00
Camille GILLOT
1b92e7e446
Inert doc comments.
2019-12-31 10:21:32 +01:00
Camille GILLOT
28eefb3797
Move resolve_lifetimes query in librustc_resolve.
2019-12-31 10:21:32 +01:00
Camille GILLOT
2675765a1e
Move resolve_lifetime.rs to librustc_resolve.
2019-12-31 10:21:32 +01:00
Vadim Petrochenkov
7608f21b27
Rename rustc_resolve/resolve_imports.rs -> rustc_resolve/imports.rs
2019-12-30 19:18:18 +03:00
Vadim Petrochenkov
a2823e3af6
Rename libsyntax_ext and libsyntax_expand in code
2019-12-30 19:18:17 +03:00
Vadim Petrochenkov
b9a9c5b4fd
Make things build again
2019-12-30 19:18:16 +03:00