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
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
Vadim Petrochenkov
a0d8b794d6
resolve: Minor cleanup of duplicate macro reexports
2019-12-28 17:37:22 +03:00
Mark Rousskov
6891388e66
x.py fmt after previous deignore
2019-12-24 17:38:22 -05:00
Janusz Marcinkiewicz
7b91ef8837
Simplify match expr
2019-12-23 15:55:35 +01:00
Janusz Marcinkiewicz
2168c0b979
Extract checking for self arg to separate method
2019-12-23 12:06:17 +01:00
Janusz Marcinkiewicz
7353afdfd9
Extend suggestion span to whole method call
2019-12-23 11:57:09 +01:00
Janusz Marcinkiewicz
091853946b
Add arguments to suggestion method call
2019-12-23 11:57:09 +01:00
Janusz Marcinkiewicz
8e5b2c80d3
Add more detailed suggestion
2019-12-23 11:57:09 +01:00
Janusz Marcinkiewicz
8d189ed2f1
Suggest calling method when first argument is self
2019-12-23 11:57:08 +01:00
Mark Rousskov
a06baa56b9
Format the world
2019-12-22 17:42:47 -05:00
Mazdak Farrokhzad
b50c3b7ddf
Rollup merge of #67160 - matthewjasper:gat-generics, r=nikomatsakis
...
Make GATs less ICE-prone.
After this PR simple lifetime-generic associated types can now be used in a compiling program. There are two big limitations:
* #30472 has not been addressed in any way (see src/test/ui/generic-associated-types/iterable.rs)
* Using type- and const-generic associated types errors because bound types and constants aren't handled by trait solving.
* The errors are technically non-fatal, but they happen in a [part of the compiler](4abb0ad273/src/librustc_typeck/lib.rs (L298) ) that fairly aggressively stops compiling on errors.
closes #47206
closes #49362
closes #62521
closes #63300
closes #64755
closes #67089
2019-12-21 19:07:31 +01:00
Mazdak Farrokhzad
a7aec3f207
1. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.
...
2. mir::Mutability -> ast::Mutability.
2019-12-20 22:22:44 +01:00
Matthew Jasper
c5028f686d
Resolve names in the generics of impl associated types
2019-12-20 20:14:11 +00:00
Mazdak Farrokhzad
054458b48d
make visitor uses more robust
2019-12-12 18:05:05 +01:00
Mazdak Farrokhzad
e52f902a8a
AssocImplKind::{Method -> Fn}.
2019-12-12 18:05:05 +01:00
Mazdak Farrokhzad
abf2e7aa95
Remove ast::{Impl,Trait}{Item,ItemKind}.
2019-12-12 18:05:05 +01:00