-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Cannot declare a generic fn with a constraint containing a region #8579
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
Comments
After poking around a bit in @nikomatsakis: you wrote most of the region code. Is this the right way to solve this bug? |
Similar to #6551 (which is the ICE one gets if one does what it asks and uses |
Unfortunately, due to rust-lang#8579 and rust-lang#6551, extra::workcache can't be made to work with the new extra::json. Either ICEs are cause (which is the state currently) or there are unconstrained types at the callsites for extra::work_cache::json_encode.
This is working today due to many changes to lifetimes, and I've seen tests for this in the testsuite so closing. |
`unnecessary_join` lint changelog: Adds a lint called ``[`unnecessary_join`]`` that detects cases of `.collect::<Vec<String>>.join("")` or `.collect::<Vec<_>>.join("")` on an iterator, suggesting `.collect::<String>()` instead Fixes: rust-lang/rust-clippy#8570 This is a reopen of rust-lang/rust-clippy#8573 changelog: add lint [`unnecessary_join`]
We cannot declare a generic function where one of the tyvars is constrained by a type that contains a region. Here's an example:
This errors with:
There is a workaround though. Instead we can use a vtable, which compiles fine.
The text was updated successfully, but these errors were encountered: