Skip to content

Regression in From<([u8; 16], u16)> for SocketAddr #46270

Closed
@dtolnay

Description

@dtolnay

This used to work but the result is nondeterministic as of rustc 1.23.0-nightly (e97ba83 2017-11-25).

fn main() {
    println!("{:?}", std::net::SocketAddr::from(([1; 16], 0)));
}
  • On my computer in debug mode: V6([1400::f813:103e:ff7f:0]:0)
  • On my computer in release mode: V6([1600::1600:0:0:0]:0)
  • Expected correct answer: V6([101:101:101:101:101:101:101:101]:0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions