Skip to content

fix MIPS target #14455

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 1 commit into from
Closed

fix MIPS target #14455

wants to merge 1 commit into from

Conversation

crabtw
Copy link
Contributor

@crabtw crabtw commented May 27, 2014

Because IPv4 address conversion doesn't consider big-endian target, I add functions to handle that.
These function names may need to be changed, but I can't come up with a good one.

@@ -270,7 +270,7 @@ fn initialize_call_frame(regs: &mut Registers, fptr: InitFn, arg: uint,
type Registers = [uint, ..32];

#[cfg(target_arch = "mips")]
fn new_regs() -> Box<Registers> { box [0, .. 32] }
fn new_regs() -> Box<Registers> { box {[0, .. 32]} }
Copy link
Member

Choose a reason for hiding this comment

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

Why is this change needed?

Copy link
Member

Choose a reason for hiding this comment

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

(Oh, doesn't matter: I see it's a hold-over from the old days where ~[0, .. 32] would construct a ~[int], not a ~([int, .. 32]).)

@crabtw
Copy link
Contributor Author

crabtw commented May 28, 2014

I removed additional functions and used {from,to}_be32 instead.

@omasanori
Copy link
Contributor

Excuse me. If endianness is the problem, why don't you branch code by target_endian? Are there any reason why only MIPS is affected by this bug?

@crabtw
Copy link
Contributor Author

crabtw commented May 28, 2014

The original PR had functions that were branched by target_endian, but they seemed redundant with {from, to}_be32. Therefore, I removed them later. Only MIPS has the problem because it's the only big-endian target.

Hope these answer your question.

@omasanori
Copy link
Contributor

OK, I understand. Thank you!

bors added a commit that referenced this pull request May 28, 2014
Because IPv4 address conversion doesn't consider big-endian target, I add functions to handle that.
These function names may need to be changed, but I can't come up with a good one.
@bors bors closed this May 28, 2014
@crabtw crabtw deleted the mips branch September 2, 2014 01:52
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…osure, r=Veykril

Convert nested function to closure assist

Continuation of / closes rust-lang#13467.
Resolves rust-lang#13230.

r? `@Veykril`
flip1995 added a commit to flip1995/rust that referenced this pull request Apr 3, 2025
This PR enables the new ability to collapse `if` statements containing
comments (without losing them) in Clippy sources, excluding tests and
lintcheck, where the default behaviour (no collapsing in presence of
comments) is preserved.

To be applied after rust-lang#14231. When it is applied, rust-lang#14455 will be marked as
ready for review, then rust-lang#14228 afterwards.

changelog: none

r? ghost
flip1995 added a commit to flip1995/rust that referenced this pull request Apr 3, 2025
…4481)

Until `if let` chains are stabilized, we do not collapse them together
or with other `if` expressions unless the `let_chains` feature is
enabled. This is the case for example in Clippy sources.

This was made possible by converting the `collapsible_if` to a late lint
to get access to the set of enabled features. This allows this PR to
supersede rust-lang#14455 and no longer require an additional configuration
option.

The three commits are, in order:
- a conversion of the existing early lint to a late lint, with no new
feature or tests changes
- the addition of the `let_chains` feature detection and action, and
tests
- the application of the enhanced lint to Clippy sources (136 files
modified)

changelog: [`collapsible_if`]: recognize the rust compiler `let_chains`
feature

r? @flip1995
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.

5 participants