-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 5 pull requests #40758
Rollup of 5 pull requests #40758
Conversation
The code example in the trait documentation of ExactSizeIterator has an incorrect implementation of the len method that does not return the number of times the example iterator 'Counter' will iterate. This may confuse readers of the docs as the example code will compile but doesn't uphold the trait's contract. This is easily fixed by modifying the implementation of len and changing the assert statement to actually assert the correct behaviour. I also slightly modified a code comment to better reflect what the method returns.
Given the following statement ```rust pub (a) fn afn() {} ``` Provide the following diagnostic: ```rust error: incorrect restriction in `pub` --> file.rs:15:1 | 15 | pub (a) fn afn() {} | ^^^^^^^ | = help: some valid visibility restrictions are: `pub(crate)`: visible only on the current crate `pub(super)`: visible only in the current module's parent `pub(in path::to::module)`: visible only on the specified path help: to make this visible only to module `a`, add `in` before the path: | pub (in a) fn afn() {} ``` Remove cruft from old `pub(path)` syntax.
Use the "official" cross compiler for NetBSD The current NetBSD cross compiler is lacking, for example `std::thread` is not available (which causes problems for LLVM 4.0). This PR uses the official netbsd build system to compiler the cross compiler. @alexcrichton: Can you please mirror `ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0/source/sets/{src,gnusrc,sharesrc,syssrc}.tgz`. (Optionally you may want to use NetBSD versions 7.0.2 or 7.1, in that case you'll probably want to update the binary downloads used today as well). I'll update the URL's afterwards (or feel free to use "allow edits from maintainers"). r? @alexcrichton
…nkov Add diagnostic for incorrect `pub (restriction)` Given the following statement ```rust pub (a) fn afn() {} ``` Provide the following diagnostic: ```rust error: incorrect restriction in `pub` --> file.rs:15:1 | 15 | pub (a) fn afn() {} | ^^^ | = help: some valid visibility restrictions are: `pub(crate)`: visible only on the current crate `pub(super)`: visible only in the current module's parent `pub(in path::to::module)`: visible only on the specified path help: to make this visible only to module `a`, add `in` before the path: | pub (in a) fn afn() {} ``` Follow up to rust-lang#40340, fix rust-lang#40599, cc rust-lang#32409.
…atsakis On-demandify associated item retrieval Part of rust-lang#40614. I also started converting `adt_def`, but I decided to open a PR with just this bit first to make sure I'm going about this correctly. r? @nikomatsakis
Fix doc error for ExactSizeIterator The code example in the trait documentation of ExactSizeIterator has an incorrect implementation of the len method that does not return the number of times the example iterator 'Counter' will iterate. This may confuse readers of the docs as the example code will compile but doesn't uphold the trait's contract. This is easily fixed by modifying the implementation of len and changing the assert statement to actually assert the correct behaviour. I also slightly modified a code comment to better reflect what the method returns.
…n-message, r=brson Change object safety violation message Hello! This is my first pull request to rust so hopefully all goes well. This PR should fix issue rust-lang#40670. I changed the error message in object_safety.rs and the corresponding compile-fail test in object-safety-supertrait-mentions-Self.rs. Once the changes were made, I ran ```python x.py test src/tools/tidy``` and ```python x.py test```. Tidy passed and the compile-fail tests passed, however the test suite failed on the tcp tests as my machine has IPv6 disabled. I'm not sure what to do in this case besides letting travis run the suite against my changes. Please let me know if there's anything I can do to help further. Thanks! Mandeep
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@bors r+ p=10 |
📌 Commit ea76c5e has been approved by |
⌛ Testing commit ea76c5e with merge d558037... |
☀️ Test successful - status-appveyor, status-travis |
pub (restriction)
#40627, On-demandify associated item retrieval #40668, Fix doc error for ExactSizeIterator #40715, Change object safety violation message #40753