Commit graph

2960 commits

Author SHA1 Message Date
Jeremy Kolb
e696342afa Rename assits to assists 2019-02-05 08:13:16 -05:00
bors[bot]
4183825475 Merge #740
740: Update dependencies r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-02-05 12:16:25 +00:00
Jeremy Kolb
c73cc0ab8f Remove unused imports 2019-02-05 07:15:15 -05:00
bors[bot]
4d4c46aff8 Merge #742
742: Extern crate r=matklad a=flodiebold

This implements `extern crate` declarations by lowering them to (absolute) imports, and adds support for absolute paths. It also extracts the extern prelude from the per-module item map, and handles the special case of extern crates in the crate root adding to the extern prelude.

This means we finally resolve `Arc`, so it fixes #523 😄 

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-02-05 07:53:08 +00:00
bors[bot]
94d5d0d7e8 Merge #743
743: Move comment r=matklad a=kjeremy

As pointed out in https://github.com/rust-analyzer/rust-analyzer/pull/738/files#r253651450

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-02-05 07:36:51 +00:00
bors[bot]
d914ac0069 Merge #744
744: mbe: Ensure repetition separator matches r=matklad a=jrmuizel



Co-authored-by: Jeff Muizelaar <jrmuizel@gmail.com>
2019-02-05 07:28:31 +00:00
Jeff Muizelaar
a4b473226b mbe: Ensure repetition separator matches 2019-02-04 20:19:23 -05:00
Florian Diebold
de4c5e381f Fix ReachedFixedPoint value for unresolved external prelude items 2019-02-04 23:26:25 +01:00
kjeremy
7f92fd858a Move comment 2019-02-04 16:34:02 -05:00
Florian Diebold
699ce06ac3 Complete extern prelude (again) 2019-02-04 22:09:56 +01:00
Florian Diebold
ccef48b6c3 Make it possible to have multiple crate in a mock analysis fixture 2019-02-04 21:49:34 +01:00
Florian Diebold
0c2fedc2cb Add alloc to std deps 2019-02-04 21:49:34 +01:00
Florian Diebold
1056b480d6 Make extern crates in the root module add to the extern prelude
To accomplish this, separate the extern prelude from the per-module item maps.
2019-02-04 21:49:34 +01:00
Florian Diebold
d69023fc72 Lower extern crates to imports
This is probably not completely correct, but it kind of works.
2019-02-04 21:49:34 +01:00
Florian Diebold
397d84ee29 Add test for extern crate renames 2019-02-04 21:49:34 +01:00
Florian Diebold
e163c908ac Add AST for extern crate
Also change it to parse the crate name as a NAME_REF, not a NAME.
2019-02-04 21:49:34 +01:00
bors[bot]
77a824c6a0 Merge #741
741: Test more Self inference r=flodiebold a=kjeremy

These cases didn't look covered.

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-02-04 20:28:09 +00:00
kjeremy
5227102c12 Test more Self inference 2019-02-04 14:44:06 -05:00
kjeremy
8ec4b84013 Bump insta and proptest to latest 2019-02-04 14:11:51 -05:00
bors[bot]
cc3423c662 Merge #739
739: Future proof by explicitly matching against None r=DJMcNab a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-02-04 18:05:33 +00:00
kjeremy
4190bc62c4 cargo update 2019-02-04 12:55:52 -05:00
kjeremy
20e9aa2364 Future proof by explicitly matching against None 2019-02-04 12:49:29 -05:00
bors[bot]
88702a758f Merge #738
738: Implement lens for impls and support resolving lenses. r=matklad a=kjeremy

Closes #620 

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-02-04 15:42:29 +00:00
kjeremy
0f7a714c63 Add comment 2019-02-04 10:26:43 -05:00
Jeremy Kolb
6ac4cca6c1 Implement lens for impls and support resolving lenses. 2019-02-04 08:45:33 -05:00
bors[bot]
13a2bdb0a8 Merge #736
736: mbe: Add support matching for matching idents r=jrmuizel a=jrmuizel

Factors out a helper and adds support for matching idents.

