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

Fix typo in suggest.rs where f32 was used instead of f64 #114732

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

gurry
Copy link
Contributor

@gurry gurry commented Aug 11, 2023

Fixes #114683

@rustbot
Copy link
Collaborator

rustbot commented Aug 11, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @b-naber (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 11, 2023
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=gurry
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_f5c6d0f7-d7a6-453f-9c45-31470dd9fde6
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=c24f28a19e712194f0b3bb9bb2800307f07eaf9a
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_f5c6d0f7-d7a6-453f-9c45-31470dd9fde6
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_f5c6d0f7-d7a6-453f-9c45-31470dd9fde6
GITHUB_TRIGGERING_ACTOR=gurry
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/114732/merge
GITHUB_WORKFLOW_SHA=c24f28a19e712194f0b3bb9bb2800307f07eaf9a
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_18_X64=/opt/hostedtoolcache/go/1.18.10/x64
---
#7 16.08 done.
#7 DONE 16.9s

#8 [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
#8 354.9 xz: (stdin): Unexpected end of input
#8 354.9 tar: Unexpected EOF in archive
#8 354.9 tar: Unexpected EOF in archive
#8 354.9 tar: Error is not recoverable: exiting now
#8 ERROR: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
 > [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ:
 > [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ:
354.9 xz: (stdin): Unexpected end of input
354.9 tar: Unexpected EOF in archive
354.9 tar: Unexpected EOF in archive
------
Dockerfile:24
--------------------
  22 |       && rm -rf /var/lib/apt/lists/*
  22 |       && rm -rf /var/lib/apt/lists/*
  23 |     
  24 | >>> RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
  25 |     ENV PATH="/node-v16.9.0-linux-x64/bin:${PATH}"
  26 |     ENV RUST_CONFIGURE_ARGS="--set rust.validate-mir-opts=3"
--------------------
ERROR: failed to solve: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
#0 building with "default" instance using docker driver

#1 [internal] load .dockerignore
#1 transferring context: 2B done
---
#8 [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
#8 0.442 xz: (stdin): File format not recognized
#8 0.442 tar: Child returned status 1
#8 0.442 tar: Error is not recoverable: exiting now
#8 ERROR: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
 > [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ:
0.442 xz: (stdin): File format not recognized
0.442 tar: Child returned status 1
0.442 tar: Error is not recoverable: exiting now
---
  24 | >>> RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
  25 |     ENV PATH="/node-v16.9.0-linux-x64/bin:${PATH}"
  26 |     ENV RUST_CONFIGURE_ARGS="--set rust.validate-mir-opts=3"
--------------------
ERROR: failed to solve: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
#0 building with "default" instance using docker driver

#1 [internal] load .dockerignore
#1 transferring context: 2B done
---
#7 [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
#7 0.377 xz: (stdin): File format not recognized
#7 0.377 tar: Child returned status 1
#7 0.377 tar: Error is not recoverable: exiting now
#7 ERROR: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
 > [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ:
0.377 xz: (stdin): File format not recognized
0.377 tar: Child returned status 1
0.377 tar: Error is not recoverable: exiting now
---
  24 | >>> RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
  25 |     ENV PATH="/node-v16.9.0-linux-x64/bin:${PATH}"
  26 |     ENV RUST_CONFIGURE_ARGS="--set rust.validate-mir-opts=3"
--------------------
ERROR: failed to solve: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
#0 building with "default" instance using docker driver

#1 [internal] load .dockerignore
#1 transferring context: 2B done
---
#7 [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
#7 0.395 xz: (stdin): File format not recognized
#7 0.395 tar: Child returned status 1
#7 0.395 tar: Error is not recoverable: exiting now
#7 ERROR: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
 > [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ:
0.395 xz: (stdin): File format not recognized
0.395 tar: Child returned status 1
0.395 tar: Error is not recoverable: exiting now
---
  24 | >>> RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
  25 |     ENV PATH="/node-v16.9.0-linux-x64/bin:${PATH}"
  26 |     ENV RUST_CONFIGURE_ARGS="--set rust.validate-mir-opts=3"
--------------------
ERROR: failed to solve: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 2.64kB done
---
#7 [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
#7 1.052 xz: (stdin): File format not recognized
#7 1.052 tar: Child returned status 1
#7 1.052 tar: Error is not recoverable: exiting now
#7 ERROR: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
 > [ 3/10] RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ:
1.052 xz: (stdin): File format not recognized
1.052 tar: Child returned status 1
1.052 tar: Error is not recoverable: exiting now
---
  24 | >>> RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
  25 |     ENV PATH="/node-v16.9.0-linux-x64/bin:${PATH}"
  26 |     ENV RUST_CONFIGURE_ARGS="--set rust.validate-mir-opts=3"
--------------------
ERROR: failed to solve: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2
##[error]Process completed with exit code 1.
Post job cleanup.

@gurry
Copy link
Contributor Author

gurry commented Aug 11, 2023

@compiler-errors I could not come up with a test that would reproduce the impact of this typo unfortunately. It will have an impact only if found_assoc(tcx.types.f32) returns something different from found_assoc(tcx.types.f64). As per my understanding both of them will always return the same value since f32 and f64 have the exact same inherent methods and implement the same traits.

I did try by implementing a custom trait of my own for f64 which isn't implemented for f32, but in that case the compiler was able to unambiguously resolve the method and hence no compiler error occurred :(.

Please suggest a test I can add.

@gurry
Copy link
Contributor Author

gurry commented Aug 11, 2023

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

Someone please help me resolve this. The error looks related to the build system itself:

ERROR: process "/bin/sh -c curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ" did not complete successfully: exit code: 2

Perhaps retrying the job is enough?

@klensy
Copy link
Contributor

klensy commented Aug 11, 2023

Just force push your branch to retry.

@compiler-errors
Copy link
Member

Yeah, I guess this doesn't need a test. @gurry has a good point above about unambiguously resolving because there are only two float kinds.

@compiler-errors
Copy link
Member

@bors r+ rollup

(whatever, this pr doesnt need ci)

@bors
Copy link
Contributor

bors commented Aug 11, 2023

📌 Commit e903752 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 11, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 11, 2023
Fix typo in suggest.rs where f32 was used instead of f64

Fixes rust-lang#114683
@gurry gurry closed this Aug 12, 2023
@gurry gurry deleted the issue-114683 branch August 12, 2023 03:11
@klensy
Copy link
Contributor

klensy commented Aug 12, 2023

This isn't merged, btw

@gurry
Copy link
Contributor Author

gurry commented Aug 12, 2023

Why didn't it get merged @klensy? It says above that I "closed this X hours ago", but I didn't do anything.

@gurry
Copy link
Contributor Author

gurry commented Aug 12, 2023

Ah, I did delete the branch in my repo. That was stupid. Let me try to reopen if I can.

@gurry gurry restored the issue-114683 branch August 12, 2023 10:25
@gurry gurry reopened this Aug 12, 2023
@gurry
Copy link
Contributor Author

gurry commented Aug 12, 2023

r? @compiler-errors

@rustbot
Copy link
Collaborator

rustbot commented Aug 12, 2023

Could not assign reviewer from: compiler-errors.
User(s) compiler-errors are either the PR author, already assigned, or on vacation, and there are no other candidates.
Use r? to specify someone else to assign.

@gurry
Copy link
Contributor Author

gurry commented Aug 12, 2023

@rustbot review

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 12, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 12, 2023
Fix typo in suggest.rs where f32 was used instead of f64

Fixes rust-lang#114683
@bors
Copy link
Contributor

bors commented Aug 13, 2023

⌛ Testing commit e903752 with merge bd54536...

@bors
Copy link
Contributor

bors commented Aug 13, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing bd54536 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 13, 2023
@bors bors merged commit bd54536 into rust-lang:master Aug 13, 2023
19 of 22 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 13, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bd54536): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-3.2%, -2.0%] 3
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 633.837s -> 632.779s (-0.17%)

@gurry gurry deleted the issue-114683 branch August 17, 2023 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential typo in suggestion of E0689
8 participants