Skip to content

Rollup of 12 pull requests - #74073

Merged
bors merged 34 commits into
rust-lang:masterfrom
Manishearth:rollup-faqo9lx
Jul 6, 2020
Merged

Rollup of 12 pull requests#74073
bors merged 34 commits into
rust-lang:masterfrom
Manishearth:rollup-faqo9lx

Conversation

@Manishearth

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

djugeiand others added 30 commits May 27, 2020 19:59
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.
Co-authored-by: varkor <github@varkor.com>
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.
…-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 fixesrust-lang#56175.
Use `Span`s to identify unreachable subpatterns in or-patterns
Fixesrust-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#47814rust-lang#57739rust-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
…=kennytm
variant_count: avoid incorrect dummy implementation
This also avoids a stage 0 doctest failure.
@Manishearth

Copy link
Copy Markdown
MemberAuthor

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@bors

bors commented Jul 5, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit e624363 has been approved by Manishearth

@rustbotrustbot added the rollup A PR which is a rollup label Jul 5, 2020
@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 5, 2020
@bors

bors commented Jul 5, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit e624363 with merge 0c03aee...

@bors

bors commented Jul 6, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions, checks-azure
Approved by: Manishearth
Pushing 0c03aee to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jul 6, 2020
@bors
bors merged commit 0c03aee into rust-lang:masterJul 6, 2020
@rust-highfive

Copy link
Copy Markdown
Contributor

📣 Toolstate changed by #74073!

Tested on commit 0c03aee.
Direct link to PR: #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).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jul 6, 2020
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).
@Manishearth
Manishearth deleted the rollup-faqo9lx branch July 6, 2020 03:45
@Manishearth

Copy link
Copy Markdown
MemberAuthor

Potential tool failure:

2020-07-06T01:42:44.6886637Z thread 'rustc' panicked at 'attempted .def_id() on invalid res: NonMacroAttr(Builtin)', /checkout/src/libstd/macros.rs:16:9
2020-07-06T01:42:44.6894068Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-07-06T01:42:44.6898734Z 2020-07-06T01:42:44.6908696Z error: internal compiler error: unexpected panic
2020-07-06T01:42:44.6913450Z 2020-07-06T01:42:44.6921766Z note: the compiler unexpectedly panicked. this is a bug.
2020-07-06T01:42:44.6926813Z 2020-07-06T01:42:44.6933768Z note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
2020-07-06T01:42:44.6995882Z 2020-07-06T01:42:44.6996824Z note: rustc 1.46.0-nightly (0c03aee8b 2020-07-05) running on x86_64-unknown-linux-gnu
2020-07-06T01:42:44.6997124Z 2020-07-06T01:42:44.6998040Z note: compiler flags: -Z macro-backtrace -Z binary-dep-depinfo -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C link-args=-Wl,-rpath,$ORIGIN/../lib --crate-type lib
2020-07-06T01:42:44.6998532Z 2020-07-06T01:42:44.6998800Z note: some of the compiler flags provided by cargo are hidden

This might be #74027

@nnethercote

Copy link
Copy Markdown
Contributor

This caused a slight perf regression on wf-projection-stress-65510, but that's a synthetic benchmark and doesn't matter much. I don't know which PR might be responsible.

@cuvipercuviper added this to the 1.46 milestone May 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@Manishearth@bors@rust-highfive@nnethercote@cuviper@rustbot@djugei@pickfire@da-x@Nadrieril@lcnr@tmiasko@oli-obk@JohnTitor@RalfJung