Skip to content

IterBytes for IpAddr and SocketAddr #12149

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

Merged
merged 1 commit into from
Feb 10, 2014

Conversation

thomaslee
Copy link
Contributor

This is a fairly trivial (but IMHO handy) change to implement IterBytes for IpAddr and SocketAddr.

I originally stumbled across this because I wanted to use a SocketAddr as a HashMap key and discovered that I couldn't do it directly. Had to impl IterBytes on a new intermediate type to work around it.

bors added a commit that referenced this pull request Feb 10, 2014
This is a fairly trivial (but IMHO handy) change to implement IterBytes for IpAddr and SocketAddr.

I originally stumbled across this because I wanted to use a SocketAddr as a HashMap key and discovered that I couldn't do it directly. Had to impl IterBytes on a new intermediate type to work around it.
@bors bors closed this Feb 10, 2014
@bors bors merged commit e205185 into rust-lang:master Feb 10, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
…ral, r=jonas-schievink

fix: split float literal tokens at `.` to fix parsing of tuple field accesses

This introduces an `ast::FloatLiteral` node, changes the `FLOAT_LITERAL` token to `FLOAT_LITERAL_PART`, and splits any float literal at the `.` character, into a `FLOAT_LITERAL_PART`, and optional `DOT` and trailing `FLOAT_LITERAL_PART` token. The tokens are reassembled when passing them to a macro as a `tt::Literal`.

~~A slight regression is introduced in how float literals are highlighted: the `.` is now highlighted as an operator. I've tried to fix this but couldn't figure out how to highlight the whole `ast::FloatLiteral` node as a unit.~~ This is fixed

Fixes rust-lang/rust-analyzer#1109
Fixes rust-lang/rust-analyzer#10492
Fixes rust-lang/rust-analyzer#12107
Fixes rust-lang/rust-analyzer#10560
Fixes rust-lang/rust-analyzer#11487
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
…t-a-literal, r=jonas-schievink"

This reverts commit cc9ae2b, reversing
changes made to 7dfd1cb.
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 25, 2024
…r=llogiq

Correctly suggest std or core path depending if this is a `no_std` crate

A few lints emit suggestions using `std` paths whether or not this is a `no_std` crate, which is an issue when running `rustfix` afterwards. So in case this is an item that is defined in both `std` and `core`, we need to check if the crate is `no_std` to emit the right path.

r? `@llogiq`

changelog: Correctly suggest std or core path depending if this is a `no_std` crate
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.

3 participants