about summary refs log tree commit diff
path: root/src/etc
AgeCommit message (Collapse)AuthorLines
2013-11-07auto merge of #10243 : mattcarberry/rust/master, r=brsonbors-0/+10
Associated with Issue #6563. Useful for Apollo Guidance Computer simulation, Unix file system permissions, and maybe one or two other things.
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-0/+1
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-02Grammar error and vim syntax highlighting mistake fixed.Matt Carberry-1/+1
2013-11-02Added octal literal support.Matt Carberry-1/+11
2013-10-31std::rand: correct an off-by-one in the Ziggurat code.Huon Wilson-5/+2
The code was using (in the notation of Doornik 2005) `f(x_{i+1}) - f(x_{i+2})` rather than `f(x_i) - f(x_{i+1})`. This corrects that, and removes the F_DIFF tables which caused this problem in the first place. They `F_DIFF` tables are a micro-optimisation (in theory, they could easily be a micro-pessimisation): that `if` gets hit about 1% of the time for Exp/Normal, and the rest of the condition involves RNG calls and a floating point `exp`, so it is unlikely that saving a single FP subtraction will be very useful (especially as more tables means more memory reads and higher cache pressure, as well as taking up space in the binary (although only ~2k in this case)). Closes #10084. Notably, unlike that issue suggests, this wasn't a problem with the Exp tables. It affected Normal too, but since it is symmetric, there was no bias in the mean (as the bias was equal on the positive and negative sides and so cancelled out) but it was visible as a variance slightly lower than it should be.
2013-10-29auto merge of #10149 : chris-morgan/rust/2013-10-29-vim-updates, r=ericktbors-24/+37
- Syntax updates for the regular prelude changes. - Fix an issue with the indentation of the second line of wrapped function arguments.
2013-10-29Move rust's uv implementation to its own crateAlex Crichton-0/+4
There are a few reasons that this is a desirable move to take: 1. Proof of concept that a third party event loop is possible 2. Clear separation of responsibility between rt::io and the uv-backend 3. Enforce in the future that the event loop is "pluggable" and replacable Here's a quick summary of the points of this pull request which make this possible: * Two new lang items were introduced: event_loop, and event_loop_factory. The idea of a "factory" is to define a function which can be called with no arguments and will return the new event loop as a trait object. This factory is emitted to the crate map when building an executable. The factory doesn't have to exist, and when it doesn't then an empty slot is in the crate map and a basic event loop with no I/O support is provided to the runtime. * When building an executable, then the rustuv crate will be linked by default (providing a default implementation of the event loop) via a similar method to injecting a dependency on libstd. This is currently the only location where the rustuv crate is ever linked. * There is a new #[no_uv] attribute (implied by #[no_std]) which denies implicitly linking to rustuv by default Closes #5019
2013-10-30Fix Vim indent for wrapped function arguments.Chris Morgan-2/+17
2013-10-30Update prelude items in Vim syntax file.Chris Morgan-22/+20
2013-10-25TidyBrian Anderson-0/+2
2013-10-24Remove even more of std::ioAlex Crichton-4/+4
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-23register snapshotsDaniel Micay-3/+3
2013-10-19Highlight \0 in strings and chars in Vim.Chris Morgan-3/+3
2013-10-19Update prelude items in Vim syntax.Chris Morgan-6/+8
2013-10-18track language changes, improve attr handling in GtkSourceView language-specsp3d-22/+46
Refactors parsing of numerical literals to make it more readable. Removes 'float'/the 'f' literal suffix and invalid character literals ''' and '\'. Also makes attribute highlighting more robust and allows urls in attributes to be recognized.
2013-10-08add vim syntax highlighting support for raw string literalsBenjamin Herr-0/+1
2013-10-06Add appropriate #[feature] directives to testsAlex Crichton-0/+3
2013-10-04Don't fail when unpacking the windows snapshotAlex Crichton-0/+2
Newly having a third-party directory was throwing off the unpack script
2013-10-04auto merge of #9662 : vadimcn/rust/package-runtime-deps, r=brsonbors-3/+1287
This will make sure that system files that rust binaries depend on in Windows get packaged into stage0 snapshots as well as into Windows installer. Currently these include `libgcc_s_dw2-1.dll`, `libstdc++-6.dll` and `libpthread-2.dll`. Note that the latter will need to be changed to `pthreadGC2.dll` once Windows build bots get upgraded to mingw 4.0 Closes #9252 Closes #5878 Closes #9218 Closes #5712
2013-10-02Package system runtime dependencies into Windows distribution.Vadim Chugunov-1/+17
2013-10-02Package system runtime dependencies into snapshotsVadim Chugunov-2/+1270
2013-10-01auto merge of #9600 : MicahChalmer/rust/fill-with-code-around, r=catamorphismbors-1/+31
This fixes a problem with paragraph fills: hitting M-q on a single-line-style (`//`) comment with code immediately before or after it would try to fill the code as part of the paragraph too.
2013-09-30Expand tidy to prevent binaries from being checkedAlex Crichton-0/+18
Closes #9621
2013-09-28Fix single-line-style paragraph fills with code immediately before or afterMicah Chalmer-1/+31
2013-09-27auto merge of #9552 : brson/rust/0.9-pre, r=alexcrichtonbors-1/+1
2013-09-27auto merge of #9538 : thestinger/rust/type_use, r=pcwaltonbors-80/+0
This is broken, and results in poor performance due to the undefined behaviour in the LLVM IR. LLVM's `mergefunc` is a *much* better way of doing this since it merges based on the equality of the bytecode. For example, consider `std::repr`. It generates different code per type, but is not included in the type bounds of generics. The `mergefunc` pass works for most of our code but currently hits an assert on libstd. It is receiving attention upstream so it will be ready soon, but I don't think removing this broken code should wait any longer. I've opened #9536 about enabling it by default. Closes #8651 Closes #3547 Closes #2537 Closes #6971 Closes #9222
2013-09-26auto merge of #9504 : brson/rust/continue, r=alexcrichtonbors-1/+4
2013-09-26Update version numbers to 0.9-preBrian Anderson-1/+1
2013-09-26Add 'continue' keyword to emacs, vim, gedit, kateBrian Anderson-1/+4
2013-09-26remove type_useDaniel Micay-80/+0
This is broken, and results in poor performance due to the undefined behaviour in the LLVM IR. LLVM's `mergefunc` is a *much* better way of doing this since it merges based on the equality of the bytecode. For example, consider `std::repr`. It generates different code per type, but is not included in the type bounds of generics. The `mergefunc` pass works for most of our code but currently hits an assert on libstd. It is receiving attention upstream so it will be ready soon, but I don't think removing this broken code should wait any longer. I've opened #9536 about enabling it by default. Closes #8651 Closes #3547 Closes #2537 Closes #6971 Closes #9222
2013-09-25Fix the rust logo iconBrian Anderson-0/+0
2013-09-25Fix run-pass tests to have 'pub fn main'Alex Crichton-0/+2
This is required by the check-fast target because each test is slurped up into a submodule.
2013-09-22auto merge of #9389 : poiru/rust/issue-9333, r=alexcrichtonbors-1/+1
Closes #9333.
2013-09-22Reserve the `alignof`, `offsetof`, and `sizeof` keywordsBirunthan Mohanathas-1/+1
Closes #9333.
2013-09-22auto merge of #9395 : brson/rust/0.8, r=alexcrichtonbors-1/+1
2013-09-22Remove 'copy' from syntax files, as it's no longer a keywordScott Lawrence-4/+1
2013-09-21Update version numbers to 0.8Brian Anderson-1/+1
2013-09-17The purpose of these headers is to fix issues with mingw v4.0, as described ↵Vadim Chugunov-0/+34
in #9246. This works by adding this directory to GCC include search path before mingw system headers directories, so we can intercept their inclusions and add missing definitions without having to modify files in mingw/include.
2013-09-13Minor cleanup and formatting tweaks to the rust-mode READMELindsey Kuper-25/+28
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-07Cover all cases for padding in paragraph fills as intendedMicah Chalmer-14/+19
2013-09-07Fix regression of multi-line statement indentsMicah Chalmer-23/+36
2013-09-06Add ERT testsMicah Chalmer-0/+389
2013-09-06Add paragraph fill and auto-fill for multi-line commentsMicah Chalmer-1/+123
2013-09-06Add custom group for rust-modeMicah Chalmer-1/+5
2013-09-06Indent return type to align with argumentsMicah Chalmer-2/+5
2013-09-06Allow indenting to align struct fields after curly braceMicah Chalmer-17/+14
2013-09-06Indent correctly after opening square bracketMicah Chalmer-1/+1
2013-09-05Fix glitches with struct field aligned indentsMicah Chalmer-2/+2
2013-09-04stop treating char as an integer typeDaniel Micay-0/+1
Closes #7609