Skip to content

Disallow coercions from [T, ..n] to &[T] - #18645

Closed
nrc wants to merge 3 commits into
rust-lang:masterfrom
nrc:coercions-1
Closed

Disallow coercions from [T, ..n] to &[T]#18645
nrc wants to merge 3 commits into
rust-lang:masterfrom
nrc:coercions-1

Conversation

@nrc

@nrcnrc commented Nov 5, 2014

Copy link
Copy Markdown
Member

r?

(I realise this needs a rebase, but I will probably have to chop it up in order to land and I'd like to get r+ first so I can do that quicker)

@rust-highfive

Copy link
Copy Markdown
Contributor

warningWarningwarning

  • These commits modify unsafe code. Please review it carefully!

@nrcnrc mentioned this pull request Nov 5, 2014
@nrc

nrc commented Nov 5, 2014

Copy link
Copy Markdown
MemberAuthor

Part of #18469

Comment threadsrc/libcollections/slice.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm under the impression that this change won't be necessary once #18486 lands. Since [T, ..N] == [T, ..N] works up to N = 32. cc @nikomatsakis

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems correct

@alexcrichton

Copy link
Copy Markdown
Member

r=me, thanks @nick29581!

bors added a commit that referenced this pull request Nov 17, 2014
The forwards compatible parts of #18645, rebased. Converts implicit coercions from `[T, ..n]` to `&[T]` into explicit references.
Nick Cameron added 2 commits November 18, 2014 10:02
bors added a commit that referenced this pull request Nov 18, 2014
r?
(I realise this needs a rebase, but I will probably have to chop it up in order to land and I'd like to get r+ first so I can do that quicker)
@borsbors closed this Nov 18, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Dec 11, 2024
Sign up for freeto 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.

6 participants

@nrc@rust-highfive@alexcrichton@nikomatsakis@bors@japaric