Commit Graph

254 Commits

Author SHA1 Message Date
Oliver Scherer
7710820d18 Fiddle param env through to try_eval_bits in most places 2019-08-05 17:48:05 +02:00
varkor
c28ce3e4ca Replace "existential" by "opaque" 2019-08-02 02:44:36 +01:00
Vadim Petrochenkov
676d282dd3 Deny unused_lifetimes through rustbuild 2019-07-28 18:47:02 +03:00
Vadim Petrochenkov
434152157f Remove lint annotations in specific crates that are already enforced by rustbuild
Remove some random unnecessary lint `allow`s
2019-07-28 18:46:24 +03:00
Alex Crichton
345ba505ec rustc: Remove dylib crate type from most rustc crates
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-07 03:23:00 +02:00
Mazdak Farrokhzad
2e86c006f7
Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=Zoxc
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-05 20:26:56 +02:00
Mazdak Farrokhzad
485a084b45
Rollup merge of #61545 - flip1995:internal_lints, r=oli-obk
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) 🤔 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-05 20:26:51 +02:00
ljedrz
37d7e1f22a rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-04 12:53:12 +02:00
Jeremy Stucki
d28832dde9
Remove needless lifetimes 2019-07-03 10:01:02 +02:00
Niko Matsakis
7e66a96d58 introduce QueryRegionConstraints struct (no-op) 2019-07-02 12:15:19 -04:00
flip1995
084c829fb8
Enable internal lints in bootstrap 2019-06-24 10:45:20 +02:00
ljedrz
73cb9ab526 rename hir::map::get_by_hir_id to get 2019-06-20 12:50:06 +02:00
Mazdak Farrokhzad
de8066f73f
Rollup merge of #61842 - Zoxc:trim-lift, r=eddyb
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-19 01:52:06 +02:00
Eduard-Mihai Burtescu
b25b466a88 rustc: remove 'x: 'y bounds (except from comments/strings). 2019-06-18 18:10:21 +03:00
bors
e3175c34b4 Auto merge of #61754 - nikomatsakis:trait-caching-perf-3, r=pnkfelix
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-16 14:58:05 +00:00
John Kåre Alsaker
007aabae93 Remove unnecessary lift calls 2019-06-14 21:11:50 +02:00
Eduard-Mihai Burtescu
afc39bbf24 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-14 18:58:32 +03:00
Eduard-Mihai Burtescu
f3f9d6dfd9 Unify all uses of 'gcx and 'tcx. 2019-06-14 18:58:23 +03:00
Eduard-Mihai Burtescu
fff08cb043 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu
17cdd356da rustc: replace TyCtxt<'tcx, 'gcx, 'tcx> with TyCtxt<'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
2441253508 Fix fallout from deny(unused_lifetimes). 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
37799a5552 rustc: replace TyCtxt<'a, 'gcx, 'tcx> with TyCtxt<'tcx, 'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Niko Matsakis
db1dfb2f36 rename evaluate_obligation_recursively
It does not, in fact, execute in a recursive context.
2019-06-11 19:07:32 -04:00
Eduard-Mihai Burtescu
8dddfde6e3 rustc_traits: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
varkor
c94ba6382d Rename OpportunisticTypeResolver to OpportunisticVarResolver 2019-05-28 21:34:42 +01:00
Andrew Xu
46b9ed4fa1 Rename "Associated*" to "Assoc*"
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-26 17:49:02 +08:00
Nicholas Nethercote
fb084a48e2 Pass a Symbol to check_name, emit_feature_err, and related functions. 2019-05-13 09:29:22 +10:00
Eduard-Mihai Burtescu
e5b9f54cd9 rustc: collapse relevant DefPathData variants into TypeNs. 2019-05-04 05:10:46 +03:00
varkor
541de81f8e Create ShallowResolver
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01 23:11:20 +01:00
varkor
fc16b0a147 Fix rebase from LazyConst removal 2019-05-01 23:11:19 +01:00
varkor
bfc39b9b87 Implement TypeRelation::consts
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01 23:10:57 +01:00
flip1995
654d045b6f
Fix lint findings in librustc_traits 2019-04-28 21:19:27 +02:00
Mazdak Farrokhzad
35dbc5ec47
Rollup merge of #60292 - varkor:ty-tuple-substs, r=nikomatsakis
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-27 14:12:37 +02:00
bors
cfeb9171b1 Auto merge of #59540 - Zoxc:the-arena-2, r=michaelwoerister
Use arenas to avoid Lrc in queries #1

Based on https://github.com/rust-lang/rust/pull/59536.
2019-04-27 05:24:11 +00:00
varkor
a3470c6189 Update handling of Tuple 2019-04-26 21:09:32 +01:00
John Kåre Alsaker
53269c7f6e Update trait queries 2019-04-25 18:23:36 +02:00
Tyler Mandry
56ab3e70e7 Add builtin impls for int and float inference vars in chalk 2019-04-24 15:57:43 -07:00
Tyler Mandry
c75e0890be chalkify: Add Copy/Clone builtins 2019-04-24 15:57:03 -07:00
Mateusz Mikuła
87e4b43d51 Deny internal in stage0 2019-04-17 05:15:00 +02:00
flip1995
d3f0cb9b62
Deny internal lints on non conflicting crates
- 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-04-03 18:24:21 +02:00
scalexm
d6a2b7c470 Fix a bug in implied bounds 2019-03-20 20:09:26 +01:00
scalexm
4effdd2431 Fix a bug in chalk lowering
Some where clauses were not subtituted for generic bound type vars.
2019-03-20 20:09:26 +01:00
scalexm
1834665508 Add unsize impls for arrays 2019-03-20 20:09:26 +01:00
scalexm
66b4a0852d Reorganize chalk_context::program_clauses 2019-03-20 20:09:26 +01:00
scalexm
60ea7cbe4e Gather region constraints not coming from unification 2019-03-20 20:03:20 +01:00
Oliver Scherer
5cd2806621 Revert the LazyConst PR 2019-03-16 21:04:10 +01:00
ljedrz
cd06038b54 HirIdification: replace NodeId method calls 2019-03-07 09:22:43 +01:00
varkor
54b935b9b9 Handle const generics elsewhere
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05 22:20:01 +00:00
ljedrz
e72584c3a1 hir: remove NodeId from TraitItem 2019-03-01 11:18:49 +01:00
Dan Robertson
08bd4ff998
Rename variadic to c_variadic
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-27 10:21:54 -05:00