Commit graph

149 commits

Author SHA1 Message Date
DJMcNab
b67a4e7a57 Add fuzz failure to the fuzz-failures directory 2018-12-29 12:45:48 +00:00
DJMcNab
054f22f231 Fix a fuzzing bug and add Cargo.lock to the fuzzing directory 2018-12-29 12:40:08 +00:00
Aleksey Kladov
406505e096 super simplistic macro expansion 2018-12-28 16:59:58 +03:00
Aleksey Kladov
072028e679 add macro-call node 2018-12-28 13:27:30 +03:00
dependabot[bot]
4017966a0b
Bump parking_lot from 0.6.4 to 0.7.0
Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.6.4 to 0.7.0.
- [Release notes](https://github.com/Amanieu/parking_lot/releases)
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-27 13:14:24 +00:00
bors[bot]
d8bfad9e92 Merge #343 #344
343: Bump arrayvec from 0.4.9 to 0.4.10 r=matklad a=dependabot[bot]

Bumps [arrayvec](https://github.com/bluss/arrayvec) from 0.4.9 to 0.4.10.
<details>
<summary>Commits</summary>

- [`21661fa`](21661facf8) 0.4.10
- [`06930d2`](06930d27ce) FIX: Remove unused Copy/Clone for MaybeUninit
- [`85d9a06`](85d9a06a62) FIX: Use repr(C) MaybeUninit after discussion with RalfJung
- See full diff in [compare view](https://github.com/bluss/arrayvec/compare/0.4.9...0.4.10)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=arrayvec&package-manager=cargo&previous-version=0.4.9&new-version=0.4.10)](https://dependabot.com/compatibility-score.html?dependency-name=arrayvec&package-manager=cargo&previous-version=0.4.9&new-version=0.4.10)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

344: Bump itertools from 0.7.11 to 0.8.0 r=matklad a=dependabot[bot]

Bumps [itertools](https://github.com/bluss/rust-itertools) from 0.7.11 to 0.8.0.
<details>
<summary>Commits</summary>

- [`cd0602a`](cd0602addc) 0.8.0
- [`5a8f2fd`](5a8f2fd5ed) MAINT: Require Rust 1.24 as minimum version
- [`4986d92`](4986d92d7f) DOC: Minor edits to module docs
- [`01f15a0`](01f15a0910) Merge [#288](https://github-redirect.dependabot.com/bluss/rust-itertools/issues/288)
- [`883d40a`](883d40a6ef) map_into method
- [`3bf265d`](3bf265d5b7) Merge pull request [#321](https://github-redirect.dependabot.com/bluss/rust-itertools/issues/321) from JohnHeitmann/master
- [`e820996`](e820996f64) Document the trait extension behavior of Itertools a bit more clearly
- [`44c9654`](44c9654fdb) Merge pull request [#318](https://github-redirect.dependabot.com/bluss/rust-itertools/issues/318) from bluss/std-deprecations
- [`d2e254f`](d2e254f22f) API: Fix the mystery deprecation message for Step
- [`602f2f6`](602f2f675e) API: Deprecate .foreach() in favour of std's .for_each()
- Additional commits viewable in [compare view](https://github.com/bluss/rust-itertools/compare/0.7.11...0.8.0)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=itertools&package-manager=cargo&previous-version=0.7.11&new-version=0.8.0)](https://dependabot.com/compatibility-score.html?dependency-name=itertools&package-manager=cargo&previous-version=0.7.11&new-version=0.8.0)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

Co-authored-by: dependabot[bot] <support@dependabot.com>
2018-12-27 13:06:30 +00:00
dependabot[bot]
a400444e33
Bump itertools from 0.7.11 to 0.8.0
Bumps [itertools](https://github.com/bluss/rust-itertools) from 0.7.11 to 0.8.0.
- [Release notes](https://github.com/bluss/rust-itertools/releases)
- [Commits](https://github.com/bluss/rust-itertools/compare/0.7.11...0.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-27 12:32:23 +00:00
dependabot[bot]
6fb53caea5
Bump arrayvec from 0.4.9 to 0.4.10
Bumps [arrayvec](https://github.com/bluss/arrayvec) from 0.4.9 to 0.4.10.
- [Release notes](https://github.com/bluss/arrayvec/releases)
- [Commits](https://github.com/bluss/arrayvec/compare/0.4.9...0.4.10)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-27 12:32:18 +00:00
Aleksey Kladov
49b0fe20ab fix suffix ranges 2018-12-27 15:10:30 +03:00
Aleksey Kladov
a912b261d3 dump validation errors 2018-12-27 15:07:51 +03:00
Aleksey Kladov
359e70d1b2 support literal suffixes 2018-12-27 15:03:18 +03:00
Aleksey Kladov
73ded3c63c dedupe literal parsers 2018-12-27 14:42:46 +03:00
Florian Diebold
cdca397061 Add a hir::TypeRef as an intermediate between ast::TypeRef and ty::Ty 2018-12-25 21:14:13 +01:00
Florian Diebold
2870effd5c Implement reference / pointer types
- parse them
 - infer types of & and * expressions
2018-12-25 20:36:06 +01:00
Florian Diebold
ab0b63992b Implement basic completion for fields 2018-12-25 15:27:15 +01:00
Florian Diebold
0d724ea572 Improve parsing of incomplete field accesses in preparation for field completion
We need to be able to get the receiver even if there is no field name yet, and
currently "a." wouldn't get parsed as a field name at all. This seems to help.
2018-12-25 15:16:42 +01:00
Florian Diebold
55c941cd9f Type field accesses 2018-12-25 15:16:42 +01:00
Florian Diebold
4cb7b0f2af Add AST definitions for struct/variant fields etc.
Fixes #117
2018-12-25 15:16:42 +01:00
Florian Diebold
6fcd38cc81 Infer result of struct literals, and recurse into their child expressions 2018-12-25 15:16:42 +01:00
Florian Diebold
ef67581104 Resolve paths to defs (functions currently) during type inference 2018-12-23 17:13:11 +01:00
Florian Diebold
93ffbf80c6 Make let statements kind of work 2018-12-23 14:01:50 +01:00
Florian Diebold
515c3bc59b Cleanup 2018-12-23 13:48:04 +01:00
Florian Diebold
7348f7883f Add testing infrastructure for type inference
- move dir_tests to test_utils for that.
2018-12-23 13:48:04 +01:00
Florian Diebold
3899898d75 Parse integer / float types 2018-12-23 13:48:04 +01:00
Florian Diebold
3ac605e687 Add beginnings of type infrastructure 2018-12-23 13:48:04 +01:00
bors[bot]
e4d0930d9c Merge #316
316: Fix handling of nested self in paths r=matklad a=DJMcNab

See https://github.com/rust-analyzer/rust-analyzer/issues/231#issuecomment-442449505.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-21 23:19:14 +00:00
DJMcNab
1dffbe5c37 Remove TODO on self_hosting_parsing
This improving this code is not a good use of people-time, and this
might be the most performant approach nonwithstanding
an api for this use case being added to walkdir
2018-12-21 22:44:31 +00:00
DJMcNab
4dbf71d332 Remove uneeded todo in lexer 2018-12-21 22:41:09 +00:00
DJMcNab
d8d60215da Fix handling of nested self in paths 2018-12-21 22:29:59 +00:00
DJMcNab
bd5a358910 Fix where clauses using fully qualified path syntax 2018-12-21 17:20:38 +00:00
Aleksey Kladov
a5987bd715 show debug repr of literals 2018-12-21 18:49:52 +03:00
DJMcNab
9beee92500 Add comment about the source of the weird_exprs test 2018-12-21 10:03:02 +00:00
DJMcNab
da6be9fdda Add weird_exprs test 2018-12-20 19:47:29 +00:00
DJMcNab
55ebe449c9 Fix parsing of contextual_keyword union 2018-12-20 19:46:03 +00:00
DJMcNab
a349db7178 Run gen-tests 2018-12-20 19:10:37 +00:00
DJMcNab
1d1950336f Use a better way of skipping SEMIs 2018-12-20 19:07:11 +00:00
DJMcNab
dc1c64f5b9 Support a blank expression before a semicolon 2018-12-20 19:07:11 +00:00
DJMcNab
134fe4f566 Fix the tests and fix the precommit hook 2018-12-20 16:45:54 +00:00
DJMcNab
466885aa5b Fix missing DOTDOTEQs 2018-12-20 16:22:13 +00:00
DJMcNab
f35151afed Don't require a command before EQ in a where clause 2018-12-20 15:50:42 +00:00
DJMcNab
63ca8bc91a Change parser tests dir to inline/ok and inline/err 2018-12-20 15:09:22 +00:00
DJMcNab
e2a7e94518 Ensure that the parser tests pass or fail correctly 2018-12-20 13:33:00 +00:00
DJMcNab
27e814e182 Simplify NO_BLOCK testing 2018-12-20 12:28:59 +00:00
DJMcNab
5205c016e9 Fix ambiguity with if break
Brought up by #290
2018-12-20 11:35:02 +00:00
DJMcNab
a3b842fb8b Add tests and only traverse in the crates directory 2018-12-19 21:19:32 +00:00
DJMcNab
db67741430 Move is_block to lower in the call tree 2018-12-19 20:55:24 +00:00
DJMcNab
def0a95d35 Revert "Revert to f6f7c5"
This approach is correct, but it needs an addition to Restrictions too

This reverts commit ad00d0c8a5f64142e6636e8b048204c8f8982f4a.
2018-12-19 20:12:18 +00:00
DJMcNab
4dce66ad31 Fix handling of structs in match arms 2018-12-19 20:12:18 +00:00
DJMcNab
cd8e33fb7e Revert to f6f7c5 2018-12-19 20:12:18 +00:00
DJMcNab
7a8560ba38 Fix expression parsing by bailing out upon a macro block being found
TODO: Fix this when the block like macro is in expression position

E.g. `test(test!{})` currently parses
2018-12-19 20:12:18 +00:00