-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
existential type
can accept generic bounds that do not specify a trait
#53090
Comments
existential type
can accept generic bounds that do not specify a trait
@rkruppe points out this could be useful when using tokens passed in and out of a module (that is, inside the module in which the However, this is only true under the originally-specified behaviour of |
@varkor should we maybe close this issue? I think it's fine for |
@oli-obk that seems reasonable to me, although I do think the parsing issue above ought to be fixed (though that's probably a separate issue). |
There's nothing wrong in practice with Edit: also note that this does become confusing if the final syntax for |
Oh yea, I'd be perfectly happy with requiring a trait in the bounds of existential types. |
Hello! I'd like to take a look at this |
Great! So the error for rust/src/librustc_passes/ast_validation.rs Line 423 in 8af675a
I'm guessing that all that's needed is to replicate the same thing for rust/src/librustc_passes/ast_validation.rs Line 575 in 8af675a
Maybe pull out the check into a method that you can call from both sites |
…e, r=oli-obk Require a trait in the bounds of existential types Fixes rust-lang#53090 r? @oli-obk
…e, r=oli-obk Require a trait in the bounds of existential types Fixes rust-lang#53090 r? @oli-obk
…e, r=oli-obk Require a trait in the bounds of existential types Fixes rust-lang#53090 r? @oli-obk
…e, r=oli-obk Require a trait in the bounds of existential types Fixes rust-lang#53090 r? @oli-obk
…e, r=oli-obk Require a trait in the bounds of existential types Fixes rust-lang#53090 r? @oli-obk
Although the RFC wasn't explicit about this, it seems that this is an oversight, as
existential type
should function like return-positionimpl Trait
.The text was updated successfully, but these errors were encountered: