Mazdak Farrokhzad
1c091bba51
librustc/hir.rs -> librustc/hir/mod.rs
2020-01-05 12:47:11 +01:00
Mazdak Farrokhzad
62ac10ffde
simplify reexports in rustc::hir
2020-01-05 12:47:11 +01:00
bors
7785834159
Auto merge of #67777 - Zoxc:time-refactor, r=wesleywiser
...
Use self profile infrastructure for -Z time and -Z time-passes
There's no longer indentation for -Z time and -Z time-passes and duplicate timers between self profiling and -Z time-passes have been removed.
r? @wesleywiser
2020-01-05 07:54:23 +00: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
bors
093241deae
Auto merge of #67808 - Marwes:projection_normalization_recurse, r=nikomatsakis
...
perf: Don't recurse into types that do not need normalizing
A bit speculative at this stage but profiling shows that type folding
takes up a substantial amount of time during normalization which may
indicate that many types may be folded despite there being nothing to
normalize
2020-01-05 01:18:57 +00:00
Mazdak Farrokhzad
ef08662613
hir::{hir,def,itemlikevisit,pat_util,print} -> rustc_hir
...
Also fix fallout wrt. HashStable.
2020-01-04 19:03:27 +01:00
Mazdak Farrokhzad
1f7b4e9a59
extract Export, ExportMap from hir::def
2020-01-04 19:03:27 +01:00
Mazdak Farrokhzad
702b2d736a
simplify self::Namespace::* import
2020-01-04 19:03:27 +01:00
Mazdak Farrokhzad
60d5d36370
move {Par}DeepVisitor to intravisit
2020-01-04 19:03:27 +01:00
Mazdak Farrokhzad
e1087213ef
hir::hir: simplify some imports
2020-01-04 19:03:27 +01:00
Mazdak Farrokhzad
3b66f4e792
split hir/mod.rs -> hir.rs & hir/hir.rs
2020-01-04 19:03:27 +01:00
Mazdak Farrokhzad
72241ad348
move HirId to librustc_hir::hir_id
2020-01-04 19:01:42 +01:00
Mazdak Farrokhzad
7a14073875
move def_id to new rustc_hir crate
2020-01-04 19:01:42 +01:00
Mazdak Farrokhzad
7eb7b23b2a
move describe_as_module to where it's used
2020-01-04 19:01:42 +01:00
Mazdak Farrokhzad
e0e9ff06af
remove DefId::to_dep_node (dead code)
2020-01-04 19:01:42 +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
8e15bb6546
canonicalize rustc_session imports
2020-01-04 19:00:25 +01:00
Mazdak Farrokhzad
5ccc1e45bd
move Node{Map,Set} -> rustc_session::node_id
2020-01-04 18:59:28 +01:00
Mazdak Farrokhzad
f507403517
define_id_collections -> rustc_data_structures
2020-01-04 18:57:22 +01:00
Mazdak Farrokhzad
7901c7f707
canonicalize FxHash{Map,Set} imports
2020-01-04 18:57:22 +01:00
Mazdak Farrokhzad
66f5bf1b8b
extract rustc::middle::codegen_fn_attrs
2020-01-04 18:43:06 +01:00
Mazdak Farrokhzad
c19ed3bc5b
fn adt_kind -> wfcheck
2020-01-04 18:43:05 +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
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
Yuki Okushi
76c1454d27
Rollup merge of #67595 - ohadravid:impl-trait-does-not-live-long-enough, r=estebank
...
Suggest adding a lifetime constraint for opaque type
Fixes #67577 , where code like this:
```
struct List {
data: Vec<String>,
}
impl List {
fn started_with<'a>(&'a self, prefix: &'a str) -> impl Iterator<Item=&'a str> {
self.data.iter().filter(|s| s.starts_with(prefix)).map(|s| s.as_ref())
}
}
```
will show this error:
```
Compiling playground v0.0.1 (/playground)
error[E0597]: `prefix` does not live long enough
--> src/lib.rs:6:47
|
5 | fn started_with<'a>(&'a self, prefix: &'a str) -> impl Iterator<Item=&'a str> {
| -- lifetime `'a` defined here --------------------------- opaque type requires that `prefix` is borrowed for `'a`
...
```
but without suggesting the lovely `help: you can add a constraint..`.
r? @estebank
2020-01-03 17:56:21 +09: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
Markus Westerlind
e6e61d9dff
perf: Don't recurse into types that do not need normalizing
...
A bit speculative at this stage but profiling shows that type folding
takes up a substantial amount of time during normalization which may
indicate that many types may be folded despite there being nothing to
normalize
2020-01-02 12:14:23 +01:00
Camille GILLOT
36b6630771
Move stability queries to librustc_passes.
...
Contains:
- check_mod_unstable_api_usage query;
- stability_index query;
- check_unused_or_stable features pass.
2020-01-01 14:15:02 +01:00
Camille GILLOT
eca7797d6b
Move stability.rs to librustc_passes.
2020-01-01 13:28:12 +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
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
50fb8480db
Rollup merge of #67730 - Centril:typeck-pat-cleanup, r=estebank
...
Cleanup pattern type checking, fix diagnostics bugs (+ improvements)
r? @estebank
2019-12-31 19:19:36 +01:00
Mazdak Farrokhzad
3cf2bc0e51
Rollup merge of #67574 - Centril:librustc_lowering, r=Mark-Simulacrum
...
Extract `rustc_ast_lowering` crate from `rustc`
Working towards https://github.com/rust-lang/rust/issues/65031 .
This PR moves `src/librustc/hir/lowering{/, .rs}` to its own crate (`librustc_ast_lowering`) which is very self-contained (only `fn lower_crate` and `trait Resolver` are exposed).
r? @Mark-Simulacrum
2019-12-31 19:19:31 +01:00
Mazdak Farrokhzad
52179c56be
librustc_ast_lowering: fix misc fallout.
2019-12-31 17:56:25 +01:00
Mazdak Farrokhzad
ce8dbf05f9
librustc_ast_lowering: move the files.
2019-12-31 17:27:34 +01:00
bors
769eb2194a
Auto merge of #67699 - cjgillot:passes-resolve, r=Zoxc
...
Move resolve_lifetimes query in librustc_resolve.
Split out of #67688
r? @Zoxc
2019-12-31 16:21:10 +00:00
bors
5095101528
Auto merge of #67752 - Dylan-DPC:rollup-7f9v4nx, r=Dylan-DPC
...
Rollup of 5 pull requests
Successful merges:
- #67430 (doc: minus (U+2212) instead of dash (U+002D) for negative infinity)
- #67697 (Move the region_scope_tree query to librustc_passes.)
- #67719 (Add self to .mailmap)
- #67723 (Add error code explanation for E0477)
- #67735 (Support `-Z ui-testing=yes/no`)
Failed merges:
r? @ghost
2019-12-31 12:58:10 +00:00
Dylan DPC
83f5cf8c4d
Rollup merge of #67697 - cjgillot:passes-scope-tree, r=Zoxc
...
Move the region_scope_tree query to librustc_passes.
Split out of #67688 .
r? @Zoxc
2019-12-31 18:14:03 +05:30
Ohad Ravid
1a4f6b85a7
Change wording for lifetime suggestion for opaque types from constraint to bound
2019-12-31 12:13:35 +01:00
bors
71bb0ff33e
Auto merge of #67597 - estebank:placeholder-type, r=oli-obk
...
Suggest type param when encountering `_` in item signatures
Fix #27435 .
2019-12-31 09:50:49 +00: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
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