-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use passing by-value in gmtime, mktime #6765
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
Closed
Closed
Conversation
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
This commit implements element getters for tuples with an arity of 2 to 12. The getters return references to the elements, so no copying occurs. The traits are re-exported in `core::prelude` so you can use them from regular Rust code. Here is an example of one of the getters in use: ~~~rust assert_eq!((2, "hi", 75.0).n1(), &"hi"); ~~~
* The example given in future.rs was corrected. * I have added a small section describing futures in tutorial on tasks. It is far from being complete as I am stil learning ! (This is an updated version of PR 6537).
…ple{2..12} Make n{0..11} methods return cloned values, and create n{0..12}_ref methods for returning references
r? This is all of my scheduler work on rust-lang#4419 from the last 3 weeks or so. I've had a few failed pull requests so far but I think the problems are ironed out. * TCP * The beginnings of runtime embedding APIs * Porting various corners of core to be compatible with both schedulers * libuv timer bindings * Further refinement of I/O error handling, including a new, incomplete, `read_error` condition * Incomplete refactoring to make tasks work without coroutines and user-space scheduling * Implementations of Reader/Writer extension methods * Implementations of the most important part of core::comm I'm particularly happy with how easy the [comm types on top of the scheduler](https://github.com/brson/rust/blob/io-upstream/src/libcore/rt/comm.rs). Note that these implementations do not use pipes. If anything here needs careful review though it's this code. This branch passes 95% of the run-pass tests (with `TESTARGS=--newrt`) In the next week I'll probably spend some time adding preliminary multithreading and seeing how close we are to removing the old runtime.
I don't see a reason to encode this information in all the `extern mod` statements, it's not a precise enough version to actually provide any sort of robustness.
Currently, keywords are stored in hashsets that are recreated for every Parser instance, which is quite expensive since macro expansion creates lots of them. Additionally, the parser functions that look for a keyword currently accept a string and have a runtime check to validate that they actually received a keyword. By creating an enum for the keywords and inserting them into the ident interner, we can avoid the creation of the hashsets and get static checks for the keywords. For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
Currently, keywords are stored in hashsets that are recreated for every Parser instance, which is quite expensive since macro expansion creates lots of them. Additionally, the parser functions that look for a keyword currently accept a string and have a runtime check to validate that they actually received a keyword. By creating an enum for the keywords and inserting them into the ident interner, we can avoid the creation of the hashsets and get static checks for the keywords. For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
This pull request is more of an RFC than a finished implementation. It adds some basic atomic types, with an interface modelled off of C++11's atomic types. It also adds free functions that provide a slightly nicer interface for atomic operations, though they are unsafe because there isn't a way to be generic over "word-sized" types. See also rust-lang#5042
…hack, r=brson Changes the int/uint modules to all use macros instead of using the `merge` attribute. It would be nice to have rust-lang#4375 resolved as well for this, but that can probably come at a later date. Closes rust-lang#4219.
(Yes, this did happen in real life...)
...and don't treat Path("/") like Path("").
…tamorphism r? @brson (Yes, this did happen in real life...)
…ang#6605) This indents all but the first line of multi-line annotations for individual enum variants with four spaces so that pandoc will recognize everything as belonging to the same list item. Since that introduces `<p>` tags for some list items, I've gone ahead and inserted blank lines after each list item so that consistently get `<p>` tags for all `<li>`s documenting variants. It's a bit less compact now but still tolerable, I think.
This marks `&mut` function arguments with the `noalias` attribute. Since the borrow checker enforces this property, this is worth doing. I'm not sure if the place I'm doing it in is ideal, but it generates the correct code. Closes rust-lang#6350
There was some before, but now we have a big header, as well as lots of individual bits of documentation.
…inger This indents all but the first line of multi-line annotations for individual enum variants with four spaces so that pandoc will recognize everything as belonging to the same list item. Since that introduces `<p>` tags for some list items, I've gone ahead and inserted blank lines after each list item so that consistently get `<p>` tags for all `<li>`s documenting variants. It's a bit less compact now but still tolerable, I think.
There was some before, but now we have a big header, as well as lots of individual bits of documentation.
…-metadata, r=Aatch Whatever it was, it is no longer a problem here.
mentioned in rust-lang#2625. This change makes the module more oriented around Process values instead of having to deal with process ids directly. Apart from issues mentioned in rust-lang#2625, other changes include: - Changing the naming to be more consistent - Process/process is now used instead of a mixture of Program/program and Process/process. - More docs/tests. Some io/scheduler related issues remain (mentioned in rust-lang#2625).
directory to be the parent of the current-current directory, instead of changing to the tmp directory, which was causing issues with OS X and its /tmp => /private/tmp symlink.
@brson. Also fix a few documentation bugs.
...mentioned in rust-lang#2625. This change makes the module more oriented around Process values instead of having to deal with process ids directly. Apart from issues mentioned in rust-lang#2625, other changes include: - Changing the naming to be more consistent - Process/process is now used instead of a mixture of Program/program and Process/process. - More docs/tests. Some io/scheduler related issues remain (mentioned in rust-lang#2625). I am not sure how best to address these.
When I submitted rust-lang#6748 yesterday, I used the old name.
…inger When I submitted rust-lang#6748 yesterday, I used the old name. r? @thestinger
Per the recommendation of the now-removed FIXME.
d'oh, and I was pretty sure I used the drop-down too. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 25, 2021
… r=flip1995 Change unnecessary_wraps to pedantic changelog: Change unnecessary_wraps to pedantic There seems to be enough evidence that this lint is not wanted as warn-by-default. Attempted before at rust-lang#6380. False positives at rust-lang#6721 and rust-lang#6427. Actually requested to change the category at rust-lang#6726. Closes rust-lang#6726
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.
Per FIXME, which references a bug that is long since resolved bug (there is a residual bug referenced by that bug for structs < 8 bytes, which i64 shouldn't qualify for)