Oliver Middleton
ae1dc2a6f9
rustbuild: Fix compiler docs yet again
...
Add support for `-Z force-unstable-if-unmarked` to rustdoc.
2017-06-21 17:59:10 +01:00
Robin Kruppe
8e4f315116
Remove rustc_llvm dependency from librustc
...
Consequently, session creation can no longer initialize LLVM.
The few places that use the compiler without going through
rustc_driver/CompilerCalls thus need to be careful to manually
initialize LLVM (via rustc_trans!) immediately after session
creation.
This means librustc is not rebuilt when LLVM changes.
2017-05-15 11:13:30 +02:00
Robin Kruppe
1a24a591dd
Remove rustc_llvm dependency from rustc_metadata
...
Move the code for loading metadata from rlibs and dylibs from
rustc_metadata into rustc_trans, and introduce a trait to avoid
introducing a direct dependency on rustc_trans.
This means rustc_metadata is no longer rebuilt when LLVM changes.
2017-05-14 20:30:22 +02:00
Corey Farwell
ecd7b48b25
Rollup merge of #41678 - GuillaumeGomez:rustdoc-test-warnings, r=alexcrichton
...
Add option to display warnings in rustdoc
Part of #41574 .
r? @alexcrichton
The output for this file:
```rust
/// ```
/// fn foo(x: u32) {}
///
/// foo(2);
/// let x = 1;
/// panic!();
/// ```
fn foo() {}
/// ```
/// fn foo(x: u32) {}
///
/// foo(2);
/// let x = 1;
/// ```
fn foo2() {}
/// ```
/// fn foo(x: u32) {}
///
/// foo(2);
/// let x = 1;
/// panic!();
/// ```
fn foo3() {}
fn main() {
}
```
is the following:
```
> ./build/x86_64-apple-darwin/stage1/bin/rustdoc -Z unstable-options --display-warnings --test test.rs
running 3 tests
test test.rs - foo (line 1) ... FAILED
test test.rs - foo3 (line 18) ... FAILED
test test.rs - foo2 (line 10) ... ok
successes:
---- test.rs - foo2 (line 10) stdout ----
warning: unused variable: `x`
--> <anon>:2:8
|
2 | fn foo(x: u32) {}
| ^
|
= note: #[warn(unused_variables)] on by default
warning: unused variable: `x`
--> <anon>:5:5
|
5 | let x = 1;
| ^
|
= note: #[warn(unused_variables)] on by default
successes:
test.rs - foo2 (line 10)
failures:
---- test.rs - foo (line 1) stdout ----
warning: unused variable: `x`
--> <anon>:2:8
|
2 | fn foo(x: u32) {}
| ^
|
= note: #[warn(unused_variables)] on by default
warning: unused variable: `x`
--> <anon>:5:5
|
5 | let x = 1;
| ^
|
= note: #[warn(unused_variables)] on by default
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'explicit panic', <anon>:6
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:317
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- test.rs - foo3 (line 18) stdout ----
warning: unused variable: `x`
--> <anon>:2:8
|
2 | fn foo(x: u32) {}
| ^
|
= note: #[warn(unused_variables)] on by default
warning: unused variable: `x`
--> <anon>:5:5
|
5 | let x = 1;
| ^
|
= note: #[warn(unused_variables)] on by default
thread 'rustc' panicked at 'test executable failed:
thread 'main' panicked at 'explicit panic', <anon>:6
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', src/librustdoc/test.rs:317
failures:
test.rs - foo (line 1)
test.rs - foo3 (line 18)
test result: FAILED. 1 passed; 2 failed; 0 ignored; 0 measured
```
2017-05-05 17:35:27 -04:00
Guillaume Gomez
f30ed77f0d
Add option to display warnings in rustdoc
2017-05-02 13:57:08 +02:00
est31
d290849a23
Removal pass for anonymous parameters
...
Removes occurences of anonymous parameters from the
rustc codebase, as they are to be deprecated.
See issue #41686 and RFC 1685.
2017-05-02 05:55:20 +02:00
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