NLL: Fix bug in associated constant type annotations.#57304
Merged
bors merged 1 commit intorust-lang:masterfrom Jan 7, 2019
Merged
NLL: Fix bug in associated constant type annotations.#57304bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Closed
This comment has been minimized.
This comment has been minimized.
nikomatsakis
requested changes
Jan 3, 2019
nikomatsakis
requested changes
Jan 3, 2019
This commit reverses the variance used when relating types from the type annotation of an associated constant - this matches the behaviour of the lexical borrow checker and fixes a bug whereby matching a `&'a str` against a `&'static str` would produce an error.
nikomatsakis
approved these changes
Jan 4, 2019
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 4933793 has been approved by |
Collaborator
|
⌛ Testing commit 4933793 with merge 355347541f176f38a81dc67b36bbdcb81d758b7c... |
Collaborator
|
💔 Test failed - status-travis |
Contributor
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Contributor
|
@bors retry |
Contributor
|
cc @rust-lang/infra -- this failure looked unrelated to the PR: |
Member
|
cc #55861 |
Collaborator
bors
added a commit
that referenced
this pull request
Jan 7, 2019
NLL: Fix bug in associated constant type annotations. Fixes #57280. This PR reverses the variance used when relating types from the type annotation of an associated constant - this matches the behaviour of the lexical borrow checker and fixes a bug whereby matching a `&'a str` against a `&'static str` would produce an error. r? @nikomatsakis
Collaborator
|
☀️ Test successful - status-appveyor, status-travis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #57280.
This PR reverses the variance used when relating types from the type
annotation of an associated constant - this matches the behaviour of the
lexical borrow checker and fixes a bug whereby matching a
&'a stragainst a
&'static strwould produce an error.r? @nikomatsakis