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

Error out against additional non-auto trait bounds #3008

Open
CohenArthur opened this issue May 17, 2024 · 1 comment
Open

Error out against additional non-auto trait bounds #3008

CohenArthur opened this issue May 17, 2024 · 1 comment

Comments

@CohenArthur
Copy link
Member

There needs to be special handling around bounds like these:

trait A {}
trait B {}
trait C {}

impl dyn A + B {}
impl dyn A + B + C {}

This code needs to error out because B and C are not auto traits

This depends on #3007 being solved properly.

@CohenArthur CohenArthur added this to the Auto traits improvements milestone Dec 24, 2024
CohenArthur added a commit to CohenArthur/gccrs that referenced this issue Dec 25, 2024
If additional trait bounds aren't auto traits, then the typechecker
must error out (Rust-GCC#3008)

gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-type.cc: Add TODO note.
@CohenArthur
Copy link
Member Author

We can also take care of this later, as it's an error and we must first focus on handling correct code. I'll move this out of the Auto traits improvement milestone

CohenArthur added a commit to CohenArthur/gccrs that referenced this issue Dec 25, 2024
If additional trait bounds aren't auto traits, then the typechecker
must error out (Rust-GCC#3008)

gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-type.cc: Add TODO note.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant