Repository navigation
Conversation
* consolidate "unexpected `...`" & "`...` nested in a type" diagnostics
into a new "`...` in invalid context" one
* it didn't make sense to emit "`...` nested in a type" for code like
`type X = &'static ...;` since it's immaterial whether `...` is wrapped
by something (here: `&`), `...` is never allowed on the RHS of a type
alias even if "bare" or "top-level"
* previously we would awkwardly & hackily try to "patch away" the "`...`
nested in a type" by manually checking for `DotDotDot` at the beginning
of `parse_ty` precisely to emit "unexpected `...`" instead which made
more sense most of the time as I've explained above; however, not
everybody calls `parse_ty` instead reaching for `parse_ty_common` to
customize the behavior, so that patching over things would only work
half the time
* update the error code entry for E0743
* necessary since we've consolidated the two diagnostics
* previously it would say things like only foreign functions (i.e.,
ones inside `unsafe extern "…" { … }`) were allowed to be variadic;
but that's outdated, `extern "…"` functions can now be variadic, too
* change the notes to no longer mention calling conventions C{-unwind}
since that's a semantic restriction not a syntactic one and we're
talking about a syntax error here
This branch has not been deployed
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.
CC #162591 and the like.
(No LLM was or will be used by me during the entire creation process of this PR)