about summary refs log tree commit diff
path: root/src/librustc_traits
AgeCommit message (Collapse)AuthorLines
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+0
rustbuild Remove some random unnecessary lint `allow`s
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 #62168 - ljedrz:the_culmination_of_hiridification, r=ZoxcMazdak Farrokhzad-1/+1
The (almost) culmination of HirIdification It's finally over. This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name. All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
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-04rename hir::map::local_def_id_from_hir_id to local_def_idljedrz-1/+1
2019-07-03Remove needless lifetimesJeremy Stucki-23/+23
2019-07-02introduce `QueryRegionConstraints` struct (no-op)Niko Matsakis-2/+3
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-20rename hir::map::get_by_hir_id to getljedrz-1/+1
2019-06-19Rollup merge of #61842 - Zoxc:trim-lift, r=eddybMazdak Farrokhzad-2/+1
Remove unnecessary lift calls Note that some of these might be useful for sanity checking that there's no infer types or regions. r? @eddyb
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-4/+4
2019-06-16Auto merge of #61754 - nikomatsakis:trait-caching-perf-3, r=pnkfelixbors-1/+1
create a "provisional cache" to restore performance in the case of cycles Introduce a "provisional cache" that caches the results of auto trait resolutions but keeps them from entering the *main* cache until everything is ready. This turned out a bit more complex than I hoped, but I don't see another short term fix -- happy to take suggestions! In the meantime, it's very clear we need to rework the trait solver. This resolves the extreme performance slowdown experienced in #60846 -- I plan to add a perf.rust-lang.org regression test to track this. Caveat: I've not run `x.py test` in full yet. r? @pnkfelix cc @arielb1 Fixes #60846
2019-06-14Remove unnecessary lift callsJohn Kåre Alsaker-2/+1
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-20/+9
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-131/+131
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-47/+23
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-55/+55
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-11/+11
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-66/+66
2019-06-11rename `evaluate_obligation_recursively`Niko Matsakis-1/+1
It does not, in fact, execute in a recursive context.
2019-06-11rustc_traits: deny(unused_lifetimes).Eduard-Mihai Burtescu-1/+2
2019-05-28Rename `OpportunisticTypeResolver` to `OpportunisticVarResolver`varkor-6/+6
2019-05-26Rename "Associated*" to "Assoc*"Andrew Xu-7/+7
We are going to uniform the terminology of all associated items. Methods that may or may not have `self` are called "associated functions". Because `AssociatedFn` is a bit long, we rename `Associated` to `Assoc`.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-2/+3
2019-05-04rustc: collapse relevant DefPathData variants into TypeNs.Eduard-Mihai Burtescu-5/+20
2019-05-01Create ShallowResolvervarkor-1/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Fix rebase from LazyConst removalvarkor-9/+9
2019-05-01Implement TypeRelation::constsvarkor-2/+43
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-04-28Fix lint findings in librustc_traitsflip1995-32/+32
2019-04-27Rollup merge of #60292 - varkor:ty-tuple-substs, r=nikomatsakisMazdak Farrokhzad-14/+20
Replace the `&'tcx List<Ty<'tcx>>` in `TyKind::Tuple` with `SubstsRef<'tcx>` Part of the suggested refactoring for https://github.com/rust-lang/rust/issues/42340. As expected, this is a little messy, because there are many places that the components of tuples are expected to be types, rather than arbitrary kinds. However, it should open up the way for a refactoring of `TyS` itself. r? @nikomatsakis
2019-04-27Auto merge of #59540 - Zoxc:the-arena-2, r=michaelwoeristerbors-20/+14
Use arenas to avoid Lrc in queries #1 Based on https://github.com/rust-lang/rust/pull/59536.
2019-04-26Update handling of Tuplevarkor-14/+20
2019-04-25Update trait queriesJohn Kåre Alsaker-20/+14
2019-04-24Add builtin impls for int and float inference vars in chalkTyler Mandry-14/+19
2019-04-24chalkify: Add Copy/Clone builtinsTyler Mandry-21/+149
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-03Deny internal lints on non conflicting cratesflip1995-0/+1
- libarena - librustc_allocator - librustc_borrowck - librustc_codegen_ssa - librustc_codegen_utils - librustc_driver - librustc_errors - librustc_incremental - librustc_metadata - librustc_passes - librustc_privacy - librustc_resolve - librustc_save_analysis - librustc_target - librustc_traits - libsyntax - libsyntax_ext - libsyntax_pos
2019-03-20Fix a bug in implied boundsscalexm-4/+5
2019-03-20Fix a bug in chalk loweringscalexm-1/+8
Some where clauses were not subtituted for generic bound type vars.
2019-03-20Add unsize impls for arraysscalexm-0/+88
2019-03-20Reorganize `chalk_context::program_clauses`scalexm-319/+343
2019-03-20Gather region constraints not coming from unificationscalexm-55/+34
2019-03-16Revert the `LazyConst` PROliver Scherer-8/+5
2019-03-07HirIdification: replace NodeId method callsljedrz-2/+2
2019-03-05Handle const generics elsewherevarkor-1/+12
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-01hir: remove NodeId from TraitItemljedrz-6/+6
2019-02-27Rename variadic to c_variadicDan Robertson-6/+6
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-14/+14
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-13HirId-ify hir::BodyIdljedrz-6/+6
2019-02-10rustc: doc commentsAlexander Regueiro-7/+7