-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Internal compiler error passing an iterator as a parameter. #10467
Comments
What version of the compiler were you running this with? If you updated to the most recent version of master, I think that you'll probably see a better error (not certain, just a guess from looking at the program) |
With
when running on the reduced fn cat_files<'self, T: Iterator<&'self ~str>>(_: &T) {}
fn main() {
let args = [~"foo"];
cat_files(&args.iter().skip(1));
} It's the same error message as #10391, but appears to be a possibly different cause. |
cc me. I've been negligent and not looked at #10391 yet, I'll see if I can peel off some time today to look at both of these. |
This is in fact a dup of #5121 |
In particular we don't (yet) support a function like:
because |
Add `let_with_type_underscore` lint Fixes rust-lang#10463 changelog: [`let_with_type_underscore`]: Add the lint.
While practicing my Rust skills by writing a version of GNU cat, I ran into an error that told me to report the results here. The file and the error are included in this gist:
https://gist.github.com/dradtke/7458284
The error only occurs when I try to have
cat_files
accept an Iterator. If I refactor the code so that it accepts a borrowed pointer to an owned vector of owned strings, then it works.The text was updated successfully, but these errors were encountered: