about summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2018-09-07switch to using `NonZeroU32` to represent indicesNiko Matsakis-9/+14
2018-09-04Move #[test_case] to a syntax extensionJohn Renner-1/+0
2018-08-31Add deprecated_name argument to the register lint group functionsflip1995-2/+2
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-4/+4
2018-08-27Remove Node* prefix from AnnNodevarkor-19/+19
2018-08-27Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakisbors-0/+1
fix for late-bound regions Fix for https://github.com/rust-lang/rust/issues/53419 r? @nikomatsakis
2018-08-27Move with_globals setup from run_compiler to runJohn Kåre Alsaker-28/+28
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-23use String::new() instead of String::from(""), "".to_string(), "".to_owned() ↵Matthias Krüger-1/+1
or "".into()
2018-08-19mv codemap source_mapDonato Sciarra-3/+3
2018-08-19mv codemap() source_map()Donato Sciarra-8/+8
2018-08-19mv (mod) codemap source_mapDonato Sciarra-2/+2
2018-08-19mv filemap source_fileDonato Sciarra-1/+1
2018-08-19mv CodeMap SourceMapDonato Sciarra-4/+4
2018-08-14Auto merge of #53354 - kennytm:rollup, r=kennytmbors-4/+6
Rollup of 11 pull requests Successful merges: - #53112 (pretty print BTreeSet) - #53208 (Don't panic on std::env::vars() when env is null.) - #53226 (driver: set the syntax edition in phase 1) - #53229 (Make sure rlimit is only ever increased) - #53233 (targets: aarch64: Add bare-metal aarch64 target) - #53239 (rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.) - #53246 (A few cleanups) - #53257 (Idiomatic improvements to IP method) - #53274 (Remove statics field from CodegenCx) - #53290 (Make LLVM emit assembly comments with -Z asm-comments) - #53317 (Mark prior failure to avoid ICE)
2018-08-14Rollup merge of #53229 - varkor:rlimits_min, r=nikomatsakiskennytm-1/+3
Make sure rlimit is only ever increased `libc::setrlimit` will fail if we try to set the rlimit to a value lower than it is currently, so make sure we're never trying to do this. Fixes #52801.
2018-08-14Rollup merge of #53226 - QuietMisdreavus:editions-for-all, r=estebankkennytm-3/+3
driver: set the syntax edition in phase 1 Fixes https://github.com/rust-lang/rust/issues/53203 It seems the way libsyntax handles the desired edition is to use a global, set via `syntax_pos::hygiene::set_default_edition`. Right now, this is set in the driver in `run_compiler`, which is the entry point for running the compiler all the way through to emitting files. Since rustdoc doesn't use this function, it wasn't properly setting this global. (When initially setting up editions in rustdoc, i'd assumed that setting `sessopts.edition` would have done this... `>_>`) This was "fixed" for doctests in https://github.com/rust-lang/rust/pull/52385, but rather than patching in a call to `set_default_edition` in all the places rustdoc sets up the compiler, i've instead moved the call in the driver to be farther in the process. This means that any use of `phase_1_parse_input` with the right session options will have the edition properly set without having to also remember to set libsyntax up separately. r? @rust-lang/compiler
2018-08-14Auto merge of #53085 - ljedrz:cleanup_syntax_structures, r=ljedrzbors-5/+5
Move SmallVector and ThinVec out of libsyntax - move `libsyntax::util::SmallVector` tests to `librustc_data_structures::small_vec` - remove `libsyntax::util::SmallVector` - move `libsyntax::util::thin_vec` to `librustc_data_structures::thin_vec` Other than moving these data structures where they belong it allows modules using `SmallVector<T>` (`SmallVec<[T; 1]>`) to specify their own length (e.g. 8 or 32) independently from `libsyntax`.
2018-08-14syntax: gensym the injected std/core extern crates in the Rust 2018 edition.Eduard-Mihai Burtescu-1/+1
2018-08-13Move SmallVec and ThinVec out of libsyntaxljedrz-5/+5
2018-08-10Auto merge of #53073 - Mark-Simulacrum:data-structures, r=pnkfelixbors-1/+1
Cleanup to librustc::session and related code No functional changes, just some cleanup. This also creates the `rustc_fs_util` crate, but I can remove that change if desired. It felt a little odd to force crates to depend on librustc for some fs utilities; and also seemed good to generally keep the size of librustc lower (for compile times); fs_util will compile in parallel with essentially the first crate since it has no dependencies beyond std.
2018-08-09Don't set rlimit to a lower value than the currentvarkor-1/+3
2018-08-09set the syntax edition in the driver's phase 1QuietMisdreavus-3/+3
2018-08-09Move Fingerprint to data structuresMark Rousskov-1/+1
2018-08-09[nll] librustc_driver: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-06Auto merge of #53002 - QuietMisdreavus:brother-may-i-have-some-loops, r=pnkfelixbors-24/+79
make `everybody_loops` preserve item declarations First half of https://github.com/rust-lang/rust/issues/52545. `everybody_loops` is used by rustdoc to ensure we don't contain erroneous references to platform APIs if one of its uses is pulled in by `#[doc(cfg)]`. However, you can also implement traits for public types inside of functions. This is used by Diesel (probably others, but they were the example that was reported) to get around a recent macro hygiene fix, which has caused their crate to fail to document. While this won't make the traits show up in documentation (that step comes later), it will at least allow files to be generated.
2018-08-04Use diagnostic API on SessionMark Rousskov-1/+1
2018-08-04Move basic_options to impl of DefaultMark Rousskov-1/+1
2018-08-04Normalize variants of CrateType to standard styleMark Rousskov-9/+9
This is a clippy-breaking change.
2018-08-03Move unused trait functions to inherent functionsMark Rousskov-2/+1
2018-08-03Store concrete crate stores where possibleMark Rousskov-15/+14
2018-08-02First pass at json outputWesley Wiser-0/+4
2018-08-02Basic profilingWesley Wiser-0/+11
2018-08-02preserve order if blocks are between itemsQuietMisdreavus-9/+9
2018-08-02more fixes for everybody_loopsQuietMisdreavus-1/+9
2018-08-02make `everybody_loops` keep item declarationsQuietMisdreavus-24/+71
2018-07-30Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkovbors-13/+13
Don't format!() string literals Prefer `to_string()` to `format!()` take 2, this time targetting string literals. In some cases (`&format!("...")` -> `"..."`) also removes allocations. Occurences of `format!("")` are changed to `String::new()`.
2018-07-29Auto merge of #52738 - ljedrz:push_to_extend, r=eddybbors-8/+4
Replace push loops with extend() where possible Or set the vector capacity where I couldn't do it. According to my [simple benchmark](https://gist.github.com/ljedrz/568e97621b749849684c1da71c27dceb) `extend`ing a vector can be over **10 times** faster than `push`ing to it in a loop: 10 elements (6.1 times faster): ``` test bench_extension ... bench: 75 ns/iter (+/- 23) test bench_push_loop ... bench: 458 ns/iter (+/- 142) ``` 100 elements (11.12 times faster): ``` test bench_extension ... bench: 87 ns/iter (+/- 26) test bench_push_loop ... bench: 968 ns/iter (+/- 3,528) ``` 1000 elements (11.04 times faster): ``` test bench_extension ... bench: 311 ns/iter (+/- 9) test bench_push_loop ... bench: 3,436 ns/iter (+/- 233) ``` Seems like a good idea to use `extend` as much as possible.
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-8/+4
2018-07-29Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkovbors-2/+2
Prefer to_string() to format!() Simple benchmarks suggest in some cases it can be faster by even 37%: ``` test converting_f64_long ... bench: 339 ns/iter (+/- 199) test converting_f64_short ... bench: 136 ns/iter (+/- 34) test converting_i32_long ... bench: 87 ns/iter (+/- 16) test converting_i32_short ... bench: 87 ns/iter (+/- 49) test converting_str ... bench: 54 ns/iter (+/- 15) test formatting_f64_long ... bench: 349 ns/iter (+/- 176) test formatting_f64_short ... bench: 145 ns/iter (+/- 14) test formatting_i32_long ... bench: 98 ns/iter (+/- 14) test formatting_i32_short ... bench: 93 ns/iter (+/- 15) test formatting_str ... bench: 86 ns/iter (+/- 23) ```
2018-07-29Auto merge of #52764 - sinkuu:cleanup, r=nikomatsakisbors-9/+4
Misc cleanups
2018-07-28Auto merge of #52355 - pietroalbini:zfeature, r=eddybbors-1/+5
Add the -Zcrate-attr=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zcrate-attr=foo`. The option can be used to inject crate-level attributes from the CLI, and it's meant to be used by tools like Crater that needs to add their own attributes to a crate without changing the source code. The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable. cc https://github.com/rust-lang-nursery/crater/issues/282 @Mark-Simulacrum
2018-07-28Don't format!() string literalsljedrz-13/+13
2018-07-28Rollup merge of #52781 - ljedrz:avoid_vec_arguments, r=nikomatsakiskennytm-9/+9
Use a slice where a vector is not necessary
2018-07-27Auto merge of #52336 - ishitatsuyuki:dyn-rollup, r=Mark-Simulacrumbors-2/+0
Rollup of bare_trait_objects PRs All deny attributes were moved into bootstrap so they can be disabled with a line of config. Warnings for external tools are allowed and it's up to the tool's maintainer to keep it warnings free. r? @Mark-Simulacrum cc @ljedrz @kennytm
2018-07-27Add the -Zcrate-attr=foo nightly rustc flag to inject crate attributesPietro Albini-1/+5
2018-07-27Use slices where a vector is not necessaryljedrz-9/+9
2018-07-27SimplifyShotaro Yamada-2/+2
2018-07-27Use str::repeatShotaro Yamada-7/+2
2018-07-27Prefer to_string() to format!()ljedrz-2/+2