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

Vec should retain in-place methods #13249

Closed
lifthrasiir opened this issue Apr 1, 2014 · 1 comment · Fixed by #13326
Closed

Vec should retain in-place methods #13249

lifthrasiir opened this issue Apr 1, 2014 · 1 comment · Fixed by #13326

Comments

@lifthrasiir
Copy link
Contributor

There are at least two missing methods from OwnedVector<T> not in Vec<T>:

  • Vec::retain
  • Vec::grow_fn

Unlike ImmutableVector methods (bsearch for example) and MutableVector methods (swap for example), they have to be directly implemented to Vec<T>.

@Aatch Aatch added the A-libs label Apr 1, 2014
@pongad
Copy link
Contributor

pongad commented Apr 3, 2014

I'm on it.

@bors bors closed this as completed in 4cf8d8c Apr 5, 2014
arcnmx pushed a commit to arcnmx/rust that referenced this issue Jan 9, 2023
…gation-resolution, r=lnicola

Apply fallback before final obligation resolution

Fixes rust-lang#13249
Fixes rust-lang#13518

We've been applying fallback to type variables independently even when there are some unresolved obligations that associate them. This PR applies fallback to unresolved scalar type variables before the final attempt of resolving obligations, which enables us to infer more.

Unlike rustc, which has separate storages for each kind of type variables, we currently don't have a way to retrieve only integer/float type variables without folding/visiting every single type we've inferred. I've repurposed `TypeVariableData` as bitflags that also hold the kind of the type variable it's referring to so that we can "reconstruct" scalar type variables from their indices.

This PR increases the number of ??ty for rust-analyzer repo not because we regress and fail to infer the existing code but because we fail to infer the new code. It seems we have problems inferring some functions bitflags produces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants