Commit Graph

175 Commits

Author SHA1 Message Date
Vadim Petrochenkov
614037171b cleanup: Remove extern crate serialize as rustc_serializes 2019-07-23 19:20:16 +03:00
Vadim Petrochenkov
8f30d26030 hygiene: Tweak naming some more 2019-07-19 12:02:57 +03:00
Vadim Petrochenkov
09703e3843 Adjust other names after the Mark renaming 2019-07-19 12:01:49 +03:00
Jeremy Fitzhardinge
f7d53a96ca Emit artifact notifications for dependency files 2019-07-18 01:02:22 -07:00
Matthew Jasper
34ddc70c3f Move rustc_borrowck -> rustc_ast_borrowck 2019-07-11 18:54:02 +01:00
Shotaro Yamada
b06ed52cfd Remove unused dependencies 2019-07-09 00:17:42 +09:00
Alex Crichton
345ba505ec rustc: Remove dylib crate type from most rustc crates
Now that procedural macros no longer link transitively to libsyntax,
this shouldn't be needed any more! This commit is an experiment in
removing all dynamic libraries from rustc except for librustc_driver
itself. Let's see how far we can get with that!
2019-07-07 03:23:00 +02:00
Mazdak Farrokhzad
2e86c006f7
Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=Zoxc
The (almost) culmination of HirIdification

It's finally over.

This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name.
All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
2019-07-05 20:26:56 +02:00
Mazdak Farrokhzad
485a084b45
Rollup merge of #61545 - flip1995:internal_lints, r=oli-obk
Implement another internal lints

cc #49509

This adds ~~two~~ one internal lint~~s~~:
1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669
2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~

~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~

