Commit Graph

184 Commits

Author SHA1 Message Date
Michael Woerister
39ffea31df Implement a file-path remapping feature in support of debuginfo and reproducible builds. 2017-04-26 15:44:02 +02:00
Niko Matsakis
a9f6babcda convert privacy access levels into a query 2017-03-23 19:10:45 -04:00
Niko Matsakis
a3a5ff98eb move export_map into the tcx 2017-03-23 14:18:25 -04:00
Eduard Burtescu
4649f7387e rustc_typeck: lift CrateCtxt to TyCtxt. 2017-02-25 17:07:59 +02:00
Eduard-Mihai Burtescu
45c8c5678a rustc: rename TyCtxt's map field to hir. 2017-01-26 13:41:28 +02:00
Seo Sanghyeon
631955888e Avoid rustdoc ICE when an unstable feature is used 2017-01-02 20:32:58 +09:00
Mark Simulacrum
0e43b378c1 Split CtxtArenas into GlobalArenas and CtxtInterners.
CtxtInterners contains a single DroplessArena, while GlobalArenas
contains the TypedArenas still required for the remaining
Drop-containing types.
2016-12-31 11:48:48 -07:00
Eduard-Mihai Burtescu
900191891f rustdoc: link to cross-crate sources directly. 2016-11-30 04:48:56 +02:00
Eduard Burtescu
da47c2e2ac rustc_typeck: save the type cache for rustdoc and save-analysis. 2016-11-28 04:18:10 +02:00
Eduard-Mihai Burtescu
4be7786330 rustdoc: we can now assume DocContext always has a TyCtxt. 2016-11-24 01:40:56 +02:00
Jeffrey Seyfried
a0a9f8ca1b Fix fallout in librustdoc. 2016-11-10 10:04:43 +00:00
Nicholas Nethercote
00e48affde Replace FnvHasher use with FxHasher.
This speeds up compilation by 3--6% across most of rustc-benchmarks.
2016-11-08 15:14:59 +11:00
iirelu
e593c3b893 Changed most vec! invocations to use square braces
Most of the Rust community agrees that the vec! macro is clearer when
called using square brackets [] instead of regular brackets (). Most of
these ocurrences are from before macros allowed using different types of
brackets.

There is one left unchanged in a pretty-print test, as the pretty
printer still wants it to have regular brackets.
2016-10-31 22:51:40 +00:00
bors
6062e7ed3d Auto merge of #37431 - jseyfried:refactor_crate_config, r=eddyb
Move `CrateConfig` from `Crate` to `ParseSess`

This is a syntax-[breaking-change]. Most breakage can be fixed by removing a `CrateConfig` argument.
r? @eddyb
2016-10-30 06:51:30 -07:00
Jeffrey Seyfried
cbd24757eb Move CrateConfig from Crate to ParseSess. 2016-10-29 07:52:58 +00:00
Eduard Burtescu
e34792b181 rustc: move the MIR map into TyCtxt. 2016-10-28 13:55:49 +03:00
Alex Crichton
7724a04b0f rustdoc: Fix documenting rustc-macro crates
This commit adds a "hack" to the session to track whether we're a rustdoc
session or not. If we're rustdoc then we skip the expansion to add the
rustc-macro infrastructure.

Closes #36820
2016-09-30 10:49:30 -07:00
Jonathan Turner
3775be853e Rollup merge of #36586 - japaric:rustdoc-sysroot, r=alexcrichton
rustdoc: implement --sysroot

with the same semantics as rustc. This let us build documentation for a
crate that depends on a custom sysroot.

r? @alexcrichton
cc @cbiffle
2016-09-26 17:29:47 -07:00
Eduard Burtescu
8734aaa33e rustc_metadata: move more RBML tags to auto-serialization. 2016-09-20 20:08:02 +03:00
Eduard Burtescu
02c4155d2c rustc: remove hir::fold. 2016-09-20 20:08:00 +03:00
Eduard Burtescu
fc363cb482 rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
Jorge Aparicio
e0c60b4d02 rustdoc: implement --sysroot
with the same semantics as rustc. This let us build documentation for a
crate that depends on a custom sysroot.
2016-09-19 15:56:38 -05:00
bors
9627e9ef6e Auto merge of #36266 - Sawyer47:issue-35169, r=alexcrichton
rustdoc: Filter more incorrect methods inherited through Deref

Old code filtered out only static methods. This code also excludes &mut self methods if there is no DerefMut implementation.

