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

Add size_hint for Permutations #13734

Closed
wackywendell opened this issue Apr 24, 2014 · 0 comments
Closed

Add size_hint for Permutations #13734

wackywendell opened this issue Apr 24, 2014 · 0 comments

Comments

@wackywendell
Copy link
Contributor

The size_hint for std::slice::Permutations should be easy to get right, correct?

It's just N!, where N is the length of the underlying vector, right? So getting that size_hint correct wouldn't hurt...

bors added a commit that referenced this issue Apr 27, 2014
I filed bugs #13734 and #13759 recently, and then realized I could probably fix them myself. This does exactly that, with a couple additional modifications and additions to the test-suite to pick up on that.

I've never done this before, so please feel free to tell me all the things I'm doing wrong or could be doing better.
@bors bors closed this as completed in b7d0feb Apr 27, 2014
arcnmx pushed a commit to arcnmx/rust that referenced this issue Dec 17, 2022
…ts, r=flodiebold

fix: only shift `BoundVar`s that come from outside lowering context

Fixes rust-lang#13734

There are some free functions `TyLoweringContext` methods call, which do not know anything about current binders in scope. We need to shift in the `BoundVar`s in substitutions that we get from them (rust-lang#4952), but not those we get from `TyLoweringContext` methods.
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

No branches or pull requests

1 participant