Removed dup and drop as functions from the corelib.#9342
Merged
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
fb98e09 to
fe467e0
Compare
5e988e6 to
368f80e
Compare
TomerStarkware
approved these changes
Dec 28, 2025
Collaborator
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @eytan-starkware).
368f80e to
dc7c5a3
Compare
fe467e0 to
f7b306f
Compare
Princetimix69
pushed a commit
to Princetimix69/cairo
that referenced
this pull request
Jan 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Removed
dupanddropexternal functions from the core library and moved them to specific test modules where they are needed. Updated the function signatures to include trait constraints (+Copy<T>fordupand+Drop<T>fordrop).Type of change
Please check one:
Why is this change needed?
The
dupanddropfunctions were previously defined in the core library without proper trait constraints. This PR moves them to the specific test modules where they are actually used and adds the appropriate trait constraints (+Copy<T>fordupand+Drop<T>fordrop), ensuring proper type safety and removing unnecessary dependencies from the core library.What was the behavior or documentation before?
The
dupanddropfunctions were defined in the core library without trait constraints, and were imported in the prelude. This created unnecessary dependencies and lacked proper type safety.What is the behavior or documentation after?
The functions are now defined locally in the test modules where they are needed, with proper trait constraints. The core library and prelude no longer include these functions, making the code more modular and type-safe.
Additional context
This change helps to enforce proper trait constraints for operations that should only be allowed on types that implement specific traits (Copy for duplication and Drop for dropping).