Aleksey Kladov
a3fee2bda0
more realistic test for incrementality
2019-03-26 19:54:52 +03:00
Aleksey Kladov
1325a31e34
reduce visibility
2019-03-26 19:15:39 +03:00
Aleksey Kladov
e28db444df
rename
2019-03-26 19:11:01 +03:00
Aleksey Kladov
b17217b34a
simplify
2019-03-26 18:57:57 +03:00
Aleksey Kladov
cffa3f960e
make stuff private
2019-03-26 18:47:52 +03:00
Aleksey Kladov
8f32477312
more type safety
2019-03-26 18:27:22 +03:00
Aleksey Kladov
071a19537d
strongy-typed ids for macros
2019-03-26 18:03:17 +03:00
Aleksey Kladov
fb8b354dcc
add typed ids
2019-03-26 17:25:14 +03:00
Aleksey Kladov
6e5562224e
remove some dead code
2019-03-26 16:47:52 +03:00
Aleksey Kladov
f6f2d69bb8
simplify
2019-03-26 14:54:05 +03:00
Aleksey Kladov
0b820cacab
move source_id to a separate file
2019-03-26 14:42:28 +03:00
Aleksey Kladov
e231277ab2
make macro parsing a query
2019-03-26 14:13:17 +03:00
Aleksey Kladov
e4646ce0d5
reduce visibility
2019-03-26 13:53:50 +03:00
Aleksey Kladov
5270bca5f7
store macro def inside macro id
...
This solves the problem of "macro expansion can't call into name
resolution, because name resolution calls back into macro expansion"
Because we store macro def as a part of call id, macro expansion just
knows the def!
2019-03-26 13:20:54 +03:00
Florian Diebold
99711c1863
Clean up comments / use nicer Iterator methods
2019-03-25 21:28:36 +01:00
Florian Diebold
0f7e4a7d24
Implement a very naive implements check
...
... to make the infer_trait_method_simple test have the correct result.
2019-03-25 21:28:36 +01:00
Florian Diebold
c947c15ce1
Basics for trait method resolution
2019-03-25 21:28:36 +01:00
Aleksey Kladov
309716cffe
move tests to where they belong
2019-03-25 14:29:24 +03:00
Aleksey Kladov
5ce84f3cbc
tweak diagnostics API
2019-03-25 10:52:50 +03:00
Aleksey Kladov
4c4a714328
test diagnostics
2019-03-25 10:52:50 +03:00
Aleksey Kladov
c7ffd939f6
more enterprisey diagnostics setup
2019-03-25 10:52:50 +03:00
Aleksey Kladov
7ee2887d1e
fixes
2019-03-25 10:52:50 +03:00
Aleksey Kladov
45fbab2b1a
check impls as well
2019-03-25 10:52:50 +03:00
Aleksey Kladov
79df62bc74
cleanup
2019-03-25 10:52:50 +03:00
Aleksey Kladov
3fb88e95aa
switch modules to new diagnostics
2019-03-25 10:52:50 +03:00
Aleksey Kladov
fcca35969d
allow dyn diagnostics
2019-03-25 10:52:12 +03:00
Aleksey Kladov
7e8f17188e
diagnostics
2019-03-25 10:52:12 +03:00
Marco Groppo
67055c47da
Target only the actual operator.
...
Renamed `BinExpr::op()` and `PrefixExpr::op()` to `op_kind`.
Now `op()` returns the `SyntaxNode`.
2019-03-24 22:21:22 +01:00
Florian Diebold
dbfc68cea0
Fix apply_substs assertion failure
...
Fixes #1030 .
2019-03-23 18:03:09 +01:00
Aleksey Kladov
46a21b07e6
remove obsolete diagnostic
2019-03-23 16:31:11 +03:00
Aleksey Kladov
3f0cf6ebe1
rename persistent hir database -> def database
2019-03-23 15:44:24 +03:00
Aleksey Kladov
4fd8cfd6ad
replace todo with fixme
2019-03-23 11:07:09 +03:00
yanchith
504c8c7c2e
Refactor primitive types into more orthogonal representation
2019-03-22 10:09:35 +01:00
Florian Diebold
1ee779d1f7
Assert in apply_substs that the number of parameters doesn't change
...
... and fix a small bug revealed by that.
2019-03-21 22:39:31 +01:00
Florian Diebold
cbb418ebb8
Rename name field to ctor as well
2019-03-21 22:29:12 +01:00
Florian Diebold
97be0e6c46
Some more doc comments
2019-03-21 22:23:52 +01:00
Florian Diebold
f10f5a81b3
TypeName => TypeCtor
2019-03-21 22:20:03 +01:00
Florian Diebold
8a5fbf4713
Remove the old variants replaced by Ty::Apply
2019-03-21 22:17:00 +01:00
Florian Diebold
7a8ba53542
Add Ty::Apply
2019-03-21 22:11:53 +01:00
Florian Diebold
bc7752e527
Represent FnPtr and Tuple using Substs
2019-03-21 22:11:53 +01:00
Aleksey Kladov
f5165af9a7
make Name::new private
2019-03-20 22:33:26 +03:00
Vincent Esche
21f20d5deb
Fixed typo in Interner
’s name (Intener
)
2019-03-20 09:29:10 +01:00
Aleksey Kladov
5641feeddb
import resolution is immutable
2019-03-19 18:35:03 +03:00
bors[bot]
40c6dd1f4c
Merge #982
...
982: Implement BindingMode for pattern matching. r=flodiebold a=mjkillough
Implement `BindingMode` for pattern matching, so that types can be
correctly inferred using match ergonomics. The binding mode defaults to
`Move` (referred to as 'BindingMode::BindByValue` in rustc), and is
updated by automatic dereferencing of the value being matched.
Fixes #888 .
- [Binding modes in The Reference](https://doc.rust-lang.org/reference/patterns.html#binding-modes )
- [`rustc` implementation](e17c48e2f2/src/librustc_typeck/check/_match.rs (L77)
) (and [definition of `BindingMode`](e957ed9d10/src/librustc/ty/binding.rs
))
- [Match Ergonomics RFC](https://github.com/rust-lang/rfcs/blob/master/text/2005-match-ergonomics.md#binding-mode-rules )
Co-authored-by: Michael Killough <michaeljkillough@gmail.com>
2019-03-17 21:41:37 +00:00
Michael Killough
6299ccd350
Split test case and use tested_by!.
2019-03-17 19:08:51 +00:00
Michael Killough
33add0ee30
Simplify match statement.
2019-03-17 18:50:22 +00:00
Michael Killough
354134ffb4
impl Default for BindingMode.
...
This decouples callers from knowing what the default binding mode of
pattern matching is.
2019-03-17 18:46:01 +00:00
Aleksey Kladov
3a77023365
docs
2019-03-17 12:53:22 +03:00
Aleksey Kladov
4d7fa6d30b
remove fixme
2019-03-17 12:53:22 +03:00
Aleksey Kladov
6955e392f8
remove old macro support
2019-03-17 12:53:22 +03:00