Skip to content

Use cargo run in more places #16732

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

Closed
wants to merge 16 commits into from
Closed

Conversation

MatejLach
Copy link
Contributor

Use cargo run instead of cargo build where possible...

bors and others added 11 commits August 24, 2014 20:30
Current version of rust fails when casting from bool, e.g.
```rust
fn main() {
    let _a = false as uint;
    let _b = true as uint;
    let _c: [bool, ..false as uint];
    let _d: [bool, ..true as uint];
    // _a and _b work, but _c and _d result in an error
    // error: expected constant expr for vector length: can't cast str to uint
}
```
This commit makes it work as expected.
…richton

This lets the parser understand trailing commas in method calls, method definitions, enum variants, and type parameters.

Closes rust-lang#14240.
Closes rust-lang#15887.
…hton

Shows linker spew even when linking succeeds.  This is occasionally useful in order to see verbose linker output.
This commits implements {Tcp,Unix}Acceptor::{clone,close_accept} methods for
unix. A windows implementation is coming in a later commit.

The clone implementation is based on atomic reference counting (as with all
other clones), and the close_accept implementation is based on selecting on a
self-pipe which signals that a close has been seen.
This commits implements {Tcp,Unix}Acceptor::{clone,close_accept} methods for
all of librustuv.

This implementation rewrites much of Access, AccessTimeout, and AcceptTimeout to
have type parameter for shared state that all acceptors share (a shared queue of
sockets). The incoming/outgoing channels have been removed as all timeouts and
such are now managed on the event loop rather than concurrently.
This commit implements TcpAcceptor::{close, close_accept} for windows via
WSAEVENT types.
Document the new code for how close_accept and timeouts are implemented.
This commits takes a similar strategy to the previous commit to implement
close_accept and clone for the native win32 pipes implementation.

Closes rust-lang#15595
If a task is spinning in an accept loop, there is currently no method of gracefully shutting it down. This PR introduces a way to do so by cloning the acceptor and implementing a close_accept method to unblocking any pending acceptor.

As with other I/O methods like this, it is `#[experimental]` from the start and sadly carries with it a good deal of code to support it. Much of the complication is from the fact that you can now concurrently accept on the same socket.

I tried to add a good deal of tests for this change, but another set of eyes is always appreciated!
@MatejLach
Copy link
Contributor Author

r @steveklabnik ?

```{notrust,ignore}
$ ./target/guessing_game
$ cargo run
Compiling guessing_game v0.1.0 (file:/home/you/projects/guessing_game)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this accurate? I thought file:/// was the way now.

@steveklabnik
Copy link
Member

Thanks! Sorry, didn't get to this yet.

One quick question, but otherwise looks good.

@MatejLach MatejLach closed this Aug 25, 2014
@MatejLach MatejLach deleted the more_cargorun branch August 25, 2014 19:15
@steveklabnik
Copy link
Member

Whoah, why are you deleting this?

@MatejLach MatejLach reopened this Aug 25, 2014
@MatejLach MatejLach closed this Aug 25, 2014
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 this pull request may close these issues.

9 participants