Skip to content
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

Merged
merged 34 commits into from
Jul 6, 2020
Merged

Rollup of 12 pull requests #74073

merged 34 commits into from
Jul 6, 2020

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

djugei and 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 <[email protected]>
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 fixes rust-lang#56175.
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
…=kennytm

variant_count: avoid incorrect dummy implementation

This also avoids a stage 0 doctest failure.
@Manishearth
Copy link
Member Author

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

@bors
Copy link
Contributor

bors commented Jul 5, 2020

📌 Commit e624363 has been approved by Manishearth

@rustbot rustbot added the rollup A PR which is a rollup label Jul 5, 2020
@bors bors 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
Copy link
Contributor

bors commented Jul 5, 2020

⌛ Testing commit e624363 with merge 0c03aee...

@bors
Copy link
Contributor

bors commented Jul 6, 2020

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

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

📣 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
Member Author

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
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.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.