TODO (not directly relevant for review):
- [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) 🤔 cc @eddyb)
- [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870
- [x] Check explicitly for the `{declare,impl}_lint_pass!` macros

r? @oli-obk
2019-07-05 20:26:51 +02:00
ljedrz
37d7e1f22a rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-04 12:53:12 +02:00
ljedrz
4f7ba515c2 rename hir::map::local_def_id to local_def_id_from_node_id 2019-07-04 12:29:26 +02:00
Mazdak Farrokhzad
e8a88f7d43
Rollup merge of #62039 - jeremystucki:needless_lifetimes, r=eddyb
Remove needless lifetimes (rustc)
2019-07-04 01:38:41 +02:00
Mark Rousskov
25640092c7
Rollup merge of #62128 - ehuss:extra-filename-warning, r=matthewjasper
Adjust warning of -C extra-filename with -o.

If `--emit` includes multiple unnamed outputs, and `-o` was specified, and `-C extra-filename` was specified, the compiler would warn that `-C extra-filename` was ignored, but this is not true.  The "adapting" of the filenames includes the extra-filename info.

Since this is a little convoluted and hard to follow, here is a little chart to summarize when running with `rustc foo.rs -o xyz -C extra-filename=asdf`

`--emit` | Result
---------|--------
`link` | `xyz` (extra-filename ignored)
`link,dep-info` | `xyzasdf`, `xyzasdf.d` (this PR removes the incorrect warning)

As to whether or not this behavior is the best choice is another question.
2019-07-03 09:59:13 -04:00
Jeremy Stucki
ec711767a7
Remove needless lifetimes 2019-07-03 10:01:02 +02:00
Eric Huss
9d798b7198 Adjust warning of -C extra-filename with -o. 2019-06-25 13:31:05 -07:00
flip1995
084c829fb8
Enable internal lints in bootstrap 2019-06-24 10:45:20 +02:00
Matthew Jasper
30b6c59f24 Prefer to use has_errors to err_count 2019-06-22 15:36:24 +01:00
Eduard-Mihai Burtescu
afc39bbf24 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-14 18:58:32 +03:00
Eduard-Mihai Burtescu
f3f9d6dfd9 Unify all uses of 'gcx and 'tcx. 2019-06-14 18:58:23 +03:00
Eduard-Mihai Burtescu
fff08cb043 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu
17cdd356da rustc: replace TyCtxt<'tcx, 'gcx, 'tcx> with TyCtxt<'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
37799a5552 rustc: replace TyCtxt<'a, 'gcx, 'tcx> with TyCtxt<'tcx, 'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
630ec8880c Add deny(unused_lifetimes) to all the crates that have deny(internal). 2019-06-11 14:11:59 +03:00
Niels Sascha Reedijk
56a7f1e77e Haiku: the maximum stack size is 16 MB
When one tries to create a thread with a requested stack size larger
than 16 MB, the call will fail and the compiler will bail out. Therefore
we should limit the size of the thread stack to 16 MB on Haiku.
2019-06-10 08:10:06 +02:00
Alexander Regueiro
a71d55701e Addressed points raised in review. 2019-06-05 21:09:27 +01:00
Alexander Regueiro
aaa53ec853 Implemented for traits (associated type definitions). 2019-06-05 21:09:26 +01:00
Alexander Regueiro
3816958f18 Implemented for function bounds, type bounds, and named existential types. 2019-06-05 21:09:26 +01:00
Eduard-Mihai Burtescu
f7a4c9d7b5 rustc: collect upvars from HIR, instead of during name resolution. 2019-06-01 20:44:05 +03:00
Nicholas Nethercote
26451ef7b5 Avoid unnecessary internings.
Most involving `Symbol::intern` on string literals.
2019-05-27 13:58:38 +10:00
Mazdak Farrokhzad
e4e97caba0
Rollup merge of #61014 - jsgf:emit-artifact-type, r=alexcrichton
Make -Zemit-artifact-notifications also emit the artifact type

This is easier for tooling to handle than trying to reverse-engineer the type from the filename extension. The field name and value is intended to reflect the `--emit` command-line option.

Related issues https://github.com/rust-lang/rust/issues/60988 https://github.com/rust-lang/rust/issues/58465
cc @alexcrichton
2019-05-23 08:37:12 +02:00
Jeremy Fitzhardinge
6c38625942 Make -Zemit-artifact-notifications also emit the artifact type
This is easier for tooling to handle than trying to reverse-engineer it from the filename extension.
2019-05-21 13:51:36 -07:00
John Kåre Alsaker
0b37900b40 Specify the edition for the rustdoc thread-pool 2019-05-21 18:17:06 +02:00
John Kåre Alsaker
a1f2dceaeb Move edition outside the hygiene lock and avoid accessing it 2019-05-21 18:17:05 +02:00
Nicholas Nethercote
999c1fc281 Remove the equality operation between Symbol and strings.
And also the equality between `Path` and strings, because `Path` is made
up of `Symbol`s.
2019-05-13 09:31:30 +10:00
Nicholas Nethercote
fb084a48e2 Pass a Symbol to check_name, emit_feature_err, and related functions. 2019-05-13 09:29:22 +10:00
Eduard-Mihai Burtescu
1618c079ab rustc: rename -Z emit-directives to -Z emit-artifact-notifications and simplify the output. 2019-05-07 04:49:54 +03:00
Eduard-Mihai Burtescu
8d9f4a128c rustc: rename all occurences of "freevar" to "upvar". 2019-05-05 18:49:32 +03:00
Nicholas Nethercote
38dffeba21 Move metadata writing earlier.
The commit moves metadata writing from `link_binary` to
`encode_metadata` (and renames the latter as
`encode_and_write_metadata`). This is at the very start of code
generation.
2019-05-01 17:17:13 +10:00
Nicholas Nethercote
faf5eac854 Move metadata encoding earlier.
This commit separates metadata encoding (`tcx.encode_metadata`) from the
creation of the metadata module (which is now handled by
`write_compressed_metadata`, formerly `write_metadata`).

The metadata encoding now occurs slightly earlier in the pipeline, at
the very start of code generation within `start_codegen`.

Metadata *writing* still occurs near the end of compilation; that will
be moved forward in subsequent commits.
2019-04-30 14:55:10 +10:00
John Kåre Alsaker
0e05a9bb85 Update rustc-rayon version 2019-04-26 19:08:36 +02:00
bors
31f5d69ba4 Auto merge of #60125 - estebank:continue-evaluating, r=oli-obk
Don't stop evaluating due to errors before borrow checking

r? @oli-obk

Fix #60005. Follow up to #59903. Blocked on #53708, fixing the ICE in `src/test/ui/consts/match_ice.rs`.
2019-04-23 09:38:34 +00:00
Esteban Küber
6e723c24a8 Never stop due to errors before borrow checking 2019-04-22 13:11:53 -07:00
Esteban Küber
45bbd14db4 Continue evaluating after item-type checking 2019-04-22 11:31:35 -07:00
Andy Russell
b6f148c8bd
hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
Mateusz Mikuła
87e4b43d51 Deny internal in stage0 2019-04-17 05:15:00 +02:00
Mazdak Farrokhzad
bdf2473289
Rollup merge of #59903 - estebank:after-main, r=oli-obk
Continue evaluating after missing main
2019-04-16 05:14:21 +02:00
Wesley Wiser
56e434d84d Use measureme in self-profiler
Related to #58372
Related to #58967
2019-04-12 20:27:29 -04:00
Esteban Küber
13a05a27e9 Continue evaluating after missing main 2019-04-11 20:01:19 -07:00
flip1995
818d300451
Deny internal lints on librustc_interface 2019-04-03 18:24:21 +02:00
flip1995
28a5c414c3
Check for unstable-options flag before register internals 2019-04-03 18:22:19 +02:00
flip1995
9b2bf70851
Make internal lints allow-by-default 2019-04-03 18:22:19 +02:00
Fabian Drinck
541c4999a9 Remove redundant imports 2019-03-30 22:37:02 +01:00
Mazdak Farrokhzad
bf3e6c63d6
Rollup merge of #59496 - Zoxc:fix-globals, r=oli-obk
Remove unnecessary with_globals calls
2019-03-29 02:40:56 +01:00
John Kåre Alsaker
e9a8befd2d Remove unnecessary with_globals calls 2019-03-28 18:58:43 +01:00
John Kåre Alsaker
cd32f9bcca Remove LintSession and run incremental and whole crate lints in parallel 2019-03-28 16:29:08 +01:00
John Kåre Alsaker
41316f0449 Combine all builtin late lints 2019-03-28 16:29:07 +01:00
Josh Stone
ecf63630cf
Rollup merge of #58837 - Centril:librustc_interface_2018, r=petrochenkov
librustc_interface => 2018

r? @oli-obk

This will likely produce an ICE for some reason... so super-WIP.
2019-03-27 18:15:22 -07:00
Mazdak Farrokhzad
bf1068b137 librustc_interface => 2018; rename rustc-rayon to rayon in Cargo.toml 2019-03-27 09:48:50 +01:00
Mazdak Farrokhzad
14f3f6c712 librustc_interface => 2018 2019-03-27 09:41:42 +01:00
John Kåre Alsaker
7e156c2066 Make some lints incremental 2019-03-25 23:00:34 +01:00
Esteban Küber
c89872cb7d Do not track_errors in register_plugins 2019-03-22 20:15:32 -07:00
bors
0f88167f89 Auto merge of #58847 - bjorn3:remove_metadata_only_cg, r=alexcrichton
Remove metadata only codegen backend

It is unused and probably broken at the moment.
2019-03-18 11:28:12 +00:00
bjorn3
ca2ff089f3 Remove MetadataOnlyCodegenBackend 2019-03-16 10:54:38 +01:00
Tyler Mandry
7c59ce9f5d Add -Z allow_features=... flag 2019-03-14 15:42:20 -07:00
bors
2a8f6a7806 Auto merge of #58488 - wesleywiser:llvm_prof, r=michaelwoerister
Replace TimeLine LLVM profiling with the self profiler
2019-03-14 08:38:56 +00:00
Mazdak Farrokhzad
445c4bc0f8
Rollup merge of #58829 - Xanewok:scoped-tls, r=Zoxc
librustc_interface: Update scoped-tls to 1.0

Done previously as a part of https://github.com/rust-lang/rust/pull/58748.

r? @Zoxc
2019-03-13 03:33:34 +01:00
Wesley Wiser
4c8cc14186 Replace TimeLine with SelfProfiler 2019-03-10 11:10:55 -04:00
John Kåre Alsaker
51938c61f6 Make the rustc driver and interface demand driven 2019-03-10 04:49:45 +01:00
John Kåre Alsaker
7985c6f8ec Rename check_privacy to check_private_in_public 2019-03-06 04:50:50 +01:00
John Kåre Alsaker
140a837fb6 Make misc checking 1 more parallel 2019-03-06 04:47:05 +01:00
John Kåre Alsaker
1745957d63 Make misc checking 2 more parallel 2019-03-06 04:47:04 +01:00
John Kåre Alsaker
d5bb71c9f1 Split up privacy checking so privacy_access_levels only does computations required for AccessLevels 2019-03-06 04:47:03 +01:00
ljedrz
77fa041fc1 hir: remove NodeId from Item 2019-03-02 07:48:52 +01:00
Igor Matuszewski
204f087daf librustc_interface: Update scoped-tls to 1.0
Done previously as a part of
https://github.com/rust-lang/rust/pull/58748
2019-03-01 10:18:53 +01:00
John Kåre Alsaker
23a51f91c9 Introduce rustc_interface and move some methods there 2019-02-28 19:30:31 +01:00