zhoufan
c3ad945d9b
fixes broken tests
2021-12-14 15:57:58 +08:00
zhoufan
7b952cb1aa
infer associated method in local scope
2021-12-14 15:34:57 +08:00
Jonas Schievink
c0a30ff21d
Move synstructure hack out of ItemTree lowering
2021-12-08 15:44:52 +01:00
zhoufan
f00cd911bf
lookup impls in local del maps
2021-11-09 18:14:02 +08:00
Aleksey Kladov
2bf81922f7
internal: more reasonable grammar for blocks
...
Consider these expples
{ 92 }
async { 92 }
'a: { 92 }
#[a] { 92 }
Previously the tree for them were
BLOCK_EXPR
{ ... }
EFFECT_EXPR
async
BLOCK_EXPR
{ ... }
EFFECT_EXPR
'a:
BLOCK_EXPR
{ ... }
BLOCK_EXPR
#[a]
{ ... }
As you see, it gets progressively worse :) The last two items are
especially odd. The last one even violates the balanced curleys
invariant we have (#10357 ) The new approach is to say that the stuff in
`{}` is stmt_list, and the block is stmt_list + optional modifiers
BLOCK_EXPR
STMT_LIST
{ ... }
BLOCK_EXPR
async
STMT_LIST
{ ... }
BLOCK_EXPR
'a:
STMT_LIST
{ ... }
BLOCK_EXPR
#[a]
STMT_LIST
{ ... }
2021-09-26 19:16:09 +03:00
Yotam Ofek
1785493cae
Add (failing) test for inherent array method resolution.
2021-09-08 11:00:55 +03:00
Jonas Schievink
418b163a4b
Allow inherent impl for arrays
2021-08-31 14:15:39 +02:00
Dawer
0f6621fbfa
Fix tests.
2021-08-04 20:20:14 +05:00
Dawer
5f2486e9a8
Handle impl ?Sized
. Fix tests.
2021-08-04 20:20:10 +05:00
Dawer
b217e9cc50
add implicit Sized bound to associated types
2021-08-04 19:41:05 +05:00
Jonas Schievink
837eec8dab
filter visiblities when resolving in extern crate
2021-07-21 17:51:56 +02:00
Lukas Wirth
69e6511820
Record autoderef adjustments
2021-07-10 12:26:18 +02:00
Florian Diebold
04fbdce426
Unify check_mismatches and check_types
2021-06-20 19:12:06 +02:00
Aleksey Kladov
b737b894cb
internal: switch some tests to minicore
2021-06-15 21:36:50 +03:00
Aleksey Kladov
7ebac5e54c
internal: switch some tests to minicore
2021-06-15 21:34:26 +03:00
Jonas Schievink
955064b6aa
Implement #[rustc_skip_array_during_method_dispatch]
2021-06-01 21:34:08 +02:00
Jonas Schievink
f96c1a0414
Implement per-edition preludes
2021-06-01 13:39:19 +02:00
Jonas Schievink
20c27dbdbe
Collect inherent impls in unnamed consts
2021-04-19 01:06:26 +02:00
Jonas Schievink
7c1c0e6fea
Collect trait impls inside unnamed consts
2021-04-07 03:33:22 +02:00
cynecx
42abfa0f88
hir_ty: add coverage testing for autoderef_visibility_method test
2021-03-20 20:35:57 +01:00
cynecx
2dc85f739a
hir_ty: fix test by removing trailing whitespace
2021-03-20 19:58:00 +01:00
cynecx
edfd741c5b
hir_ty: add tests around autoderef with visibility checking
2021-03-20 17:26:18 +01:00
Laurențiu Nicola
fc9eed4836
Use upstream cov-mark
2021-03-08 22:19:44 +02:00
Laurențiu Nicola
d03cfe141c
Add test from #7273
2021-02-21 19:22:14 +02:00
Lukas Wirth
9e5192d917
Don't lower TypeBound::Lifetime as GenericPredicate::Error
2021-02-20 19:08:20 +01:00
Lukas Wirth
965d31ce5b
Check for dyn impls in method resolution
2021-02-08 19:13:54 +01:00
Florian Diebold
e5fd550dfd
Use correct, full substs for self type in impl
...
Without arbitrary self types, the self type could never refer to the method type
parameters, so this wasn't a problem; but with arbitrary self types, it can.
This fixes the crash from #6668 ; but it doesn't make method resolution work for
these methods.
2020-12-04 18:43:47 +01:00
Charles Lew
3fff5aa4d7
Use Ty::apply instead of simple and fix method resolution.
2020-09-17 00:58:41 +08:00
Charles Lew
eb96964756
Add a test.
2020-09-17 00:21:34 +08:00
Aleksey Kladov
b0fd3faf36
Switch to expect_test from crates.io
2020-08-21 13:19:31 +02:00
Aleksey Kladov
6a77ec7bbe
Rename ra_hir_ty -> hir_ty
2020-08-13 16:35:29 +02:00