Skip to content

Rollup of 11 pull requests - #104480

Closed
matthiaskrgr wants to merge 88 commits into
rust-lang:masterfrom
matthiaskrgr:rollup-sk2kw01
Closed

Rollup of 11 pull requests#104480
matthiaskrgr wants to merge 88 commits into
rust-lang:masterfrom
matthiaskrgr:rollup-sk2kw01

Conversation

@matthiaskrgr

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Tiddo Langerakand others added 30 commits August 10, 2022 13:07
Previously, when triggering a method extraction from within a trait
impl block, then this would always create a new impl block for
the struct, even if there already is one. Now, it'll put the extracted
method in the matching existing block if it exists.
…it-into-impl-root, r=Veykril
Feat: extracted method from trait impl is placed in existing impl
**Before**
https://user-images.githubusercontent.com/1759192/183872883-3b0eafd2-d1dc-440e-9e66-38e3372f8b64.mp4
**After**
https://user-images.githubusercontent.com/1759192/183875769-87f34c7d-52f0-4dfc-9766-f591ee738ebb.mp4
Previously, when triggering a method extraction from within an impl trait block, then this would always create a new impl block for
the struct, even if there already is one. Now, if there is already an existing trait-less impl block, then it'll put the extracted method in there.
**Caveats**:
- It currently requires the target impl block to be non-empty. This limitation is because the current architecture takes a `node_to_insert_after` as reference for where to insert the extracted function. An empty impl block doesn't have such a reference node, since it's empty. It seems that supporting this requires a much larger and more complex change.
- This is my first contribution in rust, so apologies for any beginner mistakes.
The length of byte strings containing escaped newlines is displayed two
bytes longer when the first escaped character is a newline.
This is due to a small bug in handling the first escaped newline in
string literals.
Closesrust-lang#13567
Thanks to Lukas Wirth for a suggestion.
Bump Cargo rust-version fields to latest stable
We already depend on `let ... else` now anyways
Closesrust-lang/rust-analyzer#13562
Shift no characters when using raw string literals
Fixesrust-lang#104142
Given the following code:
```rust
fn main() {
println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#);
}
```
The current output is:
```
error: invalid format string: unmatched `}` found
--> src/main.rs:2:59
|
2 | println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#); //~ ERROR invalid format string: unmatched `}` found
| ^ unmatched `}` in format string
|
= note: if you intended to print `}`, you can escape it using `}}`
error: could not compile `debug_playground` due to previous error
```
The output should look like:
```
error: invalid format string: unmatched `}` found
--> src/main.rs:2:45
|
2 | println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#); //~ ERROR invalid format string: unmatched `}` found
| ^ unmatched `}` in format string
|
= note: if you intended to print `}`, you can escape it using `}}`
error: could not compile `debug_playground` due to previous error
```
This pull request fixes the wrong span for `invalid format string` error and also solves the ICE.
Respect visibility & stability of inherent associated types
As discussed in rust-lang#103621, this probably won't be the final location of the code that resolves inherent associated types. Still, I think it's valuable to push correctness fixes for this feature (in regards to visibility and stability).
Let me know if I should write a translatable diagnostic instead and if I should move the tests to `privacy/` and `stability-attribute/` respectively.
Fixesrust-lang#104243.
```@rustbot``` label A-visibility F-inherent_associated_types
r? ```@cjgillot``` (since you reviewed rust-lang#103621, feel free to reroll though)
avoid memory leak in mpsc test
r? ``@Amanieu``
Fix test/ui/issues/issue-30490.rs
Since the empty main is used for `not(unix)`, all the targets that will use this empty main will also need `allow(unused_imports)`.
Originally part of rust-lang#100316
Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
…ize, r=GuillaumeGomez
rustdoc: remove no-op CSS `.popover { font-size: 1rem }`
This rule was added in cc4f804 because the help popover inherited the font-size from the help button "?" icon.
It doesn't inherit this any more, because it was moved from being nested inside the link to sharing a wrapper DIV with it.
…ustify-content, r=GuillaumeGomez
rustdoc: remove no-op CSS `.main-header { justify-content }`
This rule was added in 152e888 to push the out-of-band content to the right while allowing it to line wrap when it got too big. The idea was that the justification rule would fill the space between the `<h1>` element and the `<div class="out-of-band">` element.
A later commit, 3cb03cb, flattened the in-band element into the `<h1>`, copying the `flex-grow` rule. This means the `<h1>` element now grows to fill the space, so there's no need to justify-content any more.
This commit also adds a test case for this.
…-docs, r=tmandry
Fuchsia test suite script fix
Fixing error from rust-lang#103842 (comment)
r? ``@tmandry``
…r=lnicola
⬆️ rust-analyzer
r? ``@ghost``
Update PROBLEMATIC_CONSTS in style.rs
added 3735932941, since 3735927486 was already present.
@rustbotrustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 16, 2022
@matthiaskrgr

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=11

@bors

bors commented Nov 16, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit d3ad86b has been approved by matthiaskrgr

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 16, 2022
@bors

bors commented Nov 16, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit d3ad86b with merge afe212a6e046749cbf04ac9130ac0e373bba235d...

@bors

bors commented Nov 16, 2022

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 16, 2022
@matthiaskrgrmatthiaskrgr mentioned this pull request Nov 16, 2022
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web)(plain)

Click to see the possible cause of the failure (guessed by this bot)

error: expect test failed
--> crates/proc-macro-srv/src/tests/mod.rs:19:9
You can update all `expect!` tests by running:
env UPDATE_EXPECT=1 cargo test
To update a single test, place the cursor on `expect` token and use `run` feature of rust-analyzer.
Expect:
----
SUBTREE $
IDENT compile_error 4294967295
IDENT compile_error 4294967295
PUNCH ! [joint] 4294967295
SUBTREE () 4294967295
LITERAL "#[derive(DeriveError)] struct S ;" 4294967295
PUNCH ; [alone] 4294967295
Actual:
----
SUBTREE $
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [alone] 4294967295
SUBTREE () 4294967295
LITERAL "#[derive(DeriveError)] struct S ;" 4294967295
PUNCH ; [alone] 4294967295
Diff:
----
SUBTREE $
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [jointalone] 4294967295
SUBTREE () 4294967295
LITERAL "#[derive(DeriveError)] struct S ;" 4294967295
PUNCH ; [alone] 4294967295
---- tests::test_attr_macro stdout ----
---
Expect:
----
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [joint] 4294967295
SUBTREE () 4294967295
LITERAL "#[attr_error(some arguments)] mod m {}" 4294967295
PUNCH ; [alone] 4294967295
Actual:
----
SUBTREE $
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [alone] 4294967295
SUBTREE () 4294967295
LITERAL "#[attr_error(some arguments)] mod m {}" 4294967295
PUNCH ; [alone] 4294967295
Diff:
----
SUBTREE $
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [jointalone] 4294967295
SUBTREE () 4294967295
LITERAL "#[attr_error(some arguments)] mod m {}" 4294967295
PUNCH ; [alone] 4294967295
---- tests::test_fn_like_macro_clone_literals stdout ----
error: expect test failed
--> crates/proc-macro-srv/src/tests/mod.rs:106:9
Expect:
----
SUBTREE $
LITERAL 1u16 4294967295
PUNCH , [alone] 4294967295
LITERAL 2_u32 4294967295
PUNCH , [alone] 4294967295
PUNCH - [joint] 4294967295
LITERAL 4i64 4294967295
PUNCH , [alone] 4294967295
LITERAL 3.14f32 4294967295
PUNCH , [alone] 4294967295
LITERAL "hello bridge" 4294967295
Actual:
----
SUBTREE $
SUBTREE $
LITERAL 1u16 4294967295
PUNCH , [alone] 4294967295
LITERAL 2_u32 4294967295
PUNCH , [alone] 4294967295
PUNCH - [alone] 4294967295
LITERAL 4i64 4294967295
PUNCH , [alone] 4294967295
LITERAL 3.14f32 4294967295
PUNCH , [alone] 4294967295
LITERAL "hello bridge" 4294967295
Diff:
----
SUBTREE $
SUBTREE $
LITERAL 1u16 4294967295
PUNCH , [alone] 4294967295
LITERAL 2_u32 4294967295
PUNCH , [alone] 4294967295
PUNCH - [jointalone] 4294967295
LITERAL 4i64 4294967295
PUNCH , [alone] 4294967295
LITERAL 3.14f32 4294967295
PUNCH , [alone] 4294967295
LITERAL "hello bridge" 4294967295
failures:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web)(plain)

