Repository navigation
Rewrite relaxed bound policy code #165677
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -6,12 +6,6 @@ LL | fn main() -> dyn Iterator + ?Iterator::advance_by(usize) { | |
| | | ||
| = note: an associated function named `Iterator::advance_by` exists in another namespace | ||
|
|
||
| error: relaxed bounds are not permitted in trait object types | ||
| --> $DIR/missing-associated_item_or_field_def_ids.rs:3:29 | ||
| | | ||
| LL | fn main() -> dyn Iterator + ?Iterator::advance_by(usize) { | ||
|
Contributor
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. there's a nameres issue here, we stop emitting further errors now. If we don't do that it becomes really hard to check for specific traits that are allowed/disallowed in relaxed bounds. |
||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| error: aborting due to 2 previous errors | ||
| error: aborting due to 1 previous error | ||
|
|
||
| For more information about this error, try `rustc --explain E0404`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,5 +7,4 @@ trait Tr { | |
| fn main() { | ||
| let _: dyn Tr + ?Foo<Assoc = ()>; | ||
| //~^ ERROR: cannot find trait `Foo` in this scope | ||
| //~| ERROR: relaxed bounds are not permitted in trait object types | ||
|
Contributor
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. Same here, Foo has a nameres error |
||
| } | ||
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 could remove Forget here again. It's temporarily unused, though will soon be. I guess I kept it as an example of how this will work. Doesn't do much harm either.
View changes since the review