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

Add a Clonable/Clone trait. Implement it for all the clonables #3313

Closed
brson opened this issue Aug 31, 2012 · 3 comments
Closed

Add a Clonable/Clone trait. Implement it for all the clonables #3313

brson opened this issue Aug 31, 2012 · 3 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone

Comments

@brson
Copy link
Contributor

brson commented Aug 31, 2012

ARC is beginning to infect more and more types, and they each must have a clone method, but there is no trait to implement.

@bblum
Copy link
Contributor

bblum commented Aug 31, 2012

related #2830

@eholk
Copy link
Contributor

eholk commented Sep 11, 2012

Along with this, we should provide a default implementation of Clonable for all copyable types.

@thestinger
Copy link
Contributor

Closing this now that #[deriving_clone] has been implemented. There are no doubt some types left that should have a Clone implementation, but they can be dealt with on a case-by-case basis.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 21, 2018
Changes:
````
new_ret_no_self: add sample from rust-lang#3313 to Known Problems section.
Support multiline comments and hopefully fix panic
Check for comments in collapsible ifs
Resolve ICE in needless range loop lint
RIIR update_lints: Update changelog links
Rename if_let_redundant_pattern_matching to redundant_pattern_matching
Add lint for redundant pattern matching for explicit return boolean
Fix issue rust-lang#3322: reword help message for len_zero
Simplify manual_memcpy suggestion in some cases
Fix dogfood
Update known problems for unnecessary_fold
RIIR update_lints: Replace lint count in README.md
Rename `active_lints` to `usable_lints`
Add comment on WalkDir vs. fs::read_dir
sort_by -> sort_by_key
Some more documentation for clippy_dev
Use `WalkDir` to also gather from subdirectories
Avoid linting `boxed_local` on trait implementations.
Website: Make lint categories linkable
Restore clippy_dummy's placeholder name
Swap order of methods in `needless_range_loop` suggestion in some cases
Revert "Exclude pattern guards from unnecessary_fold lint"
Exclude pattern guards from unnecessary_fold lint
````
pietroalbini added a commit to pietroalbini/rust that referenced this issue Oct 23, 2018
submodules: update clippy from 5afdf8b to b1d0343

Just a routine update.

Changes:
````
new_ret_no_self: add sample from rust-lang#3313 to Known Problems section.
Support multiline comments and hopefully fix panic
Check for comments in collapsible ifs
Resolve ICE in needless range loop lint
RIIR update_lints: Update changelog links
Rename if_let_redundant_pattern_matching to redundant_pattern_matching
Add lint for redundant pattern matching for explicit return boolean
Fix issue rust-lang#3322: reword help message for len_zero
Simplify manual_memcpy suggestion in some cases
Fix dogfood
Update known problems for unnecessary_fold
RIIR update_lints: Replace lint count in README.md
Rename `active_lints` to `usable_lints`
Add comment on WalkDir vs. fs::read_dir
sort_by -> sort_by_key
Some more documentation for clippy_dev
Use `WalkDir` to also gather from subdirectories
Avoid linting `boxed_local` on trait implementations.
Website: Make lint categories linkable
Restore clippy_dummy's placeholder name
Swap order of methods in `needless_range_loop` suggestion in some cases
Revert "Exclude pattern guards from unnecessary_fold lint"
Exclude pattern guards from unnecessary_fold lint
````
kennytm added a commit to kennytm/rust that referenced this issue Oct 24, 2018
submodules: update clippy from 5afdf8b to b1d0343

Just a routine update.

Changes:
````
new_ret_no_self: add sample from rust-lang#3313 to Known Problems section.
Support multiline comments and hopefully fix panic
Check for comments in collapsible ifs
Resolve ICE in needless range loop lint
RIIR update_lints: Update changelog links
Rename if_let_redundant_pattern_matching to redundant_pattern_matching
Add lint for redundant pattern matching for explicit return boolean
Fix issue rust-lang#3322: reword help message for len_zero
Simplify manual_memcpy suggestion in some cases
Fix dogfood
Update known problems for unnecessary_fold
RIIR update_lints: Replace lint count in README.md
Rename `active_lints` to `usable_lints`
Add comment on WalkDir vs. fs::read_dir
sort_by -> sort_by_key
Some more documentation for clippy_dev
Use `WalkDir` to also gather from subdirectories
Avoid linting `boxed_local` on trait implementations.
Website: Make lint categories linkable
Restore clippy_dummy's placeholder name
Swap order of methods in `needless_range_loop` suggestion in some cases
Revert "Exclude pattern guards from unnecessary_fold lint"
Exclude pattern guards from unnecessary_fold lint
````
pietroalbini added a commit to pietroalbini/rust that referenced this issue Oct 25, 2018
submodules: update clippy from 5afdf8b to b1d0343

Just a routine update.

Changes:
````
new_ret_no_self: add sample from rust-lang#3313 to Known Problems section.
Support multiline comments and hopefully fix panic
Check for comments in collapsible ifs
Resolve ICE in needless range loop lint
RIIR update_lints: Update changelog links
Rename if_let_redundant_pattern_matching to redundant_pattern_matching
Add lint for redundant pattern matching for explicit return boolean
Fix issue rust-lang#3322: reword help message for len_zero
Simplify manual_memcpy suggestion in some cases
Fix dogfood
Update known problems for unnecessary_fold
RIIR update_lints: Replace lint count in README.md
Rename `active_lints` to `usable_lints`
Add comment on WalkDir vs. fs::read_dir
sort_by -> sort_by_key
Some more documentation for clippy_dev
Use `WalkDir` to also gather from subdirectories
Avoid linting `boxed_local` on trait implementations.
Website: Make lint categories linkable
Restore clippy_dummy's placeholder name
Swap order of methods in `needless_range_loop` suggestion in some cases
Revert "Exclude pattern guards from unnecessary_fold lint"
Exclude pattern guards from unnecessary_fold lint
````
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 29, 2018
Should make clippy tests green again on rust-toolstate

Changes:
````
compiletest: clean rmeta data (from "cargo check") before running compiletest.
dependencies: bump compiletest-rs from git to 0.3.16
UI test cleanup: Extract explicit_counter_loop tests
UI test cleanup: Extract unnecessary_operation tests
appveyor: use rustc nightly instead of master
pin compiletest dependency to git version (12c980f47971b5ba6beb7cb2ffebf8b32f6766ea) while we are waiting for a new release
rustup: fix build with rustc 1.31.0-nightly (cae6efc 2018-10-27)
Disable rust master toolchain build temporarily
Don't expand macro in or_fun_call suggestion
Don't expand macro in single_match suggestion
Don't expand macro in identity_conversion suggestion
slightly simplify integration tests
simplify ci base-tests
fix: correctly reconstruct raw strings
fix: extra semicolon, only create callsite once
Fix string_lit_as_bytes lint for macros
travis: work around temporary test failure due to rustc crashing on hyper.
ci: allow all branches except trying.tmp and staging.tmp to be built
Move in_macro check
Use BasicBlockData::terminator
Refactor
Use lint_root
Implement visit_basic_block_data
update_references indexing_slicing
Run update_lints
Add redundant_clone lint
Revert "new_ret_no_self: add sample from rust-lang#3313 to Known Problems section."
Add tests for more than one level of reference
Add test case for `mem::discriminant` inside a macro
Add `Applicability`
Add lint for calling `mem::discriminant` on a non-enum type
Check existential types in `use_self`
Disable arithmetic lints in constant items
Fix warnings introduced by rust-lang#3349
new_ret_no_self added test cases
Replace remaining `krate.span` with `DUMMY_SP`
Use DUMMY_SP in multiple_crate_versions
Some fixes for wildcard_dependencies
Run util/update_lints.py
Minor changes on clippy_lints/src/wildcard_dependencies.rs
Lint for wildcard dependencies in Cargo.toml
Don't emit `new_without_default_derive` if an impl of Default exists
Fix inspector pass documentation
Add branch configuration to appveyor.yml
Setup bors
new_ret_no_self added test cases
new_ret_no_self walk return type to check for self
Update `ui/for_loop` test output
Check for known array length in `needless_range_loop`
new_ret_no_self correct false positive on raw pointer return types
new_ret_no_self correct linting of tuple return types
out_of_bounds_indexing improved reporting of out of bounds value
out_of_bounds_indexing refactoring
OUT_OF_BOUNDS_INDEXING fix rust-lang#3102 false negative
````
oli-obk pushed a commit to oli-obk/rust that referenced this issue May 2, 2020
The lint was changed to be more lenient than the documentation implies in PR rust-lang#3338.
Related issue rust-lang#3313
oli-obk pushed a commit to oli-obk/rust that referenced this issue May 2, 2020
…, r=phansch

Update documentation for new_ret_no_self

changelog: Update documentation for lint new_ret_no_self to reflect that the return type must only contain `Self`, not be `Self`

The lint was changed to be more lenient than the documentation implies in PR rust-lang#3338 (Related issue rust-lang#3313)
bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
RalfJung pushed a commit to RalfJung/rust that referenced this issue Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

4 participants