Click to see the possible cause of the failure (guessed by this bot)

error: expect test failed
--> crates/proc-macro-srv/src/tests/mod.rs:19:9
You can update all `expect!` tests by running:
env UPDATE_EXPECT=1 cargo test
To update a single test, place the cursor on `expect` token and use `run` feature of rust-analyzer.
Expect:
----
SUBTREE $
IDENT compile_error 4294967295
IDENT compile_error 4294967295
PUNCH ! [joint] 4294967295
SUBTREE () 4294967295
LITERAL "#[derive(DeriveError)] struct S ;" 4294967295
PUNCH ; [alone] 4294967295
Actual:
----
SUBTREE $
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [alone] 4294967295
SUBTREE () 4294967295
LITERAL "#[derive(DeriveError)] struct S ;" 4294967295
PUNCH ; [alone] 4294967295
Diff:
----
SUBTREE $
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [jointalone] 4294967295
SUBTREE () 4294967295
LITERAL "#[derive(DeriveError)] struct S ;" 4294967295
PUNCH ; [alone] 4294967295
---- tests::test_attr_macro stdout ----
---
Expect:
----
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [joint] 4294967295
SUBTREE () 4294967295
LITERAL "#[attr_error(some arguments)] mod m {}" 4294967295
PUNCH ; [alone] 4294967295
Actual:
----
SUBTREE $
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [alone] 4294967295
SUBTREE () 4294967295
LITERAL "#[attr_error(some arguments)] mod m {}" 4294967295
PUNCH ; [alone] 4294967295
Diff:
----
SUBTREE $
SUBTREE $
IDENT compile_error 4294967295
PUNCH ! [jointalone] 4294967295
SUBTREE () 4294967295
LITERAL "#[attr_error(some arguments)] mod m {}" 4294967295
PUNCH ; [alone] 4294967295
---- tests::test_fn_like_macro_clone_literals stdout ----
error: expect test failed
--> crates/proc-macro-srv/src/tests/mod.rs:106:9
Expect:
----
SUBTREE $
LITERAL 1u16 4294967295
PUNCH , [alone] 4294967295
LITERAL 2_u32 4294967295
PUNCH , [alone] 4294967295
PUNCH - [joint] 4294967295
LITERAL 4i64 4294967295
PUNCH , [alone] 4294967295
LITERAL 3.14f32 4294967295
PUNCH , [alone] 4294967295
LITERAL "hello bridge" 4294967295
Actual:
----
SUBTREE $
SUBTREE $
LITERAL 1u16 4294967295
PUNCH , [alone] 4294967295
LITERAL 2_u32 4294967295
PUNCH , [alone] 4294967295
PUNCH - [alone] 4294967295
LITERAL 4i64 4294967295
PUNCH , [alone] 4294967295
LITERAL 3.14f32 4294967295
PUNCH , [alone] 4294967295
LITERAL "hello bridge" 4294967295
Diff:
----
SUBTREE $
SUBTREE $
LITERAL 1u16 4294967295
PUNCH , [alone] 4294967295
LITERAL 2_u32 4294967295
PUNCH , [alone] 4294967295
PUNCH - [jointalone] 4294967295
LITERAL 4i64 4294967295
PUNCH , [alone] 4294967295
LITERAL 3.14f32 4294967295
PUNCH , [alone] 4294967295
LITERAL "hello bridge" 4294967295
failures:

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcrollupA PR which is a rollupS-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

17 participants

@matthiaskrgr@bors@rust-log-analyzer@rustbot@saschanaz@WaffleLapkin@Veykril@lowr@lnicola@noritada@RalfJung@Ayush1325@notriddle@fmease@TaKO8Ki@andrewpollack@scruss