about summary refs log tree commit diff
path: root/src/librustc/ty/context.rs
AgeCommit message (Collapse)AuthorLines
2019-04-26Update handling of Tuplevarkor-3/+7
2019-04-25ignore-tidy-filelength on all files with greater than 3000 linesvarkor-0/+2
2019-04-21Enable migrate mode by default on the 2015 editionMatthew Jasper-53/+7
This also fully stabilizes two-phase borrows on all editions
2019-04-14Auto merge of #59335 - Aaron1011:fix/extern-priv-final, r=Aaron1011bors-0/+10
Properly parse '--extern-private' with name and path It turns out that https://github.com/rust-lang/rust/pull/57586 didn't properly parse `--extern-private name=path`. This PR properly implements the `--extern-private` option. I've added a new `extern-private` option to `compiletest`, which causes an `--extern-private` option to be passed to the compiler with the proper path. Part of https://github.com/rust-lang/rust/issues/44663
2019-04-14HirIdify hir::Defljedrz-3/+9
2019-04-14Properly parse '--extern-private' with name and pathAaron Hill-0/+10
2019-04-05Introduce an arena type which may be used to allocate a list of types with ↵John Kåre Alsaker-0/+3
destructors
2019-04-03Add trait_object_dummy_self to CommonTypesflip1995-0/+7
2019-04-02Replace adt_def with name in mir::ProjectionElem::DowncastTyler Mandry-16/+16
2019-04-01Allow closure to unsafe fn coercionTaiki Endo-2/+6
2019-03-28Rollup merge of #59216 - stepnivlk:type_dependent_defs-wrappers, r=oli-obkMazdak Farrokhzad-0/+9
Type dependent defs wrappers First of all, forgive me if something would seem lame to you or I offend some rule (although I tried to read through docs), this is my first PR. Issue: https://github.com/rust-lang/rust/issues/59094 This PR adds 3 helper methods to `TypeckTables`: * `opt_type_dependent_def` * `opt_type_dependent_def_id` * `type_dependent_def_id` I didn't add `type_dependent_def` as was proposed in the issue simply because it wasn't used anywhere in the code. Only non-option wrapped`type_dependent_defs()[]` accesses were found in clippy which always called `def_id()` on result. Speaking of clippy, should I open separate PR in its own repo, given it's used as submodule here? Sry it took me so long, as I said I'm new here and I had tough week :).
2019-03-16Revert the `LazyConst` PROliver Scherer-26/+17
2019-03-16Add def getting methods to librustc/ty/contextTomas Koutsky-0/+9
2019-03-15rustc: remove TyCtxt::parent_def_id in favor of TyCtxt::parent.Eduard-Mihai Burtescu-2/+2
2019-03-14Auto merge of #58176 - Zoxc:lint-levels, r=oli-obkbors-23/+37
Only insert nodes which changes lint levels in the LintLevelMap r? @eddyb
2019-03-13Auto merge of #56864 - Zoxc:stable-hash-macro, r=michaelwoeristerbors-3/+5
Use derive macro for HashStable Blocked on https://github.com/rust-lang/rust/pull/56795
2019-03-13Use derive macro for HashStableJohn Kåre Alsaker-3/+5
2019-03-11Remove precompute_in_scope_traits_hashesJohn Kåre Alsaker-10/+0
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-50/+37
2019-03-09Rollup merge of #58670 - saleemjaffer:refactor_typecast_check_kinds, r=oli-obkMazdak Farrokhzad-17/+17
fixes rust-lang#52482
2019-03-08expand unused doc comment diagnosticAndy Russell-6/+9
Report the diagnostic on macro expansions, and add a label indicating why the comment is unused.
2019-03-07HirIdification: replace NodeId method callsljedrz-5/+5
2019-03-05Take const into account in contextvarkor-26/+74
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Only insert nodes which changes lint levels in the LintLevelMapJohn Kåre Alsaker-23/+37
2019-03-05fixes rust-lang#52482Saleem Jaffer-17/+17
2019-03-03Auto merge of #58673 - matthewjasper:typeck-ptr-coercions, r=pnkfelixbors-8/+12
[NLL] Type check operations with pointer types It seems these were forgotten about. Moving to `Rvalue::AddressOf` simplifies the coercions from references, but I want this to be fixed as soon as possible. r? @pnkfelix
2019-03-01ty: HirIdify some lintsljedrz-27/+6
2019-02-28Introduce rustc_interface and move some methods thereJohn Kåre Alsaker-3/+1
2019-02-27Rename variadic to c_variadicDan Robertson-3/+3
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2019-02-27rename Substs to InternalSubstscsmoe-7/+7
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-26replace &'tcx Substs with SubstsRefcsmoe-12/+12
2019-02-24hir: remove NodeId from Blockljedrz-2/+2
2019-02-23Type check coercions to pointer typesMatthew Jasper-8/+12
2019-02-19Auto merge of #57896 - oli-obk:permissive_existence, r=cramertjbors-1/+12
Be more permissive with required bounds on existential types fixes #54184 r? @pnkfelix
2019-02-13Rollup merge of #58273 - taiki-e:rename-dependency, r=matthewjasperMazdak Farrokhzad-2/+2
Rename rustc_errors dependency in rust 2018 crates I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules. Related: rust-lang/cargo#5653 cc #58099 r? @Centril
2019-02-13Rollup merge of #58137 - ljedrz:cleanup_node_id_to_type, r=estebankMazdak Farrokhzad-12/+9
Cleanup: rename node_id_to_type(_opt) Renames `node_id_to_type(_opt)` to `hir_id_to_type(_opt)`; this makes it clear we are dealing with HIR nodes and their IDs here. In addition, a drive-by commit removing `ty::item_path::hir_path_str` (as requested by @eddyb).
2019-02-13Cleanup importsTaiki Endo-1/+1
2019-02-13Rename rustc_errors dependency in rust 2018 cratesTaiki Endo-2/+2
2019-02-10rustc: doc commentsAlexander Regueiro-11/+11
2019-02-10Auto merge of #57770 - Zoxc:no-hash-query, r=michaelwoeristerbors-2/+3
Add a query type which is always marked as red if it runs This is useful for queries which produce results which are very likely to change if their inputs do. I also expect this to be useful for end to end queries because 1) we don't need `HashStable` impls and 2) we avoid the overhead of hashing the result of large results like the AST or the HIR map. r? @michaelwoerister
2019-02-09cleanup: rename node_id_to_type(_opt)ljedrz-12/+9
2019-02-09Auto merge of #58207 - nnethercote:intern_lazy_const, r=oli-obkbors-10/+12
Make `intern_lazy_const` actually intern its argument. Currently it just unconditionally allocates it in the arena. For a "Clean Check" build of the the `packed-simd` benchmark, this change reduces both the `max-rss` and `faults` counts by 59%; it slightly (~3%) increases the instruction counts but the `wall-time` is unchanged. For the same builds of a few other benchmarks, `max-rss` and `faults` drop by 1--5%, but instruction counts and `wall-time` changes are in the noise. Fixes #57432, fixes #57829.
2019-02-08Add a query type which is always marked as red if it runsJohn Kåre Alsaker-2/+3
2019-02-06Make `intern_lazy_const` actually intern its argument.Nicholas Nethercote-10/+12
Currently it just unconditionally allocates it in the arena. For a "Clean Check" build of the the `packed-simd` benchmark, this change reduces both the `max-rss` and `faults` counts by 59%; it slightly (~3%) increases the instruction counts but the `wall-time` is unchanged. For the same builds of a few other benchmarks, `max-rss` and `faults` drop by 1--5%, but instruction counts and `wall-time` changes are in the noise. Fixes #57432, fixes #57829.
2019-02-05move librustc to 2018Mark Mansi-50/+50
2019-02-01Auto merge of #57937 - denzp:nvptx, r=nagisabors-0/+6
NVPTX target specification This change adds a built-in `nvptx64-nvidia-cuda` GPGPU no-std target specification and a basic PTX assembly smoke tests. The approach is taken here and the target spec is based on `ptx-linker`, a project started about 1.5 years ago. Key feature: bitcode object files being linked with LTO into the final module on the linker's side. Prior to this change, the linker used a `ld` linker-flavor, but I think, having the special CLI convention is a more reliable way. Questions about further progress on reliable CUDA workflow with Rust: 1. Is it possible to create a test suite `codegen-asm` to verify end-to-end integration with LLVM backend? 1. How would it be better to organise no-std `compile-fail` tests: add `#![no_std]` where possible and mark others as `ignore-nvptx` directive, or alternatively, introduce `compile-fail-no-std` test suite? 1. Can we have the `ptx-linker` eventually be integrated as `rls` or `clippy`? Hopefully, this should allow to statically link against LLVM used in Rust and get rid of the [current hacky solution](https://github.com/denzp/rustc-llvm-proxy). 1. Am I missing some methods from `rustc_codegen_ssa::back::linker::Linker` that can be useful for bitcode-only linking? Currently, there are no major public CUDA projects written in Rust I'm aware of, but I'm expecting to have a built-in target will create a solid foundation for further experiments and awesome crates. Related to #38789 Fixes #38787 Fixes #38786
2019-02-01Restrict concrete types to equivalent typesOliver Scherer-1/+12
2019-01-28Use multiple threads by default. Limits tests to one thread. Do some renaming.John Kåre Alsaker-7/+7
2019-01-27Fix indentationOliver Scherer-1/+1
2019-01-27Create `nvptx64-nvidia-cuda` target specificationDenys Zariaiev-0/+6