Skip to content

Fixes for rustc master #479

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

Merged
merged 3 commits into from
Aug 29, 2014
Merged

Conversation

bkoropoff
Copy link
Contributor

It is worth noting that cargo was actually creating trait boxes
that contain non-static references, so I couldn't just put 'static
everywhere to appease rustc.
@alexcrichton
Copy link
Member

In shell.rs, could you use 'static in the relevant locations instead of an arbitrary 'a? That would allow us to land this more quickly (once rust-url/rust-encoding have been merged).

@bkoropoff
Copy link
Contributor Author

@alexcrichton test_shell.rs actually calls Shell::create() with a BufWriter, which is what necessitated this. Changing the bound to 'static would work if the unit test were commented out.

@alexcrichton
Copy link
Member

Hm, could that change to a MemWriter and/or a ChanReader or ChanWriter? I'd like to merge this today if possible instead of waiting for the next nightly.

This brings in versions of upstream components with build break fixes
@bkoropoff
Copy link
Contributor Author

Calling unwrap() on a Shell simply fails, so I can't get the MemWriter back out. I can call get_ref(), but that gives me a ref to a trait box, and there is no method on Writer I can use to peek at the data in the MemWriter. I haven't had coffee yet, though, so maybe I'm missing something.

@bkoropoff
Copy link
Contributor Author

I almost got ChanWriter to work, but I'm getting a hang in one of the tests unless I adjust the vector to have a precise size, which seems like it should be unnecessary, and would probably break Windows if I did it. I won't have time to look at this again until later tonight, so I left in a branch if someone else wants to pick it up:

https://github.com/bkoropoff/cargo/tree/whatsit

bors added a commit that referenced this pull request Aug 29, 2014
…richton

Extending #479 to use a `'static` shell instead of a `'a` shell.
@bors bors merged commit 9550f7f into rust-lang:master Aug 29, 2014
@bkoropoff bkoropoff deleted the fix-for-rustc-master branch August 30, 2014 01:43
bors added a commit to alexcrichton/cargo that referenced this pull request Sep 2, 2014
…, r=alexcrichton

Extending rust-lang#479 to use a `'static` shell instead of a `'a` shell.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants