Move object safety suggestions to the end of the error#88892
Merged
bors merged 1 commit intorust-lang:masterfrom Sep 16, 2021
Merged
Move object safety suggestions to the end of the error#88892bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
(rust-highfive has picked a reviewer for you, use r? to override) |
estebank
commented
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 |
Contributor
Author
There was a problem hiding this comment.
We need to account for cases where the problem is caused by a super trait and make this diagnostic better targeted.
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 40f2a3b has been approved by |
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
Member
|
@bors r- I think this is causing a bunch of failures in #88940 (comment) |
40f2a3b to
9762116
Compare
Contributor
Author
|
@bors r=petrochenkov We now sort the suggestions before emition for consistent output. |
Collaborator
|
📌 Commit 9762116 has been approved by |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.