Skip to content

On recursive ADT, provide indirection structured suggestion - #72740

Merged
bors merged 3 commits into
rust-lang:masterfrom
estebank:recursive-indirection
Jun 15, 2020
Merged

On recursive ADT, provide indirection structured suggestion#72740
bors merged 3 commits into
rust-lang:masterfrom
estebank:recursive-indirection

Conversation

@estebank

Copy link
Copy Markdown
Contributor

No description provided.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @matthewjasper

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 29, 2020
Comment on lines 15 to 16

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This suggestion isn't entirely correct, but if used the compiler will correctly tell you to write

enumMList<'a>{Cons(isize,&'aMList),Nil}

so I think it is ok.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These suggestions are now fairly long. While I don't have a strong opinion here, it may be better to only mention Box and & here.

@lcnrlcnrMay 29, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or thinking more about it, I would prefer if we keep

help: insert indirection (e.g., a Box, Rc, or &) at some point to make Foo representable

and only add an example using Box.

@matthewjaspermatthewjasper left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm also a bit concerned by the length of this suggestion.

Comment threadsrc/librustc_trait_selection/traits/error_reporting/mod.rs Outdated
@estebank
estebankforce-pushed the recursive-indirection branch from 9bc1ea2 to c209040CompareMay 31, 2020 02:59
@matthewjasper

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented May 31, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit c209040 has been approved by matthewjasper

@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 May 31, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 1, 2020
…atthewjasper
On recursive ADT, provide indirection structured suggestion
@RalfJungRalfJung mentioned this pull request Jun 1, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 6, 2020
…atthewjasper
On recursive ADT, provide indirection structured suggestion
@RalfJungRalfJung mentioned this pull request Jun 6, 2020
@RalfJung

Copy link
Copy Markdown
Member

Failed in https://github.com/rust-lang/rust/runs/744866295:

---- [ui] ui/issues/issue-72554.rs stdout ----
diff of stderr:
6	LL | A(ElemDerived)
7 | ----------- recursive without indirection
8 |
- = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ElemDerived` representable
+	help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ElemDerived` representable
+ |
+	LL | A(Box<ElemDerived>)
+ | ^^^^ ^
10 11	error: aborting due to previous error
12 

Probably needs a re-bless.
@bors r-

@borsbors 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 Jun 6, 2020
@estebank
estebankforce-pushed the recursive-indirection branch from c209040 to 03552ecCompareJune 10, 2020 21:54
@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors r=matthewjasper rebased

@bors

bors commented Jun 10, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 03552ec has been approved by matthewjasper

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 10, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 11, 2020
…atthewjasper
On recursive ADT, provide indirection structured suggestion
@RalfJungRalfJung mentioned this pull request Jun 11, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 12, 2020
…atthewjasper
On recursive ADT, provide indirection structured suggestion
@RalfJungRalfJung mentioned this pull request Jun 12, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jun 12, 2020
…atthewjasper
On recursive ADT, provide indirection structured suggestion
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jun 13, 2020
…atthewjasper
On recursive ADT, provide indirection structured suggestion
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jun 14, 2020
…atthewjasper
On recursive ADT, provide indirection structured suggestion
RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 15, 2020
…atthewjasper
On recursive ADT, provide indirection structured suggestion
This was referenced Jun 15, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2020
Rollup of 10 pull requests
Successful merges:
- rust-lang#72707 (Use min_specialization in the remaining rustc crates)
- rust-lang#72740 (On recursive ADT, provide indirection structured suggestion)
- rust-lang#72879 (Miri: avoid tracking current location three times)
- rust-lang#72938 (Stabilize Option::zip)
- rust-lang#73086 (Rename "cyclone" to "apple-a7" per changes in upstream LLVM)
- rust-lang#73104 (Example about explicit mutex dropping)
- rust-lang#73139 (Add methods to go from a nul-terminated Vec<u8> to a CString)
- rust-lang#73296 (Remove vestigial CI job msvc-aux.)
- rust-lang#73304 (Revert heterogeneous SocketAddr PartialEq impls)
- rust-lang#73331 (extend network support for HermitCore)
Failed merges:
r? @ghost
@bors
bors merged commit d97e8ca into rust-lang:masterJun 15, 2020
@estebank
estebank deleted the recursive-indirection branch November 9, 2023 05:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

6 participants

@estebank@rust-highfive@matthewjasper@bors@RalfJung@lcnr