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

Shorten output of E0391 #46282

Merged
merged 4 commits into from
Nov 28, 2017
Merged

Shorten output of E0391 #46282

merged 4 commits into from
Nov 28, 2017

Conversation

estebank
Copy link
Contributor

Use the shorter def_span on the impl-Trait cyclic reference errors.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

Copy link
Member

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

The output of issue-23305.rs is also affected.

 error[E0391]: unsupported cyclic reference between types/traits detected
   --> $DIR/issue-23305.rs:15:12
    |
 15 | impl ToNbt<Self> {}
    |            ^^^^ cyclic reference
    |
 note: the cycle begins when processing `<impl at $DIR/issue-23305.rs:15:1: 15:20>`...
   --> $DIR/issue-23305.rs:15:1
    |
 15 | impl ToNbt<Self> {}
-   | ^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^
    = note: ...which then again requires processing `<impl at $DIR/issue-23305.rs:15:1: 15:20>`, completing the cycle.
 
 error: aborting due to previous error

--> $DIR/auto-trait-leak.rs:52:1
|
52 | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Copy link
Member

Choose a reason for hiding this comment

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

Actual output differs from expected output. Please update.

 error[E0391]: unsupported cyclic reference between types/traits detected
   --> $DIR/auto-trait-leak.rs:52:1
    |
-52 | fn cycle1() -> impl Clone {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference
+52 |   fn cycle1() -> impl Clone {
+   |  _-^^^^^^^^^^^^^^^^^^^^^^^^
+53 | |     //~^ ERROR unsupported cyclic reference between types/traits detected
+54 | |     //~| cyclic reference
+55 | |     //~| NOTE the cycle begins when processing `cycle1`...
+...  |
+60 | |     Rc::new(Cell::new(5))
+61 | | }
+   | |_- cyclic reference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missed the label. Done.

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 27, 2017
@arielb1
Copy link
Contributor

arielb1 commented Nov 27, 2017

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 27, 2017

📌 Commit 487daab has been approved by arielb1

@kennytm kennytm 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 27, 2017
kennytm added a commit to kennytm/rust that referenced this pull request Nov 27, 2017
…rielb1

Shorten output of E0391

Use the shorter `def_span` on the impl-Trait cyclic reference errors.
bors added a commit that referenced this pull request Nov 27, 2017
Rollup of 10 pull requests

- Successful merges: #45506, #46174, #46231, #46240, #46249, #46258, #46262, #46275, #46282, #46285
- Failed merges:
@bors bors merged commit 487daab into rust-lang:master Nov 28, 2017
@estebank estebank deleted the impl-trait-cicle-span branch November 9, 2023 05:25
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants