Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a test to verify that TrustedPromise does not implement Clone #14500
Comments
|
Please make a comment here if you intend to work on this issue. Thank you! |
|
I'm a little green with Rust, but this seems a good place to start. I can take it on. |
|
Great! Please ask questions if anything is unclear, and be sure to verify that the test works by deriving a Clone implementation for |
|
@jdm I did it, but I would like some advice on the naming of the file before I submit any pull request etc. At the moment, it's the very verbose trustedpromise_mustnot_derive_clone.rs and though it conveys exactly what the test is for...it's very verbose, and if I'm honest doesn't seem to quite fit the naming convention the project has gone for. Help from more experienced hands would be much appreciated here. Thanks. |
|
Perhaps |
|
That sounds fine. I'll clean up then and go through the pull request checklist. |
Added compiletest to verify TrustedPromise does not implement Clone As per issue: #14500 I have added a test to ensure that TrustedPromise does not implement Clone. This is my first PR to the project, so feedback in terms of both code and the actual PR would be very welcome. Thanks, Verlet64 --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14500 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15146) <!-- Reviewable:end -->
… not implement Clone (from Verlet64:verlet64/no_clone_trusted_promise); r=jdm As per issue: servo/servo#14500 I have added a test to ensure that TrustedPromise does not implement Clone. This is my first PR to the project, so feedback in terms of both code and the actual PR would be very welcome. Thanks, Verlet64 --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14500 - [x] There are tests for these changes Source-Repo: https://github.com/servo/servo Source-Revision: 27a7999d5d85c9b1156554f597cb0eea592624e1
… not implement Clone (from Verlet64:verlet64/no_clone_trusted_promise); r=jdm As per issue: servo/servo#14500 I have added a test to ensure that TrustedPromise does not implement Clone. This is my first PR to the project, so feedback in terms of both code and the actual PR would be very welcome. Thanks, Verlet64 --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14500 - [x] There are tests for these changes Source-Repo: https://github.com/servo/servo Source-Revision: 27a7999d5d85c9b1156554f597cb0eea592624e1 UltraBlame original commit: fad6c9d357894eee05cd6cd11c904590ddc86e9f
… not implement Clone (from Verlet64:verlet64/no_clone_trusted_promise); r=jdm As per issue: servo/servo#14500 I have added a test to ensure that TrustedPromise does not implement Clone. This is my first PR to the project, so feedback in terms of both code and the actual PR would be very welcome. Thanks, Verlet64 --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14500 - [x] There are tests for these changes Source-Repo: https://github.com/servo/servo Source-Revision: 27a7999d5d85c9b1156554f597cb0eea592624e1 UltraBlame original commit: fad6c9d357894eee05cd6cd11c904590ddc86e9f
… not implement Clone (from Verlet64:verlet64/no_clone_trusted_promise); r=jdm As per issue: servo/servo#14500 I have added a test to ensure that TrustedPromise does not implement Clone. This is my first PR to the project, so feedback in terms of both code and the actual PR would be very welcome. Thanks, Verlet64 --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14500 - [x] There are tests for these changes Source-Repo: https://github.com/servo/servo Source-Revision: 27a7999d5d85c9b1156554f597cb0eea592624e1 UltraBlame original commit: fad6c9d357894eee05cd6cd11c904590ddc86e9f
It is not a safe operation to clone a TrustedPromise, but it's really easy to derive Clone on the type and make it possible. We should add a test in https://dxr.mozilla.org/servo/source/tests/compiletest/plugin/compile-fail like: