-
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 12 pull requests #74073
Rollup of 12 pull requests #74073
Conversation
Co-authored-by: Ralf Jung <post@ralfj.de>
The recursive check of `try_print_visible_def_path` did not properly handle the Rust 2018 case of crate-paths without 'extern crate'. Instead, it returned a "not found" via (false, self). This fixes issue rust-lang#56175.
The thread that recovers the unique access to Arc inner value (e.g., drop when ref-count strong reaches zero, successful try_unwrap), ensures that other operations on Arc inner value happened before by synchronizing with release operations performed when decrementing the reference counter. When try_unwrap succeeds, the current thread recovers the unique access to Arc inner value, so release is unnecessary.
added .collect() into String from Box<str> I have not created an rfc, because i felt like this is a very minor change. i have just set a random feature name and rust version as stability attribute, i expect to have to change that, i just don't know what the policy on that is. all guides i could find focused on contributing to the compiler, not contributing to the standard library. drawbacks: more code in the standard library, could be replaced with specialization: base-implementation for AsRef\<str> and specialization for String and Cow. i can write that code if ppl want it. advantages: using "real strings" i.e. Box\<str> is as ergonomic as string slices (&str) and string buffers (String) with iterators.
Add unstable docs for rustc_attrs r? @RalfJung
…-morse Some refactoring around intrinsic type checking So... This PR went a bit overboard. I wanted to make the `rustc_peek` intrinsic safe (cc @ecstatic-morse ), and remembered a long-standing itch of mine. So I made that huge `&str` match for the intrinsic name a match on `Symbol`s (so basically `u32`s). This is unlikely to have a positive perf effect, even if it likely has better codegen (intrinsics are used rarely, mostly once in their wrapper), so it's mostly a consistency thing since other places actually match on the symbol name of the intrinsics.
…r=petrochenkov Fix try_print_visible_def_path for Rust 2018 The recursive check of `try_print_visible_def_path` did not properly handle the Rust 2018 case of crate-paths without 'extern crate'. Instead, it returned a "not found" via (false, self). This fixes rust-lang#56175.
…, r=varkor Explain exhaustive matching on {usize,isize} maximum values The wording is taken from https://github.com/rust-lang/rfcs/blob/master/text/2591-exhaustive-integer-pattern-matching.md#reference-level-explanation. Fixes rust-lang#73919 r? @varkor
Use `Span`s to identify unreachable subpatterns in or-patterns Fixes rust-lang#71977
…arkor add `lazy_normalization_consts` feature gate In rust-lang#71973 I underestimated the amount of code which is influenced by lazy normalization of consts and decided against having a separate feature flag for this. Looking a bit more into this, the following issues are already working with lazy norm in its current state rust-lang#47814 rust-lang#57739 rust-lang#73980 I therefore think it is worth it to enable lazy norm separately. Note that `#![feature(const_generics)]` still automatically activates this feature, so using `#![feature(const_generics, lazy_normalization_consts)]` is redundant. r? @varkor @nikomatsakis
Remove unnecessary release from Arc::try_unwrap The thread that recovers the unique access to Arc inner value (e.g., drop when ref-count strong reaches zero, successful try_unwrap), ensures that other operations on Arc inner value happened before by synchronizing with release operations performed when decrementing the reference counter. When try_unwrap succeeds, the current thread recovers the unique access to Arc inner value, so release is unnecessary. r? @Amanieu
Convert more `DefId`s to `LocalDefId`s
Fix spacing in Iterator fold doc
expected_found `&T` -> `T`
…=kennytm variant_count: avoid incorrect dummy implementation This also avoids a stage 0 doctest failure.
📌 Commit e624363 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
📣 Toolstate changed by #74073! Tested on commit 0c03aee. 💔 rls on windows: test-pass → build-fail (cc @Xanewok). |
Tested on commit rust-lang/rust@0c03aee. Direct link to PR: <rust-lang/rust#74073> 💔 rls on windows: test-pass → build-fail (cc @Xanewok). 💔 rls on linux: test-pass → build-fail (cc @Xanewok). 💔 rustfmt on windows: test-pass → build-fail (cc @topecongiro). 💔 rustfmt on linux: test-pass → build-fail (cc @topecongiro).
Potential tool failure:
This might be #74027 |
This caused a slight perf regression on |
Successful merges:
Span
s to identify unreachable subpatterns in or-patterns #73973 (UseSpan
s to identify unreachable subpatterns in or-patterns)lazy_normalization_consts
feature gate #74000 (addlazy_normalization_consts
feature gate)DefId
s toLocalDefId
s #74027 (Convert moreDefId
s toLocalDefId
s)&T
->T
#74057 (expected_found&T
->T
)Failed merges:
r? @ghost