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

Move object safety suggestions to the end of the error #88892

Merged
merged 1 commit into from
Sep 16, 2021

Conversation

estebank
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 12, 2021
Comment on lines 7 to +14
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/issue-18959.rs:1:20
|
LL | pub trait Foo { fn foo<T>(&self, ext_thing: &T); }
| ^^^ ...because method `foo` has generic type parameters
LL | pub trait Bar: Foo { }
| --- this trait cannot be made into an object...
= help: consider moving `foo` to another trait
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to account for cases where the problem is caused by a super trait and make this diagnostic better targeted.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 13, 2021

📌 Commit 40f2a3b has been approved by petrochenkov

@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 Sep 13, 2021
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 14, 2021
Move object safety suggestions to the end of the error
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 14, 2021
Move object safety suggestions to the end of the error
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 14, 2021
Move object safety suggestions to the end of the error
@Manishearth
Copy link
Member

@bors r-

I think this is causing a bunch of failures in #88940 (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 Sep 14, 2021
@estebank
Copy link
Contributor Author

@bors r=petrochenkov

We now sort the suggestions before emition for consistent output.

@bors
Copy link
Contributor

bors commented Sep 15, 2021

📌 Commit 9762116 has been approved by petrochenkov

@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 Sep 15, 2021
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 16, 2021
Move object safety suggestions to the end of the error
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 16, 2021
Move object safety suggestions to the end of the error
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2021
…arth

Rollup of 10 pull requests

Successful merges:

 - rust-lang#88292 (Enable --generate-link-to-definition for rustc's docs)
 - rust-lang#88729 (Recover from `Foo(a: 1, b: 2)`)
 - rust-lang#88875 (cleanup(rustc_trait_selection): remove vestigial code from rustc_on_unimplemented)
 - rust-lang#88892 (Move object safety suggestions to the end of the error)
 - rust-lang#88928 (Document the closure arguments for `reduce`.)
 - rust-lang#88976 (Clean up and add doc comments for CStr)
 - rust-lang#88983 (Allow calling `get_body_with_borrowck_facts` without `-Z polonius`)
 - rust-lang#88985 (Update clobber_abi list to include k[1-7] regs)
 - rust-lang#88986 (Update the backtrace crate)
 - rust-lang#89009 (Fix typo in `break` docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 14eb87d into rust-lang:master Sep 16, 2021
@cuviper cuviper added this to the 1.57.0 milestone Nov 16, 2023
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.

None yet

6 participants