summary refs log tree commit diff
path: root/src/librustc/lib.rs
AgeCommit message (Collapse)AuthorLines
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-1/+1
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-12-06Use `to_option` in various placesvarkor-0/+1
2019-12-03Move Session to librustc_sessionMark Rousskov-6/+1
2019-11-27Move ExprUseVisitor and mem_categorization to rustc_typeckMatthew Jasper-2/+0
`MemCategorizationContext` is now private, the remaining types and traits remain public for Clippy.
2019-11-21Stabilize the `never_type`, written `!`.Mazdak Farrokhzad-1/+1
2019-11-15Rollup merge of #66013 - nnethercote:avoid-hashing-twice-in-get_query, r=ZoxcYuki Okushi-0/+1
Avoid hashing the key twice in `get_query()`. For a single-threaded parallel compiler, this reduces instruction counts across several benchmarks, by up to 2.8%. The commit also adds documentation about `Sharded`'s use of `FxHasher`. r? @Zoxc
2019-11-14Update to use new librustc_error_codes libraryGuillaume Gomez-2/+0
2019-11-13Rollup merge of #66335 - Mark-Simulacrum:self-profile-to-data, ↵Yuki Okushi-1/+0
r=michaelwoerister Move self-profile infrastructure to data structures The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal). This is intended as a precursor to moving Session out of librustc, but since that involves lots of smaller steps that move around code I'm splitting it up into separate PRs.
2019-11-12Snap cfgsMark Rousskov-2/+0
2019-11-12Move self-profile infrastructure to data structuresMark Rousskov-1/+0
The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal).
2019-11-04Avoid hashing the key twice in `get_query()`.Nicholas Nethercote-0/+1
For a single-threaded parallel compiler, this reduces instruction counts across several benchmarks, by up to 2.8%. The commit also adds documentation about `Sharded`'s use of `FxHasher`.
2019-10-25RFC 2008: StabilizationDavid Wood-1/+1
This commit stabilizes RFC 2008 (#44109) by removing the feature gate. Signed-off-by: David Wood <david@davidtw.co>
2019-10-20also check the iterator is not too longRalf Jung-0/+1
2019-10-15Stabilize proc macros generating `macro_rules` itemsVadim Petrochenkov-1/+1
2019-10-08Stabilize mem::take (mem_take)Jon Gjengset-1/+0
Tracking issue: https://github.com/rust-lang/rust/issues/61129
2019-10-05Rollup merge of #65105 - Mark-Simulacrum:split-librustc, r=nikomatsakisTyler Mandry-4/+0
Split out some passes from librustc This is just moving them out to librustc_passes -- I've not measured compile time or run time. I don't expect any significant impact, but this seems prudent regardless.
2019-10-05Rollup merge of #64708 - SimonSapin:option-deref, r=CentrilTyler Mandry-1/+0
Stabilize `Option::as_deref` and `Option::as_deref_mut` The tracking issue https://github.com/rust-lang/rust/issues/50264 still has unresolved question for the corresponding `Result` methods.
2019-10-04middle::intrinsicck -> rustc_passesMark Rousskov-1/+0
2019-10-04middle::entry -> rustc_passesMark Rousskov-1/+0
2019-10-04middle::dead -> rustc_passesMark Rousskov-1/+0
2019-10-04move middle::liveness to rustc_passesMark Rousskov-1/+0
2019-09-27cleanup dead ast-borrowck / migrate-mode code.Mazdak Farrokhzad-1/+0
2019-09-23Stabilize Option::deref and Option::deref_mutSimon Sapin-1/+0
The tracking issue https://github.com/rust-lang/rust/issues/50264 still has unresolved question for the corresponding `Result` methods.
2019-09-15Auto merge of #60584 - jonas-schievink:ice-panic-hook, r=oli-obkbors-1/+0
Use `panic::set_hook` to print the ICE message This allows custom frontends and backends to override the hook with their own, for example to point people to a different issue tracker. ICE messages are printed in a slightly different order now. Nightly prints: ``` thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21 note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0658. For more information about an error, try `rustc --explain E0277`. error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: rustc 1.36.0-nightly (08bfe1612 2019-05-02) running on x86_64-unknown-linux-gnu ``` After this PR, rustc prints: ``` thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21 note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: rustc 1.36.0-dev running on x86_64-unknown-linux-gnu error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0658. For more information about an error, try `rustc --explain E0277`. ```
2019-09-07Rollup merge of #64139 - Mark-Simulacrum:strip-legacy-proc-macro, r=petrochenkovMazdak Farrokhzad-6/+0
Migrate internal diagnostic registration to macro_rules Review is best done commit-by-commit. Fixes #64132.
2019-09-06Move the HIR cfg to `rustc_ast_borrowck`Matthew Jasper-1/+0
No new code should be using it.
2019-09-05Remove rustc_diagnostic_macros featureMark Rousskov-1/+0
2019-09-05Replace diagnostic plugins with macro_rulesMark Rousskov-5/+0
2019-08-30Move librustc panic handler into the new oneJonas Schievink-1/+0
2019-08-30Add a "diagnostic item" schemeOliver Scherer-0/+2
This allows lints and other diagnostics to refer to items by a unique ID instead of relying on whacky path resolution schemes that may break when items are relocated.
2019-08-08Use associated_type_bounds where applicable - closes #61738Ilija Tovilo-0/+1
2019-08-02librustc: Unconfigure tests during normal buildVadim Petrochenkov-13/+3
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-2/+0
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-3/+1
rustbuild Remove some random unnecessary lint `allow`s
2019-07-25Rollup merge of #62735 - petrochenkov:galloc, r=alexcrichtonMazdak Farrokhzad-1/+0
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-24Merge `rustc_allocator` into `libsyntax_ext`Vadim Petrochenkov-1/+0
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-8/+0
2019-07-13Make `newtype_index` hygienic and use allow_internal_unstableMatthew Jasper-2/+0
2019-07-07Remove some dummy dependenciesJohn Kåre Alsaker-4/+2
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-1/+0
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-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-1/+0
Implement another internal lints cc #49509 This adds ~~two~~ one internal lint~~s~~: 1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669 2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~ ~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~ TODO (not directly relevant for review): - [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb) - [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870 - [x] Check explicitly for the `{declare,impl}_lint_pass!` macros r? @oli-obk
2019-07-04Rollup merge of #62249 - czipperz:use-mem-take-instead-of-replace-default, ↵Mazdak Farrokhzad-0/+1
r=dtolnay,Centril Use mem::take instead of mem::replace with default
2019-07-01Enable mem_take feature in relevant cratesChris Gregory-0/+1
2019-07-01rustc: use a separate copy of P for HIR than for AST.Eduard-Mihai Burtescu-0/+2
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-22Deny explicit_outlives_requirements in the compilerMatthew Jasper-1/+0
2019-06-11rustc: deny(unused_lifetimes).Eduard-Mihai Burtescu-0/+1
2019-04-25Introduce hir::ExprKind::Use and employ in for loop desugaring.Mazdak Farrokhzad-0/+1
Here, ExprKind::Use(P<Expr>) tweaks the drop order to act the same way as '{ let _tmp = expr; _tmp }' does.
2019-04-18Auto merge of #60025 - JohnTitor:rename-files, r=petrochenkovbors-1/+1
Rename files about error codes fixes #60017 This PR will be failed in tidy. <details> <summary>The log is here:</summary> ``` tidy check tidy error: duplicate error code: 411 tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:83: __diagnostic_used!(E0411); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:84: err.code(DiagnosticId::Error("E0411".to_owned())); tidy error: duplicate error code: 424 tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:90: debug!("smart_resolve_path_fragment: E0424, source={:?}", source); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:92: __diagnostic_used!(E0424); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:93: err.code(DiagnosticId::Error("E0424".to_owned())); some tidy checks failed ``` </details> I'd like to fix this but I don't know what to do. I will work on later. Please let me know if you have any solutions. r? @petrochenkov
2019-04-17Rename modulesYuki OKUSHI-1/+1