Fixes #35169
2016-09-07 12:30:03 -07:00
Piotr Jawniak
915bbdac58 rustdoc: Filter more incorrect methods inherited through Deref
Old code filtered out only static methods. This code also excludes
&mut self methods if there is no DerefMut implementation
2016-09-05 20:24:55 +02:00
Keunhong Lee
ca5dfd0c97 Allow CompilerControllers to access rustc_plugin::registry::Registry structure. 2016-09-04 03:22:56 +00:00
Jonas Schievink
5adf003b99 Use deterministic FnvHash{Map,Set} in rustdoc 2016-08-27 15:20:45 +02:00
Niko Matsakis
6bd80d1116 compute and cache HIR hashes at beginning
This avoids the compile-time overhead of computing them twice.  It also fixes
an issue where the hash computed after typeck is differen than the hash before,
because typeck mutates the def-map in place.

Fixes #35549.
Fixes #35593.
2016-08-20 07:26:14 -04:00
Michael Woerister
65eb024542 Remove the 'cfg' field from session::config::Options.
The 'cfg' in the Options struct is only the commandline-specified
subset of the crate configuration and it's almost always wrong to
read that instead of the CrateConfig in HIR crate node.
2016-08-11 09:56:00 -04:00
Michael Woerister
32414310b7 Add the notion of a dependency tracking status to commandline arguments.
Commandline arguments influence whether incremental compilation
can use its compilation cache and thus their changes relative to
previous compilation sessions need to be taking into account. This
commit makes sure that one has to specify for every commandline
argument whether it influences incremental compilation or not.
2016-08-11 09:56:00 -04:00
Jonathan Turner
fad4f32c31 Turn on new errors, json mode. Remove duplicate unicode test 2016-08-07 07:46:49 -07:00
Jonathan Turner
8f044fae36 Remove BasicEmitter 2016-07-14 07:57:46 -04:00
Jeffrey Seyfried
70e2845230 Avoid passing around the thread-local interner in librustc_metadata. 2016-07-11 22:23:35 +00:00
Jeffrey Seyfried
d1e3d6272e Add the after_expand entry point between import resolution and the rest of name resolution 2016-07-01 00:07:32 +00:00
Jonathan Turner
6ae3502134 Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00
Jeffrey Seyfried
3fc0407fb3 Remove the dep-info-no-analysis test and fix other fallout. 2016-06-01 19:20:42 +00:00
bors
2fb6f8e2c9 Auto merge of #33702 - crimsun:pr33678, r=alexcrichton
Resolved rustdoc crash (#33678) by aborting instead of unwrapping.

Also removed Option use and comment to match.

Fixes https://github.com/rust-lang/rust/issues/33678
2016-05-19 05:48:11 -07:00
Niko Matsakis
b711734a5f thread the DepGraph to session/crate-store
This is a [breaking-change] for plugin authors.
You must now create a dep-graph earlier.
2016-05-18 10:10:45 -04:00
User
59e5a5c322 Resolved rustdoc crash (#33678) by aborting instead of unwrapping.
Removed Option use and comment to match.
2016-05-18 03:38:45 +04:30
bors
d3ec9d43cf Auto merge of #33538 - Ms2ger:LocalCrateReader, r=arielb1
Refactor code around LocalCrateReader.
2016-05-13 23:34:52 -07:00
Ms2ger
c0e321abcb Make LocalCrateReader private to creader. 2016-05-11 09:32:05 +02:00
Ms2ger
5511e6568f Hand ownership of the Definitions to map_crate. 2016-05-11 09:32:05 +02:00
Eduard Burtescu
76affa5d6f rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users. 2016-05-11 04:14:58 +03:00
Eduard Burtescu
513d392f7e rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper. 2016-05-11 04:14:58 +03:00
Ms2ger
e919f25180 Delay wrapping Definitions into a RefCell around LocalCrateReader. 2016-05-10 19:36:08 +02:00
Ms2ger
9ac468b841 Store a reference rather than a RefCell in LocalCrateReader. 2016-05-10 15:34:25 +02:00
Jeffrey Seyfried
805666a4d2 Fix fallout in librustdoc and in tests 2016-05-09 12:12:32 +00:00
mitaa
dca7f0162c Remove, now unnecessary, workaround
This used to be done to avoid inlining impls referencing private items,
but is now unnecessary since we actually check that impls do not
reference non-doc-reachable items.
2016-04-24 08:17:14 +02:00
Nick Cameron
1d5a29cf0e debugging, misc fixes 2016-04-20 10:14:16 +12:00
mitaa
77b409a674 Reachability check cross-crate links 2016-04-18 01:56:01 +02:00
mitaa
cfad7ad947 Perform doc-reachability check for inlined impls
This changes the current rule that impls within `doc(hidden)` modules
aren't inlined, to only inlining impls where the implemented
trait and type are reachable in documentation.
2016-04-18 01:55:54 +02:00