Co-authored-by: Jeff Muizelaar <jrmuizel@gmail.com>
2019-02-04 00:50:48 +00:00
Jeff Muizelaar
0000f00787 mbe: Add support matching for matching idents 2019-02-03 19:43:37 -05:00
Jeff Muizelaar
1997797adc Factor out rules parsing 2019-02-03 19:43:35 -05:00
bors[bot]
998ed13d09 Merge #735
735: make HirDatabase object-safe r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-02-03 19:15:56 +00:00
Aleksey Kladov
dbf9820e35 make HirDatabase object-safe 2019-02-03 22:15:31 +03:00
bors[bot]
395965351d Merge #733
733: fill match arms r=matklad a=gfreezy

fixed #626 

Co-authored-by: gfreezy <gfreezy@gmail.com>
2019-02-03 18:11:06 +00:00
gfreezy
bfaefed3f6 fill match arm 2019-02-04 00:27:36 +08:00
bors[bot]
55408081b0 Merge #732
732: Add core to STD_DEPS r=matklad a=lnicola

See #731.

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2019-02-03 15:38:38 +00:00
Laurențiu Nicola
cbc2ac5d09
Add core to STD_DEPS
See #731.
2019-02-03 17:35:42 +02:00
bors[bot]
581c97a5c3 Merge #730
730: Make sure we match the entire pattern r=matklad a=jrmuizel



Co-authored-by: Jeff Muizelaar <jrmuizel@gmail.com>
2019-02-03 15:12:07 +00:00
Jeff Muizelaar
dbc3074556 Make sure we match the entire pattern 2019-02-03 10:07:57 -05:00
bors[bot]
f370393bba Merge #728
728: add postfix completion for `dbg!()` with `.dbg` r=matklad a=hdhoang

closes #716 

Co-authored-by: Hoàng Đức Hiếu <code@hdhoang.space>
2019-02-03 13:26:37 +00:00
Hoàng Đức Hiếu
9dd7ccf609 fold complete_postfix tests into one 2019-02-03 20:12:57 +07:00
bors[bot]
02bacf70fa Merge #727
727: Fix macro_rules separator parsing. r=matklad a=jrmuizel

macro_rules rules are separated by ';' including an optional ';' at the end

Co-authored-by: Jeff Muizelaar <jrmuizel@gmail.com>
2019-02-03 07:32:59 +00:00
Jeff Muizelaar
0bb8456e7d Fill out test a little more
This factors out an assert_expansion function to make things
more managable.
2019-02-02 22:39:45 -05:00
Jeff Muizelaar
31d143ba18 Fix macro_rules separator parsing.
macro_rules rules are separated by ';' including an optional ';' at the
end
2019-02-02 22:39:13 -05:00
bors[bot]
e351ff0542 Merge #726
726: Fix number of extern_inner_attributes r=DJMcNab a=DJMcNab

bors r+

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2019-02-02 16:18:57 +00:00
DJMcNab
7417c0775b Fix number of extern_inner_attributes 2019-02-02 16:18:12 +00:00
Hoàng Đức Hiếu
1c5a63e3db add postfix completion for dbg!() with .dbg 2019-02-02 22:10:18 +07:00
bors[bot]
da3802b2ce Merge #725
725: Implement `use as` r=matklad a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-02-02 08:20:50 +00:00
Florian Diebold
d8ef8acb47 Use aliases in import resolution 2019-02-02 00:23:59 +01:00
Florian Diebold
5a7fce4e4c Pass aliases to ImportData 2019-02-02 00:23:53 +01:00
Florian Diebold
aa5f6a1ee8 Add test for use as 2019-02-02 00:23:53 +01:00
bors[bot]
4447019f4b Merge #693
693: Name resolution refactoring r=matklad a=flodiebold

This is still very WIP, but it's becoming quite big and I want to make sure this isn't going in a completely bad direction 😅. I'm not really happy with how the path resolution looks, and I'm not sure `PerNs<Resolution>` is the best return type -- there are 'this cannot happen in the (types/values) namespace' cases everywhere. I also want to unify the `resolver` and `nameres` namespaces once I'm done switching everything to `Resolver`. Also, `Resolver` only has a lifetime because it needs to have a reference to the `ItemMap` during import resolution 😕 

The differences in the completion snapshots are almost completely just ordering (except it completes `Self` as well now), so I changed it to sort the completions before snapshotting.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-02-01 22:37:59 +00:00
Florian Diebold
c5852f422f Some cleanup and additional tests 2019-02-01 23:24:26 +01:00