-
Notifications
You must be signed in to change notification settings - Fork 13.3k
GAT: Fails to compile with additional bounds #139207
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
This comment has been minimized.
This comment has been minimized.
The error message could be better tho. |
Are you sure? If remove the call to |
Oof, I should've looked more closely, my bad. Right, it's not impossible to call |
I mean I guess what I wrote previously about lifetimes is still the root cause ultimately. Given only However, once you have given |
I might be mistaken I don't think this is fixable in Rust's current type system. Edit: But let's see what others have to say. I remember there already being ago-old GH issues about this. |
#21974 comes to mind |
I think, no matter what, this should probably not be triaged as a discussion, because something is wrong there. |
By the way, my use case is to have an allocator for a single type inside the static memory (like |
I tried this code:
I expected to see this happen: Code should compile
Instead, this happened: Code did not compile. Probably because
'a
is different in both cases, I but cannot specify lifetime arguments explicitly if late bound lifetime parameters are present #42868 .Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: