Skip to content

Conversation

@flodiebold
Copy link
Member

  • do autoderef for indexing
  • do array unsizing ([T; N] -> [T]) in both method resolution and indexing. It turns out array unsizing is actually the only unsizing coercion that rustc does for method receivers, so this is simpler than I expected.

Sadly, this doesn't fix indexing slices/arrays yet, there are still some trait solving problems...

It turns out rustc actually only unsizes array method receivers, so we don't
need to do any trait solving for this (at least for now).

Fixes rust-lang#2670.
@matklad
Copy link
Contributor

matklad commented Feb 29, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 29, 2020

@bors bors bot merged commit ad4e108 into rust-lang:master Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants