Commit graph

28 commits

Author SHA1 Message Date
mark 9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
Gurpreet Singh d2753f91b5 replaced log with tracing 2020-08-15 13:03:11 -07:00
Matthew Jasper cbcef3effc Rework rustc_serialize
- Move the type parameter from `encode` and `decode` methods to
  the trait.
- Remove `UseSpecialized(En|De)codable` traits.
- Remove blanket impls for references.
- Add `RefDecodable` trait to allow deserializing to arena-allocated
  references safely.
- Remove ability to (de)serialize HIR.
- Create proc-macros `(Ty)?(En|De)codable` to help implement these new
  traits.
2020-08-14 17:34:30 +01:00
Oliver Scherer ec7230fea2 Move from log to tracing 2020-07-31 22:38:20 +02:00
Ralf Jung 8484b9935c
Rollup merge of #72026 - botika:master, r=estebank
Update annotate-snippets-rs to 0.8.0

#59346
I made major changes to this library. In the previous version we worked with owned while in the current one with borrowed.

I have adapted it without changing the behavior.
I have modified the coverage since the previous one did not return correctly the index of the character in the line.
2020-06-08 09:55:18 +02:00
Vadim Petrochenkov 11d951492c Make things build again 2020-06-02 20:38:24 +03:00
Juan Aguilar Santillana e9c78db086 Update annotate-snippets-rs to 0.8.0 2020-05-08 22:48:26 +02:00
John Kåre Alsaker b0b11d31a2 Use termize instead of term_size 2020-01-29 01:13:48 +01:00
Andy Russell 7b564c67de
use winapi for non-stdlib Windows bindings 2020-01-11 20:56:46 -05:00
Vadim Petrochenkov 70f1d57048 Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
Vadim Petrochenkov b9a9c5b4fd Make things build again 2019-12-30 19:18:16 +03:00
Esteban Küber f08b036cc7 Introduce term-size dependency and consider term width when trimming 2019-08-21 11:56:20 -07:00
Mazdak Farrokhzad 571a965143
Rollup merge of #62985 - phansch:support_ui_testing_flag, r=estebank
librustc_errors: Support ui-testing flag in annotate-snippet emitter

This adds support for the `-Z ui-testing` flag to the new
annotate-snippet diagnostic emitter.

Support for the flag was added to `annotate-snippet-rs` in these PRs:

* https://github.com/rust-lang/annotate-snippets-rs/pull/3
* https://github.com/rust-lang/annotate-snippets-rs/pull/5

r? @estebank

Closes #61811
2019-07-26 18:57:01 +02:00
Philipp Hansch dd0f2ac250
librustc_errors: Support ui-testing flag in annotate-snippet emitter
This adds support for the `-Z ui-testing` flag to the new
annotate-snippet diagnostic emitter.

The support for the flag was added to `annotate-snippet-rs` in these PRs:

* https://github.com/rust-lang/annotate-snippets-rs/pull/3
* https://github.com/rust-lang/annotate-snippets-rs/pull/5

Closes #61811
2019-07-25 21:03:53 +02:00
Vadim Petrochenkov 614037171b cleanup: Remove extern crate serialize as rustc_serializes 2019-07-23 19:20:16 +03: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
Philipp Hansch 3f727aeeb7
Add new diagnostic writer using annotate-snippet library
This adds a new diagnostic writer `AnnotateRsEmitterWriter` that uses
the [`annotate-snippet`][as] library to print out the human readable
diagnostics.

The goal is to eventually switch over to using the library instead of
maintaining our own diagnostics output.

This commit does *not* add all the required features to the new
diagnostics writer. It is only meant as a starting point so that other
people can contribute as well.

[as]: https://github.com/rust-lang/annotate-snippets-rs
2019-06-04 18:46:00 +02:00
Taiki Endo 950fe6686d librustc_errors => 2018 2019-02-07 03:53:01 +09:00
David Wood 874e08bdd8
Log when buffering a diagnostic.
This is useful in debugging when and where errors are emitted in
logs.
2018-09-18 13:45:24 +02:00
Mark Rousskov 9ec5ef541a Breaking change upgrades 2018-09-04 13:22:08 -06:00
Alex Crichton a919efad2e rustc: Migrate to termcolor crate from term
This crate moves the compiler's error reporting to using the `termcolor` crate
from crates.io. Previously rustc used a super-old version of the `term` crate
in-tree which is basically unmaintained at this point, but Cargo has been using
`termcolor` for some time now and tools like `rg` are using `termcolor` as well,
so it seems like a good strategy to take!

Note that the `term` crate remains in-tree for libtest. Changing libtest will be
a bit tricky due to how the build works, but we can always tackle that later.

cc #45728
2018-03-07 07:30:33 -08:00
Esteban Küber c60aab29f1 When attempting to write str with single quote suggest double quotes 2017-12-14 22:51:42 -08:00
Michael Woerister 6fccd71f75 librustc_errors: Don't emit the same error message twice. 2017-10-25 15:01:06 +02:00
Niko Matsakis d9aaca71cc store typeck lints in the TypeckTables
Otherwise they are a "hidden output"
2017-02-02 20:38:16 -05:00
Jeffrey Seyfried 191abc4264 Remove unused extern crates. 2017-01-22 01:31:02 +00:00
Alex Crichton a270b8014c rustbuild: Rewrite user-facing interface
This commit is a rewrite of the user-facing interface to the rustbuild build
system. The intention here is to make it much easier to compile/test the project
without having to remember weird rule names and such. An overall view of the new
interface is:

    # build everything
    ./x.py build

    # document everyting
    ./x.py doc

    # test everything
    ./x.py test

    # test libstd
    ./x.py test src/libstd

    # build libcore stage0
    ./x.py build src/libcore --stage 0

    # run stage1 run-pass tests
    ./x.py test src/test/run-pass --stage 1

The `src/bootstrap/bootstrap.py` script is now aliased as a top-level `x.py`
script. This `x` was chosen to be both short and easily tab-completable (no
collisions in that namespace!). The build system now accepts a "subcommand" of
what to do next, the main ones being build/doc/test.

Each subcommand then receives an optional list of arguments. These arguments are
paths in the source repo of what to work with. That is, if you want to test a
directory, you just pass that directory as an argument.

The purpose of this rewrite is to do away with all of the arcane renames like
"rpass" is the "run-pass" suite, "cfail" is the "compile-fail" suite, etc. By
simply working with directories and files it's much more intuitive of how to run
a test (just pass it as an argument).

The rustbuild step/dependency management was also rewritten along the way to
make this easy to work with and define, but that's largely just a refactoring of
what was there before.

The *intention* is that this support is extended for arbitrary files (e.g.
`src/test/run-pass/my-test-case.rs`), but that isn't quite implemented just yet.
Instead directories work for now but we can follow up with stricter path
filtering logic to plumb through all the arguments.
2016-11-02 17:57:28 -07:00
Jonathan Turner 2829fbc638 Address comments and fix travis warning 2016-06-23 08:07:35 -04:00
Jonathan Turner 6ae3502134 Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00