-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 10 pull requests #69555
Merged
Merged
Rollup of 10 pull requests #69555
Conversation
This file contains 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
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Co-Authored-By: Jonas Schievink <jonasschievink@gmail.com> Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
…parisons and filter(x).next() calls.
…Simulacrum Update RELEASES.md for 1.42.0 ### [Rendered](https://github.com/XAMPPRocky/rust/blob/relnotes-1.42.0/RELEASES.md) r? @Mark-Simulacrum cc @rust-lang/release
…matsakis instantiate_value_path: on `SelfCtor`, avoid unconstrained tyvars Fixes rust-lang#69306. On `Self(...)` (that is, a `Res::SelfCtor`), do not use `self.impl_self_ty(...)`. The problem with that method is that it creates unconstrained inference variables for type parameters in the `impl` (e.g. `impl<T> S0<T>`). These variables then eventually get substituted for something else when they come in contact with the expected type (e.g. `S0<u8>`) or merely the arguments passed to the tuple constructor (e.g. the `0` in `Self(0)`). Instead of using `self.impl_self_ty(...)`, we instead merely use `let ty = self.normalize_ty(span, tcx.at(span).type_of(impl_def_id));` to get the rewritten `res`. r? @eddyb
parser: `token` -> `normalized_token`, `nonnormalized_token` -> `token` So, after rust-lang#69006, its follow-ups and an attempt to remove `Parser::prev_span` I came to the conclusion that the unnormalized token and its span is what you want in most cases, so it should be default. Normalization only makes difference in few cases where we are checking against `token::Ident` or `token::Lifetime` specifically. This PR uses `normalized_token` for those cases. Using normalization explicitly means that people writing code should remember about `NtIdent` and `NtLifetime` in general. (That is alleviated by the fact that `token.ident()` and `fn parse_ident_*` are already written.) Remembering about `NtIdent`, was, however, already the case, kind of, because the implicit normalization was performed only for the current/previous token, but not for things like `look_ahead`. As a result, most of token classification methods in `token.rs` already take `NtIdent` into account (this PR fixes a few pre-existing minor mistakes though). The next step is removing `normalized(_prev)_token` entirely and replacing it with `token.ident()` (mostly) and `token.normalize()` (occasionally). I want to make it a separate PR for that and run it though perf. `normalized_token` filled on every bump has both a potential to avoid repeated normalization, and to do unnecessary work in advance (it probably doesn't matter anyway, the normalization is very cheap). r? @Centril
typeck: use `Pattern` obligation cause more for better diagnostics r? @estebank
…c-morse use char instead of &str for single char patterns
error_derive_forbidden_on_non_adt: be more graceful Fixes rust-lang#69341 which was injected by rust-lang#67052. r? @petrochenkov
…entril Stabilize `boxed_slice_try_from` Closes rust-lang#69202
late resolve, visit_fn: bail early if there's no body. Fixes rust-lang#69401 which was injected by rust-lang@b2c6eeb in rust-lang#68788. r? @petrochenkov
Remove unneeded calls to format!()
…lacrum remove redundant clones, references to operands, explicit boolean comparisons and filter(x).next() calls.
@bors r+ p=10 rollup=never |
📌 Commit 13e4c6c has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Feb 28, 2020
☀️ Test successful - checks-azure |
This was referenced Feb 28, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Successful merges:
SelfCtor
, avoid unconstrained tyvars #69340 (instantiate_value_path: onSelfCtor
, avoid unconstrained tyvars)token
->normalized_token
,nonnormalized_token
->token
#69384 (parser:token
->normalized_token
,nonnormalized_token
->token
)Pattern
obligation cause more for better diagnostics #69452 (typeck: usePattern
obligation cause more for better diagnostics)boxed_slice_try_from
#69538 (Stabilizeboxed_slice_try_from
)Failed merges:
r? @ghost