summary refs log tree commit diff
path: root/src/librustc_interface
AgeCommit message (Collapse)AuthorLines
2020-03-05Auto merge of #69746 - Dylan-DPC:rollup-wr6dvdk, r=Dylan-DPCbors-1/+1
Rollup of 8 pull requests Successful merges: - #69697 (Add explanation for E0380) - #69698 (Use associated constants of integer types) - #69711 (Update macros.rs: fix documentation typo.) - #69713 (more clippy cleanups) - #69728 (Make link to `std::str` active) - #69732 (Clean E0382 and E0384 explanations) - #69736 (even more clippy cleanups) - #69742 (Fixed a typo) Failed merges: r? @ghost
2020-03-05Add a new test to reach const_limit setting, although with wrong WARNINGs yetChristoph Schmidler-1/+1
rename feature to const_eval_limit
2020-03-04Don't use "if let" bindings to only check a value and not actually bind ↵Matthias Krüger-1/+1
anything. For example: `if let Some(_) = foo() {}` can be reduced to `if foo().is_some() {}` (clippy::redundant_pattern_matching)
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-23/+22
2020-02-29Make it build againVadim Petrochenkov-4/+4
2020-02-28Rollup merge of #69481 - matthiaskrgr:single_char, r=ecstatic-morseMazdak Farrokhzad-1/+1
use char instead of &str for single char patterns
2020-02-27don't use .into() to convert types into identical types.Matthias Krüger-1/+1
example: let s: String = format!("hello").into();
2020-02-27use char instead of &str for single char patternsMatthias Krüger-1/+1
2020-02-24parse/ast: move `Defaultness` into variants.Mazdak Farrokhzad-2/+2
2020-02-19Split query stats into its own fileJohn Kåre Alsaker-3/+3
2020-02-18Rollup merge of #69194 - Centril:assoc-extern-fuse, r=petrochenkovMazdak Farrokhzad-1/+1
parse: fuse associated and extern items up to defaultness Language changes: - The grammar of extern `type` aliases is unified with associated ones, and becomes: ```rust TypeItem = "type" ident generics {":" bounds}? where_clause {"=" type}? ";" ; ``` Semantic restrictions (`ast_validation`) are added to forbid any parameters in `generics`, any bounds in `bounds`, and any predicates in `where_clause`, as well as the presence of a type expression (`= u8`). (Work still remains to fuse this with free `type` aliases, but this can be done later.) - The grammar of constants and static items (free, associated, and extern) now permits the absence of an expression, and becomes: ```rust GlobalItem = {"const" {ident | "_"} | "static" "mut"? ident} {"=" expr}? ";" ; ``` - A semantic restriction is added to enforce the presence of the expression (the body). - A semantic restriction is added to reject `const _` in associated contexts. Together, these changes allow us to fuse the grammar of associated items and extern items up to `default`ness which is the main goal of the PR. ----------------------- We are now very close to fully fusing the entirely of item parsing and their ASTs. To progress further, we must make a decision: should we parse e.g. `default use foo::bar;` and whatnot? Accepting that is likely easiest from a parsing perspective, as it does not require using look-ahead, but it is perhaps not too onerous to only accept it for `fn`s (and all their various qualifiers), `const`s, `static`s, and `type`s. r? @petrochenkov
2020-02-17Rename `FunctionRetTy` to `FnRetTy`Yuki Okushi-2/+2
2020-02-16Other crates.Camille GILLOT-1/+2
2020-02-15ast: move Generics into AssocItemKindsMazdak Farrokhzad-1/+1
2020-02-13Move resolve_instance to rustc_ty.Camille GILLOT-0/+1
2020-02-13Constness -> enum Const { Yes(Span), No }Mazdak Farrokhzad-1/+1
Same idea for `Unsafety` & use new span for better diagnostics.
2020-02-12Rollup merge of #68487 - 0dvictor:nolink, r=tmandryYuki Okushi-2/+15
[experiment] Support linking from a .rlink file Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file. Part of Issue #64191
2020-02-11Rollup merge of #66498 - bjorn3:less_feature_flags, r=Dylan-DPCDylan DPC-2/+0
Remove unused feature gates I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
2020-02-11Support linking from a .rlink fileVictor Ding-2/+15
Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file.
2020-02-07Remove unused feature gates from librustc_interfacebjorn3-2/+0
2020-02-06Remove the `Forest` typeJohn Kåre Alsaker-15/+15
2020-02-04Rollup merge of #68815 - matthiaskrgr:redundant_imports, r=alexcrichtonDylan DPC-5/+0
remove redundant imports (clippy::single_component_path_imports)
2020-02-04Auto merge of #68601 - 0dvictor:split, r=tmandrybors-10/+13
Split `join_codegen_and_link()` into two steps `join_codegen_and_link()` is split to `join_codegen()` and `link()`.
2020-02-04Split `join_codegen_and_link()` into two stepsVictor Ding-10/+13
`join_codegen_and_link()` is split to `join_codegen()` and `link()`.
2020-02-04remove redundant imports (clippy::single_component_path_imports)Matthias Krüger-5/+0
2020-02-02Rollup merge of #68460 - sinkuu:emit_mir_buffered, r=Mark-SimulacrumYuki Okushi-2/+2
Use BufWriter for emitting MIR I noticed that `--emit=mir` takes long time on a large crate. https://github.com/rust-lang/rust/pull/64344 seem to have fixed `-Zdump-mir`, but not `--emit=mir`.
2020-02-01syntax: reexport attr globalsMazdak Farrokhzad-5/+5
2020-02-01pacify the parallel compilerMazdak Farrokhzad-3/+3
2020-02-011. move node_id to syntaxMazdak Farrokhzad-4/+5
2. invert rustc_session & syntax deps 3. drop rustc_session dep in rustc_hir
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-2/+3
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-02-01syntax: move GLOBALS to attr moduleMazdak Farrokhzad-2/+2
2020-02-01{syntax -> rustc_ast_passes}::node_countMazdak Farrokhzad-2/+1
2020-02-01Use BufWriterShotaro Yamada-2/+2
2020-01-30Use `P` for `NtTraitItem`, `NtImplItem`, and `NtForeignItem`.Nicholas Nethercote-2/+2
This commit reduces the size of `Nonterminal` from a whopping 240 bytes to 72 bytes (on x86-64), which gets it below the `memcpy` threshold. It also removes some impedance mismatches with `Annotatable`, which already uses `P` for these variants.
2020-01-22Privatize private fields of OutputFilenamesMark Rousskov-19/+14
2020-01-17Rollup merge of #67791 - Zoxc:lift-interning, r=eddybDylan DPC-7/+2
Implement Lift using interners instead of in_arena r? @eddyb cc @cjgillot
2020-01-16Rollup merge of #67780 - cjgillot:passes-ty, r=ZoxcDylan DPC-0/+2
Move some queries from rustc::ty to librustc_ty. cc #65031
2020-01-15Rollup merge of #68141 - euclio:replace-bindings-with-winapi, r=alexcrichtonYuki Okushi-8/+9
use winapi for non-stdlib Windows bindings
2020-01-13Do not forget to provide queries.Camille GILLOT-0/+1
2020-01-13Move to new crate rustc_ty.Camille GILLOT-0/+1
2020-01-12Auto merge of #67901 - matthewjasper:split-mir-build, r=nagisabors-0/+3
Split MIR building into its own crate This moves `rustc_mir::{build, hair, lints}` to `rustc_mir_build`. The new crate only has a `provide` function as it's public API. Based on #67898 cc @Centril @rust-lang/compiler r? @oli-obk
2020-01-12Split `rustc_mir::{build, hair, lints}` into their own crateMatthew Jasper-0/+3
2020-01-11use winapi for non-stdlib Windows bindingsAndy Russell-8/+9
2020-01-11Use Arena for interningJohn Kåre Alsaker-7/+2
2020-01-11fix ui-fulldeps & tests falloutMazdak Farrokhzad-21/+21
2020-01-11move rustc::lint::{context, passes} to rustc_lint.Mazdak Farrokhzad-11/+12
Also do some cleanup of the interface.
2020-01-11Rollup merge of #68043 - Zoxc:missing-timers, r=wesleywiserMazdak Farrokhzad-20/+40
Add some missing timers Based on https://github.com/rust-lang/rust/pull/67988 r? @wesleywiser
2020-01-11{syntax -> rustc_ast_passes}::show_spanMazdak Farrokhzad-1/+1
2020-01-11{syntax -> rustc_ast_passes}::feature_gateMazdak Farrokhzad-1/+1
2020-01-11ast_validation -> new crate rustc_ast_passesMazdak Farrokhzad-2/+3