Repository navigation
only make RustaceansAreAwesome satisfy trait clauses
#163958
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| //! Tests for specific instances of <https://github.com/rust-lang/rust/issues/161621> that don't | ||
| //! pass yet. See `dispatchability-placeholder-satisfies-bounds.rs` for context. | ||
| // FIXME(@dianne): this should be gone soon | ||
| //@ known-bug: unknown | ||
|
|
||
| trait HasAssoc { | ||
| type Assoc; | ||
| } | ||
|
|
||
| trait Parent<T> {} | ||
|
|
||
| trait NotDynCompatible | ||
| where | ||
| // We need to be able to normalize this for RustaceansAreAwesome in order to prove | ||
| // `<(RustaceansAreAwesome,) as HasAssoc>::Assoc: Owned` for the projection in the argument to | ||
| // the `Self: Parent<...>` supertrait bound. Currently a projection clause for it is missing | ||
| // from the `ParamEnv`. | ||
| (Self,): HasAssoc<Assoc = str>, | ||
| Self: Parent<<<(Self,) as HasAssoc>::Assoc as ToOwned>::Owned>, | ||
| { | ||
| fn f(&self); | ||
| } | ||
|
|
||
| fn main() {} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| error[E0277]: the trait bound `<(RustaceansAreAwesome,) as HasAssoc>::Assoc: Clone` is not satisfied | ||
| --> $DIR/dispatchability-placeholder-does-not-satisfy-bounds.rs:21:5 | ||
| | | ||
| LL | fn f(&self); | ||
| | ^^^^^^^^^^^^ the trait `Clone` is not implemented for `<(RustaceansAreAwesome,) as HasAssoc>::Assoc` | ||
| | | ||
| = note: required for `<(RustaceansAreAwesome,) as HasAssoc>::Assoc` to implement `ToOwned` | ||
|
|
||
| error: aborting due to 1 previous error | ||
|
|
||
| For more information about this error, try `rustc --explain E0277`. |
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've dumped all the passing tests in this file since they share a significant amount of context, especially when adding in the tests I've written for the followup to this, where many tests build on concepts that were set up in previous tests. maybe some of them should be split apart though?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems fine this way. A little bit more annoying to debug when only one of them breaks, but they are all very related |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left this as unknown for now since the issue is currently marked as closed and this issue is significantly more specific than what was reported there. not sure if it should be reopened until the followup to this lands or a new issue is warranted
View changes since the review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since you're following up immediately, this is fine