-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Remove all final references to die! Issue 4524 #4933
Closed
nickdesaulniers
wants to merge
120
commits into
rust-lang:master
from
nickdesaulniers:issue4524cleanup
Closed
Remove all final references to die! Issue 4524 #4933
nickdesaulniers
wants to merge
120
commits into
rust-lang:master
from
nickdesaulniers:issue4524cleanup
Conversation
This file contains 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
The function that formats and prints the squigly line that hilights errors counted tabs as spaces, which resulted in incorrect error messages when tabs were used for indentation. This change compares the highlight line with the previous line and inserts a tab instead of a space whenever such a tab exists on the previous line. Note that error messages will still highlight incorrectly when the previous line include characters that require more than one utf8 code point, as mentioned in issue 3260.
…ter_task/unregister_task. Closes #4768
A simple fix for issue 2174.
It seems to me the library needs more work to be done, but having a non-compilable sample program seems like bad news.
Fix for issue #4830.
If an enum is isomorphic to unit, there's no need to use any bits to represent it. The only obvious reason this wasn't the case was because the enum could be C-like and have a user-specified discriminant -- but that value is constant, so it doesn't need to be stored. This change means that all newtype-like enums have the same size (and layout) as their underlying type, which might be a useful property to have, at least in terms of making programs' low-level behavior less surprising.
If an enum is isomorphic to unit, there's no need to use any bits to represent it. The only obvious reason this wasn't the case was because the enum could be C-like and have a user-specified discriminant -- but that value is constant, so it doesn't need to be stored. This change means that all newtype-like enums have the same size (and layout) as their underlying type, which might be a useful property to have, at least in terms of making programs' low-level behavior less surprising.
Without this change, rust-mode doesn't work if 'cl hasn't been required by something else, apparently. I'm not entirely sure what changed such that I started seeing this problem instead of not, but maybe the emacs world has been making progress towards not loading 'cl at runtime if it's only needed at compile time.
- thanks to work in libuv's upstream, we can call libuv's Makefile directly with parameters, instead of descending in gyp-uv madness and generating our own.
This is scaffolding for the new #[bench] attribute for marking unit tests as benchmarks. They are run with the --bench flag that the test runner now accepts. The runner automatically calibrates a test loop to an appropriate count to get a good per-iteration measurement.
…orphism r? I added code to the JSON encoder to support the serialization of enums. Before this, the JSON serializer only handled Option, and encoded None as 'null'. Following this change, all enums are encoded as arrays containing the enum name followed by the encoded fields. This appears consistent with the unstated invariant that the resulting output can be mapped back to the input *if* there's a decoder around that knows the types that were in existence when the serialization occurred. Also, added test cases.
Note that the replaced definition of equality on tokens contains a *huge* shortcut on INTERPOLATED tokens (those that contain ASTs), whereby any two INTERPOLATED tokens are considered equal. This seems like a really broken notion of equality, but it appears that the existing test cases and the compiler don't depend on it. Niko noticed this, BTW. Replace long definition of Eq on tokens and binops w
This patch finishes removing inner vector mutability from the vast majority of the compiler. Exceptions: * core::dvec: ideally this entire type will be able to be replaced by `~[]`, but Niko asked me to hold off on removing Dvecs until he makes some fixes to borrowed pointers. * liveness: liveness.rs is an impenetrable neutron star of deprecated semantics. * compile-fail: I'm not sure if a lot of these tests are testing inner mutability or mutability in general. I figure that RIMOVing this folder should wait until this syntax is removed from the parser. I also took this chance to remove many of the inner-mutability-related functions from core::vec, or as many uses of those functions as possible where still necessary. consume_mut and append_mut have been axed. cast_to_mut and cast_from_mut are still needed in a few places.
…morphism r? Apply deriving_eq to the data structures in ast.rs, and get rid of the custom definitions of eq that were everywhere. resulting ast.rs is about 400 lines shorter. Also: add a few test cases and a bunch of comments. Also: change ast_ty_to_ty_cache to use node ids rather than ast::ty's. I believe this was a suggestion related to my changes, and it appears to pass all tests. Also: tiny doc fix, remove references to crate keywords.
Sadly I could not use trait inheritance due to a type parameter substitution bug.
Sadly I could not use trait inheritance due to a type parameter substitution bug. r? @brson
Replace `impl Type: Trait` with `impl Trait for Type` throughout tutorial and manual.
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.
review? @brson
Issue #4524