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

LLVM version #173

Closed
wants to merge 1 commit into from
Closed

LLVM version #173

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 13, 2010

This just changes the version detection in the makefile to look for any of the versions in CFG_LLVM_ALLOWED_VERSIONS, currently set to "2.8svn 2.8 2.9svn"

@rillian
Copy link
Contributor

rillian commented Oct 19, 2010

See rillian/rust@b606b65 for another approach to the problem.

@ghost
Copy link
Author

ghost commented Oct 20, 2010

Rillian: maybe we could merge these 2 patches? Do you know if any other distros put it anywhere else apart from /usr/lib/ocaml/llvm?

@rillian
Copy link
Contributor

rillian commented Oct 20, 2010

Feel free to give it a go. I find both constructs messy, but I couldn't think of a better way and yours is simpler to adjust going forward.

Good point about other distros. I only checked Ubuntu 10.10, because that's the system I have with a packaged llvm 2.8. It looks like Fedora is putting it directly in /usr/lib/ocaml. That won't be relevant until Fedora 15 ships with 2.8, but it's worth amending the patch.

@rillian
Copy link
Contributor

rillian commented Oct 20, 2010

I gave it a go. Let me know what you think of rillian/rust@83cc297

I patched the Fedora path by just adding $(CFG_OCAML_LIBPATH) directly. Graydon told me it would be bad to pass that to ocamldep. Is it a problem to pass it to ocamlc?

@rillian
Copy link
Contributor

rillian commented Oct 22, 2010

This fix was applied in graydon/rust@6b9a9a7. This issue can be closed.

bors added a commit that referenced this pull request Nov 5, 2014
This is a follow-up to [RFC PR #173](rust-lang/rfcs#173). I was told there that changes like this don't need to go through the RFC process, so I'm submitting this directly.

This PR introduces `ToSocketAddr` trait as defined in said RFC. This trait defines a conversion from different types like `&str`, `(&str, u16)` or even `SocketAddr` to `SocketAddr`. Then this trait is used in all constructor methods for `TcpStream`, `TcpListener` and `UdpSocket`.

This unifies these constructor methods - previously they were using different types of input parameters (TCP ones used `(&str, u16)` pair while UDP ones used `SocketAddr`), which is not consistent by itself and sometimes inconvenient - for example, when the address initially is available as `SocketAddr`, you still need to convert it to string to pass it to e.g. `TcpStream`. This is very prominently demonstrated by the unit tests for TCP functionality. This PR makes working with network objects much like with `Path`, which also uses similar trait to be able to be constructed from `&[u8]`, `Vec<u8>` and other `Path`s.

This is a breaking change. If constant literals were used before, like this:
```rust
TcpStream::connect("localhost", 12345)
```
then the nicest fix is to change it to this:
```rust
TcpStream::connect("localhost:12345")
```

If variables were used before, like this:
```rust
TcpStream::connect(some_address, some_port)
```
then the arguments should be wrapped in another set of parentheses:
```rust
TcpStream::connect((some_address, some_port))
```

`UdpSocket` usages won't break because its constructor method accepted `SocketAddr` which implements `ToSocketAddr`, so `bind()` calls:
```rust
UdpSocket::bind(some_socket_addr)
```
will continue working as before.

I haven't changed `UdpStream` constructor because it is deprecated anyway.
oli-obk pushed a commit to oli-obk/rust that referenced this pull request Jul 19, 2017
fix thread-local-no-dtor test on MacOS and ignore it on Windows
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this pull request Dec 12, 2017
kazcw pushed a commit to kazcw/rust that referenced this pull request Oct 23, 2018
From the Intel intrinsics manual (emphasis mine):

> Compute the absolute value of packed 16-bit integers in a, and store the
> *unsigned* results in dst.
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 30, 2021
single_match: suggest `if` over `if let` when possible

fixes: rust-lang#173
changelog: single_match: suggest `if` over `if let` when possible
This pull request was closed.
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.

2 participants