Eduard-Mihai Burtescu
f5ce0e5fe9
rustc_lint: only query typeck_tables_of
when a lint needs it.
2020-06-26 02:56:23 +03:00
flip1995
80bcbf521c
Merge commit 'c2c07fa9d095931eb5684a42942a7b573a0c5238' into clippyup
2020-06-23 17:05:22 +02:00
Aman Arora
922ff8e485
Refactor hir::Place
...
For the following code
```rust
let c = || bar(foo.x, foo.x)
```
We generate two different `hir::Place`s for both `foo.x`.
Handling this adds overhead for analysis we need to do for RFC 2229.
We also want to store type information at each Projection to support
analysis as part of the RFC. This resembles what we have for
`mir::Place`
This commit modifies the Place as follows:
- Rename to `PlaceWithHirId`, where there `hir_id` is that of the
expressioin.
- Move any other information that describes the access out to another
struct now called `Place`.
- Removed `Span`, it can be accessed using the [hir
API](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/map/struct.Map.html#method.span )
- Modify `Projection` to be a strucutre of its own, that currently only
contains the `ProjectionKind`.
Adding type information to projections wil be completed as part of https://github.com/rust-lang/project-rfc-2229/issues/5
Closes https://github.com/rust-lang/project-rfc-2229/issues/3
Co-authored-by: Aman Arora <me@aman-arora.com>
Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
2020-06-18 18:59:38 -04:00
Lzu Tao
8db24840f7
Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy
2020-06-09 14:36:01 +00:00
Matthias Krüger
bdc9528e7c
rustup https://github.com/rust-lang/rust/pull/71292/
2020-04-28 15:05:56 +02:00
Matthias Krüger
f9c1acbc45
rustup https://github.com/rust-lang/rust/pull/71215/
2020-04-24 15:29:31 +02:00
flip1995
98aa5938c4
Rustup to rust-lang/rust#70634
2020-04-02 22:29:41 +02:00
Matthias Krüger
aff57e0f43
rustup https://github.com/rust-lang/rust/pull/70536
2020-03-30 11:17:58 +02:00
Matthias Krüger
ba0884bee3
rustup https://github.com/rust-lang/rust/pull/68944
2020-03-16 11:36:17 +01:00
flip1995
8472ecda0f
Fix fallout
2020-02-21 11:14:18 +01:00
Yuki Okushi
06cb96ed72
Clean up imports
2020-02-18 22:37:45 +09:00
Yuki Okushi
4480ec5b71
Rustup to rust-lang/rust#67953
2020-02-17 11:07:26 +09:00
Yuki Okushi
e72f0e61c6
Rustup to rust-lang/rust#68204
2020-01-18 14:39:18 +09:00
Yuki Okushi
ce1c6b285d
Rustup to rust-lang/rust#68045
2020-01-13 21:55:57 +09:00
Yuki Okushi
39947992b5
Rustup to rust-lang/rust#67806
2020-01-11 21:50:00 +09:00
Yuki Okushi
e58cfac458
Rustup to rust-lang/rust#67979
2020-01-09 16:43:51 +09:00
Yuki Okushi
2f2eaf8b7e
Rustup to rust-lang/rust#67886
2020-01-07 01:46:33 +09:00
Yuki Okushi
07f061563d
Rustup to rust-lang/rust#67803
2020-01-05 15:50:06 +09:00
Philipp Hansch
c5178e82b4
Rustup to https://github.com/rust-lang/rust/pull/67853
...
Specifically caused by https://github.com/rust-lang/rust/pull/67786
2020-01-04 11:30:03 +01:00
Yuki Okushi
a4c201e6b4
Rustup to rust-lang/rust#66942
2019-12-30 13:02:10 +09:00
flip1995
9632e27487
Add <'_> where necessary
2019-12-22 15:42:41 +01:00
Matthias Krüger
98e433d70d
Rustup to rust-lang/rust#66878
2019-12-04 01:34:01 +01:00
flip1995
604e6ba0e2
Add projections check to EUV for escape analysis
2019-11-29 12:57:10 +01:00
flip1995
b2523afae4
Use infer_ctxt
2019-11-29 11:12:19 +01:00
Manish Goregaokar
45842e5131
Fix categorizations
2019-11-28 07:33:12 -08:00
Manish Goregaokar
c1c5c3522d
Fix arguments on ExprUseVisitor::new
2019-11-28 07:20:37 -08:00
Manish Goregaokar
dc9d839410
euv moved from middle to typeck
2019-11-28 07:17:56 -08:00
Manish Goregaokar
85bb66480c
cmt_ -> Place
2019-11-28 07:09:02 -08:00
Lzu Tao
d0e0ffa99f
make use of Result::map_or
2019-11-28 10:52:20 +07:00
flip1995
3d39379f9c
Move is_argument check into mutate
2019-10-06 14:49:26 +02:00
flip1995
3aa531c194
Run util/dev fmt
2019-10-05 12:42:09 +02:00
flip1995
b7d473503b
Merge consume and consume_pat in escape analysis
...
FIXME: This doesn't work and probably needs a rewrite of the lint
See https://github.com/rust-lang/rust-clippy/pull/4628#issuecomment-538574944
2019-10-05 12:23:59 +02:00
flip1995
b46f5b4a98
Rustup to rust-lang/rust#64874
...
Episode 1 - The simple cases
2019-10-04 15:39:46 +02:00
flip1995
4bbd10a585
Rustup to rust-lang/rust#64813
2019-09-27 17:21:20 +02:00
Yuki Okushi
2c282252a9
Replace Arg
with Param
2019-08-28 18:33:25 +09:00
Philipp Hansch
c0cdfd296e
Doctests: Enable running doc tests for perf lints
...
This should be possible to merge independently of #4325
cc #4319
2019-08-03 08:08:00 +02:00
Michael Wright
2f5c1d031d
Fix breakage due to rust-lang/rust#61856
2019-07-30 06:39:51 +02:00
Lzu Tao
7293defb34
Rename hir::map::local_def_id_from_hir_id to local_def_id
2019-07-06 10:52:51 +07:00
Manish Goregaokar
4a6914bb8c
Remove a hir_to_node_id
2019-06-25 14:34:47 -07:00
Manish Goregaokar
d744dcdaaf
find_by_hir_id -> find
2019-06-25 14:34:07 -07:00
Manish Goregaokar
c47a7e4ef2
get_parent_node_by_hir_id -> get_parent_node
2019-06-25 14:33:51 -07:00
Lzu Tao
4fa498a3eb
Fix warnings about unnecessary lifetime bounds
...
Rustup https://github.com/rust-lang/rust/pull/61172
2019-06-20 01:36:23 +07:00
Matthias Krüger
4d984dc6e6
rustup https://github.com/rust-lang/rust/pull/61836/
2019-06-18 11:15:47 +02:00
Mateusz Mikuła
a3ace5c3ca
Cargo fmt
2019-06-02 18:58:11 +02:00
Mateusz Mikuła
9fefe36737
Rustup for https://github.com/rust-lang/rust/pull/61276
2019-06-02 18:30:40 +02:00
Matthew Kraai
753c39672e
Use lint pass macros
...
Fixes #3917 .
2019-04-17 09:35:22 -07:00
bors
99fdf2607e
Auto merge of #3873 - phansch:hiridification, r=flip1995
...
Some more HirId-ification
* 8a59f81
: Rename span_lint_node* functions to span_lint_hir*
* a457258
: Use `HirId` instead of `NodeId` for lookup
2019-03-13 08:45:23 +00:00
Philipp Hansch
a457258132
Use HirId
instead of NodeId
for lookup
2019-03-12 08:21:22 +01:00
Michael Wright
6937d5581a
Merge branch 'master' into fix-3739
2019-03-12 08:13:44 +02:00
Alexander Regueiro
d43966a176
Various cosmetic improvements.
2019-03-10 18:06:28 +00:00