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

Account for multiple multiline spans with empty padding #106190

Merged
merged 1 commit into from
Dec 29, 2022

Conversation

estebank
Copy link
Contributor

Instead of

LL |    fn oom(
   |  __^
   | | _|
   | ||
LL | || ) {
   | ||_-
LL | |  }
   | |__^

emit

LL | // fn oom(
LL | || ) {
   | ||_-
LL | |  }
   | |__^

@rustbot
Copy link
Collaborator

rustbot commented Dec 27, 2022

r? @jackh726

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added 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. labels Dec 27, 2022
Comment on lines 1 to 7
error[E0515]: cannot return value referencing local variable `rawLines`
--> $DIR/issue-13497-2.rs:3:5
|
LL | rawLines
| ______^
| | _____|
| ||
LL | // rawLines
LL | || .iter().map(|l| l.trim()).collect()
| ||_______________-___________________________^ returns a value referencing data owned by the current function
| |_______________|
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to tweak the layout algorithm here to avoid the first unnecessary overlap, but it might be tricky to get right.

Screen Shot 2022-12-27 at 11 06 45 AM

@jackh726
Copy link
Member

r=me with CI green

@estebank
Copy link
Contributor Author

@bors r=jackh726

@bors
Copy link
Contributor

bors commented Dec 27, 2022

📌 Commit 83c635c has been approved by jackh726

It is now in the queue for this repository.

@bors bors 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 Dec 27, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 28, 2022
…jackh726

Account for multiple multiline spans with empty padding

Instead of

```
LL |    fn oom(
   |  __^
   | | _|
   | ||
LL | || ) {
   | ||_-
LL | |  }
   | |__^
```

emit

```
LL | // fn oom(
LL | || ) {
   | ||_-
LL | |  }
   | |__^
   ```
@matthiaskrgr
Copy link
Member

@bors r- clippy tests need to be reblessed
#106214 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 28, 2022
@rustbot
Copy link
Collaborator

rustbot commented Dec 28, 2022

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@estebank
Copy link
Contributor Author

@bors r=jackh726

@bors
Copy link
Contributor

bors commented Dec 28, 2022

📌 Commit 36e2910 has been approved by jackh726

It is now in the queue for this repository.

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 28, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 29, 2022
…jackh726

Account for multiple multiline spans with empty padding

Instead of

```
LL |    fn oom(
   |  __^
   | | _|
   | ||
LL | || ) {
   | ||_-
LL | |  }
   | |__^
```

emit

```
LL | // fn oom(
LL | || ) {
   | ||_-
LL | |  }
   | |__^
   ```
@bors
Copy link
Contributor

bors commented Dec 29, 2022

⌛ Testing commit 36e2910 with merge 4c9f117d9adb81d034f2b2d70468b757f0a73e56...

@bors
Copy link
Contributor

bors commented Dec 29, 2022

💔 Test failed - checks-actions

@bors bors 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 Dec 29, 2022
@rust-log-analyzer

This comment was marked as resolved.

Instead of

```
LL |    fn oom(
   |  __^
   | | _|
   | ||
LL | || ) {
   | ||_-
LL | |  }
   | |__^
```

emit

```
LL | // fn oom(
LL | || ) {
   | ||_-
LL | |  }
   | |__^
   ```
@estebank
Copy link
Contributor Author

@bors r=jackh726

@bors
Copy link
Contributor

bors commented Dec 29, 2022

📌 Commit af74ca0 has been approved by jackh726

It is now in the queue for this repository.

@bors bors 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 Dec 29, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 29, 2022
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params)
 - rust-lang#105899 (`./x doc library --open` opens `std`)
 - rust-lang#106190 (Account for multiple multiline spans with empty padding)
 - rust-lang#106202 (Trim more paths in obligation types)
 - rust-lang#106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing)
 - rust-lang#106236 (docs/test: add docs and a UI test for `E0514` and `E0519`)
 - rust-lang#106259 (Update Clippy)
 - rust-lang#106260 (Fix index out of bounds issues in rustdoc)
 - rust-lang#106263 (Formatter should not try to format non-Rust files)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit be56dc0 into rust-lang:master Dec 29, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 29, 2022
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params)
 - rust-lang#105899 (`./x doc library --open` opens `std`)
 - rust-lang#106190 (Account for multiple multiline spans with empty padding)
 - rust-lang#106202 (Trim more paths in obligation types)
 - rust-lang#106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing)
 - rust-lang#106236 (docs/test: add docs and a UI test for `E0514` and `E0519`)
 - rust-lang#106259 (Update Clippy)
 - rust-lang#106260 (Fix index out of bounds issues in rustdoc)
 - rust-lang#106263 (Formatter should not try to format non-Rust files)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 12, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params)
 - rust-lang#105899 (`./x doc library --open` opens `std`)
 - rust-lang#106190 (Account for multiple multiline spans with empty padding)
 - rust-lang#106202 (Trim more paths in obligation types)
 - rust-lang#106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing)
 - rust-lang#106236 (docs/test: add docs and a UI test for `E0514` and `E0519`)
 - rust-lang#106259 (Update Clippy)
 - rust-lang#106260 (Fix index out of bounds issues in rustdoc)
 - rust-lang#106263 (Formatter should not try to format non-Rust files)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@estebank estebank deleted the multiline-start-tweak branch November 9, 2023 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants