Skip to content

remove builtin Copy and Clone impl for float and int infer #114739

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
Aug 13, 2023

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Aug 11, 2023

it's only change is whether {integer}: Copy is ambiguous, this has the following properties

  • these goals get proven earlier, potentially resulting in slightly better perf
  • it causes inconsistent behavior and ICE if there do not exist impls for all integers, causing issues when using #[no_core]
  • it means Clone has user-facing differences from other traits from core with the new solver because it can potentially guide inference there
  • it's just very sus™ to have a builtin impl which applies during type inference but not afterwards

@rustbot
Copy link
Collaborator

rustbot commented Aug 11, 2023

r? @b-naber

(rustbot has picked a reviewer for you, use r? to override)

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 11, 2023
@rustbot
Copy link
Collaborator

rustbot commented Aug 11, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@lcnr
Copy link
Contributor Author

lcnr commented Aug 11, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 11, 2023
@bors
Copy link
Collaborator

bors commented Aug 11, 2023

⌛ Trying commit bb76fde with merge 4f9805ec4702c97302dd8116b6f848c194756acc...

@lcnr lcnr changed the title remove builtin impl for float and int infer remove builtinCopy and Clone impl for float and int infer Aug 11, 2023
@lcnr lcnr changed the title remove builtinCopy and Clone impl for float and int infer remove builtin Copy and Clone impl for float and int infer Aug 11, 2023
@compiler-errors
Copy link
Member

r=me if perf comes back good, this doesn't seem to me like something that should cause issues other than possibly changing the order that we process obligations, which isn't guaranteed anyways.

@bors
Copy link
Collaborator

bors commented Aug 11, 2023

☀️ Try build successful - checks-actions
Build commit: 4f9805ec4702c97302dd8116b6f848c194756acc (4f9805ec4702c97302dd8116b6f848c194756acc)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4f9805ec4702c97302dd8116b6f848c194756acc): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -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

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

Binary size

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

Bootstrap: 632.877s -> 633.23s (0.06%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 11, 2023
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 11, 2023

📌 Commit bb76fde 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
@bors
Copy link
Collaborator

bors commented Aug 13, 2023

⌛ Testing commit bb76fde with merge 49af618...

@bors
Copy link
Collaborator

bors commented Aug 13, 2023

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

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

Finished benchmarking commit (49af618): 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)
6.8% [6.8%, 6.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 632.358s -> 633.298s (0.15%)

@lcnr lcnr deleted the int-infer-impls branch August 14, 2023 07:34
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants