about summary refs log tree commit diff
path: root/src/librustc/session
AgeCommit message (Collapse)AuthorLines
2019-09-17Take Diagnostic in Handler::emit_diagnosticMark Rousskov-1/+1
2019-09-17Replace DiagnosticBuilder with Diagnostic when emitting errorMark Rousskov-4/+10
2019-09-15Hide diagnostics emitted during --cfg parsingMark Rousskov-1/+12
The early error is more than sufficient for fixing the problem.
2019-09-07Apply suggestions from code reviewAlexander Regueiro-2/+2
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-09-07Aggregation of cosmetic changes made during work on REPL PRs: librustcAlexander Regueiro-97/+101
2019-09-06Fixed grammar/style in error messages and reblessed tests.Alexander Regueiro-10/+10
2019-08-30Auto merge of #63402 - estebank:strip-margin, r=oli-obkbors-2/+6
Strip code to the left and right in diagnostics for long lines Fix #62999.
2019-08-24Improve Rustdoc's handling of procedural macrosAaron Hill-7/+11
Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-08-21Add terminal_width debugging flagEsteban Küber-2/+6
2019-08-13Do not track the sysroot.Joel Galenson-8/+1
As suggested by @alexcrichton, the sysroot only loads libraries that are themselves tracked.
2019-08-12Hash the remapped sysroot instead of the original.Joel Galenson-2/+9
This will help reproducible builds, as the sysroot depends on the working directory.
2019-08-07Use consistent capitalization in -C/-Z helpBrian Anderson-6/+6
2019-07-30Auto merge of #62766 - alexcrichton:stabilize-pipelined-compilation, r=oli-obkbors-47/+107
rustc: Stabilize options for pipelined compilation This commit stabilizes options in the compiler necessary for Cargo to enable "pipelined compilation" by default. The concept of pipelined compilation, how it's implemented, and what it means for rustc are documented in #60988. This PR is coupled with a PR against Cargo (rust-lang/cargo#7143) which updates Cargo's support for pipelined compliation to rustc, and also enables support by default in Cargo. (note that the Cargo PR cannot land until this one against rustc lands). The technical changes performed here were to stabilize the functionality proposed in #60419 and #60987, the underlying pieces to enable pipelined compilation support in Cargo. The issues have had some discussion during stabilization, but the newly stabilized surface area here is: * A new `--json` flag was added to the compiler. * The `--json` flag can be passed multiple times. * The value of the `--json` flag is a comma-separated list of directives. * The `--json` flag cannot be combined with `--color` * The `--json` flag must be combined with `--error-format=json` * The acceptable list of directives to `--json` are: * `diagnostic-short` - the `rendered` field of diagnostics will have a "short" rendering matching `--error-format=short` * `diagnostic-rendered-ansi` - the `rendered` field of diagnostics will be colorized with ansi color codes embedded in the string field * `artifacts` - JSON blobs will be emitted for artifacts being emitted by the compiler The unstable `-Z emit-artifact-notifications` and `--json-rendered` flags have also been removed during this commit as well. Closes #60419 Closes #60987 Closes #60988
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+1
rustbuild Remove some random unnecessary lint `allow`s
2019-07-26Rollup merge of #62801 - bjorn3:remove_lower_128bit_ops, r=alexcrichtonMazdak Farrokhzad-4/+0
Remove support for -Zlower-128bit-ops It is broken and unused cc https://github.com/rust-lang/rust/issues/58969 blocked https://github.com/rust-lang-nursery/compiler-builtins/pull/302 (removes definitions of the lang items removed in this PR) r? @alexcrichton
2019-07-26rustc: Stabilize options for pipelined compilationAlex Crichton-47/+107
This commit stabilizes options in the compiler necessary for Cargo to enable "pipelined compilation" by default. The concept of pipelined compilation, how it's implemented, and what it means for rustc are documented in #60988. This PR is coupled with a PR against Cargo (rust-lang/cargo#7143) which updates Cargo's support for pipelined compliation to rustc, and also enables support by default in Cargo. (note that the Cargo PR cannot land until this one against rustc lands). The technical changes performed here were to stabilize the functionality proposed in #60419 and #60987, the underlying pieces to enable pipelined compilation support in Cargo. The issues have had some discussion during stabilization, but the newly stabilized surface area here is: * A new `--json` flag was added to the compiler. * The `--json` flag can be passed multiple times. * The value of the `--json` flag is a comma-separated list of directives. * The `--json` flag cannot be combined with `--color` * The `--json` flag must be combined with `--error-format=json` * The acceptable list of directives to `--json` are: * `diagnostic-short` - the `rendered` field of diagnostics will have a "short" rendering matching `--error-format=short` * `diagnostic-rendered-ansi` - the `rendered` field of diagnostics will be colorized with ansi color codes embedded in the string field * `artifacts` - JSON blobs will be emitted for artifacts being emitted by the compiler The unstable `-Z emit-artifact-notifications` and `--json-rendered` flags have also been removed during this commit as well. Closes #60419 Closes #60987 Closes #60988
2019-07-25Rollup merge of #62735 - petrochenkov:galloc, r=alexcrichtonMazdak Farrokhzad-1/+1
Turn `#[global_allocator]` into a regular attribute macro It was a 99% macro with exception of some diagnostic details. As a result of the change, `#[global_allocator]` now works in nested modules and even in nameless blocks. Fixes https://github.com/rust-lang/rust/issues/44113 Fixes https://github.com/rust-lang/rust/issues/58072
2019-07-24Gate binary dependency information behind -Zbinary-dep-depinfoMark Rousskov-0/+5
2019-07-24Merge `rustc_allocator` into `libsyntax_ext`Vadim Petrochenkov-1/+1
2019-07-23normalize use of backticks for compiler messages in remaining modulesSamy Kacimi-7/+7
https://github.com/rust-lang/rust/issues/60532
2019-07-19Remove support for -Zlower-128bit-opsbjorn3-4/+0
It is broken and unused
2019-07-11Only error about MSVC + PGO + unwind if we're generating codeWesley Wiser-2/+5
When `rustc` is invoked with the `--print` argument, we don't actually generate any code (unless it's the `native-static-libs` option). So we don't need to error our in this case since there's no risk of generating either LLVM assertions or corrupted binaries.
2019-07-11Revert "Emit warning when trying to use PGO in conjunction with unwinding on ↵Wesley Wiser-4/+4
Windows." This reverts commit 74a39a39a4a0650d110083afa6e0b226f7b61ca9.
2019-07-10Rollup merge of #61853 - EricRahm:use_warning, r=varkorMazdak Farrokhzad-4/+4
Emit warning when trying to use PGO in conjunction with unwinding on … …Windows. This reduces the error introduced for #61002 to just a warning.
2019-07-09Emit warning when trying to use PGO in conjunction with unwinding on Windows.Eric Rahm-4/+4
2019-07-07cli: make help output for -l and -L consistentTshepang Lekhonkhobe-3/+2
2019-07-03Remove needless lifetimesJeremy Stucki-29/+29
2019-07-02Auto merge of #61268 - michaelwoerister:stabilize-pgo, r=alexcrichtonbors-18/+17
Stabilize support for Profile-guided Optimization This PR makes profile-guided optimization available via the `-C profile-generate` / `-C profile-use` pair of commandline flags and adds end-user documentation for the feature to the [rustc book](https://doc.rust-lang.org/rustc/). The PR thus ticks the last two remaining checkboxes of the [stabilization tracking issue](https://github.com/rust-lang/rust/issues/59913). From the tracking issue: > Profile-guided optimization (PGO) is a common optimization technique for ahead-of-time compilers. It works by collecting data about a program's typical execution (e.g. probability of branches taken, typical runtime values of variables, etc) and then uses this information during program optimization for things like inlining decisions, machine code layout, or indirect call promotion. If you are curious about how this can be used, there is a rendered version of the documentation this PR adds available [here]( https://github.com/michaelwoerister/rust/blob/stabilize-pgo/src/doc/rustc/src/profile-guided-optimization.md). r? @alexcrichton cc @rust-lang/compiler
2019-06-25Rollup merge of #62055 - matthewjasper:fix-error-counting, r=pnkfelixMazdak Farrokhzad-9/+6
Fix error counting Count duplicate errors for `track_errors` and other error counting checks. Add FIXMEs to make it clear that we should be moving away from this kind of logic. Closes #61663
2019-06-22Prefer to use `has_errors` to `err_count`Matthew Jasper-9/+6
2019-06-21Remove warnings about incr. comp. generating less debugging output.Michael Woerister-18/+2
2019-06-21Stabilize profile-guided optimization.Michael Woerister-18/+17
2019-06-16Fix tidyVadim Petrochenkov-2/+0
2019-06-16Separate librustc modulechansuke-708/+707
2019-06-11Auto merge of #61741 - Centril:rollup-fgro5kz, r=Centrilbors-2/+6
Rollup of 11 pull requests Successful merges: - #61518 (Add loops to doc list of things not stable in const fn) - #61526 (move some tests into subfolders) - #61550 (Windows 10 SDK is also required now.) - #61606 (Remove some legacy proc macro flavors) - #61652 (Mention slice patterns in array) - #61686 (librustc_errors: Add some more documentation) - #61698 (typeck: Fix const generic in repeat param ICE.) - #61707 (Azure: retry failed awscli installs) - #61715 (make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone) - #61724 (core: use memcmp optimization for 128 bit integer slices) - #61726 (Use `for_each` in `Iterator::partition`) Failed merges: r? @ghost
2019-06-11rustc: deny(unused_lifetimes).Eduard-Mihai Burtescu-1/+1
2019-06-10Address review commentsPhilipp Hansch-2/+2
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-06-10librustc_errors: Add some more documentationPhilipp Hansch-2/+6
2019-06-05librustc_errors: Rename AnnotateRs -> AnnotateSnippetPhilipp Hansch-5/+5
The proper name of the library is `annotate-snippet`, not `annotate-rs`, this commit should get rid of any confusing `AnnotateRs` names. 1. Renames `annotate_rs_emitter.rs` to `annotate_snippet_emitter_writer.rs` so that the difference between the `Emitter` trait and the implementers is more clear. 2. Renames `AnnotateRsEmitterWriter` to `AnnotateSnippetEmitterWriter` 3. Renames `HumanReadableErrorType::AnnotateRs` to `HumanReadableErrorType::AnnotateSnippet`
2019-06-04Add new error-format value to use annotate-snippet outputPhilipp Hansch-14/+35
2019-05-31rustc_codegen_utils: add new mangling scheme implementation.Eduard-Mihai Burtescu-3/+35
2019-05-30Auto merge of #61005 - michaelwoerister:error-pgo-windows-unwind, r=zackmdavisbors-0/+12
Emit error when trying to use PGO in conjunction with unwinding on Windows. This PR makes `rustc` emit an error when trying use PGO in conjunction with `-Cpanic=unwind` on Windows, isn't supported by LLVM yet. The error messages points to https://github.com/rust-lang/rust/issues/61002, which documents this known limitation.
2019-05-29rustc_codegen_llvm: remove LLVM instruction count stats.Eduard-Mihai Burtescu-19/+0
2019-05-28Rename PgoGenerate to something more general.Michael Woerister-17/+19
2019-05-28Allow to specify profiling data output directory as -Zself-profile argument.Michael Woerister-4/+14
2019-05-28Emit error when trying to use PGO in conjunction with unwinding on Windows.Michael Woerister-0/+12
2019-05-27Fix unit test after pgo-use change.Michael Woerister-1/+1
2019-05-27PGO: Check that pgo-use file actually exists. LLVM seems to only emit an ↵Michael Woerister-0/+9
easy-to-overlook warning otherwise.
2019-05-27Use a PathBuf instead of String for representing the pgo-use path internally.Michael Woerister-2/+2
2019-05-27Avoid unnecessary internings.Nicholas Nethercote-10/+9
Most involving `Symbol::intern` on string literals.