about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2013-09-04Added ToStr impl for charMarvin Löbel-1/+27
Changed ToStr impl for Ascii
2013-09-04Fixed docs and stylesFlaper Fesp-123/+31
2013-09-04Add a safe implementation of MutexArc::access* methodsFlaper Fesp-21/+188
Current access methods are nestable and unsafe. This patch renames current methods implementation - prepends unsafe_ - and implements 2 new methods that are both safe and un-nestable. Fixes #7473
2013-09-04Rename MutexArc access methods to unsafe_accessFlaper Fesp-9/+9
2013-09-03Fixes #8881. condition! imports parent's pub identifiersjmgrosen-10/+23
2013-09-03auto merge of #8954 : anasazi/rust/tcp-acceptor, r=catamorphismbors-160/+234
The Listener trait takes two type parameters, the type of connection and the type of Acceptor, and specifies only one method, listen, which consumes the listener and produces an Acceptor. The Acceptor trait takes one type parameter, the type of connection, and defines two methods. The accept() method waits for an incoming connection attempt and returns the result. The incoming() method creates an iterator over incoming connections and is a default method. Example: ```rust let listener = TcpListener.bind(addr); // Bind to a socket let acceptor = listener.listen(); // Start the listener for stream in acceptor.incoming() { // Process incoming connections forever (a failure will kill the task). } ``` Closes #8689
2013-09-03auto merge of #8921 : huonw/rust/stability, r=brsonbors-2/+688
Significant progress on #6875, enough that I'll open new bugs and turn that into a metabug when this lands. Description & example in the commit message.
2013-09-03rt::io: Rename Bytes to ByteIterator and add note about iterationblake2-ppc-8/+14
2013-09-03auto merge of #8934 : sfackler/rust/bufreader, r=brsonbors-3/+39
2013-09-03auto merge of #8945 : alexcrichton/rust/ifmt-dont-move, r=thestingerbors-2/+11
2013-09-04Update highlighting for prelude changes.Chris Morgan-2/+2
2013-09-04Highlight everything in the prelude in Vim.Chris Morgan-26/+78
This is a rather more extensive change than the last, but *ever* so much easier to maintain reasonably, as there's then something to track directly.
2013-09-04Update a handful of keywords highlighted in Vim.Chris Morgan-8/+6
I added a few and removed a few and corrected a couple, all with reference to the prelude. It ends up a slightly arbitrary decision precisely what ends up in and what doesn't, unfortunately.
2013-09-04Modernise some Vim syntax highlighting.Chris Morgan-3/+5
- Remove highlighting of ``L"..."`` (obsolete syntax) - Remove backslash at end of line being a line continuation always (obsolete syntax; this only affects comments, actually) - Add highlighting for backslash at end of line and leading whitespace on the following line inside a string (a genuine line continuation)
2013-09-03auto merge of #8947 : thestinger/rust/name, r=huonwbors-10/+37
Storing the type name in the `tydesc` aims to avoid the need to pass a type name in almost every single visitor method. It would likely be much saner for `repr` to simply be passed the `TyDesc` corresponding to the function or just the type name, but this is good enough for now.
2013-09-04Implement support for indicating the stability of items.Huon Wilson-2/+688
There are 6 new compiler recognised attributes: deprecated, experimental, unstable, stable, frozen, locked (these levels are taken directly from Node's "stability index"[1]). These indicate the stability of the item to which they are attached; e.g. `#[deprecated] fn foo() { .. }` says that `foo` is deprecated. This comes with 3 lints for the first 3 levels (with matching names) that will detect the use of items marked with them (the `unstable` lint includes items with no stability attribute). The attributes can be given a short text note that will be displayed by the lint. An example: #[warn(unstable)]; // `allow` by default #[deprecated="use `bar`"] fn foo() { } #[stable] fn bar() { } fn baz() { } fn main() { foo(); // "warning: use of deprecated item: use `bar`" bar(); // all fine baz(); // "warning: use of unmarked item" } The lints currently only check the "edges" of the AST: i.e. functions, methods[2], structs and enum variants. Any stability attributes on modules, enums, traits and impls are not checked. [1]: http://nodejs.org/api/documentation.html [2]: the method check is currently incorrect and doesn't work.
2013-09-03auto merge of #8884 : blake2-ppc/rust/exact-size-hint, r=huonwbors-63/+160
The message of the first commit explains (edited for changed trait name): The trait `ExactSize` is introduced to solve a few small niggles: * We can't reverse (`.invert()`) an enumeration iterator * for a vector, we have `v.iter().position(f)` but `v.rposition(f)`. * We can't reverse `Zip` even if both iterators are from vectors `ExactSize` is an empty trait that is intended to indicate that an iterator, for example `VecIterator`, knows its exact finite size and reports it correctly using `.size_hint()`. Only adaptors that preserve this at all times, can expose this trait further. (Where here we say finite for fitting in uint). --- It may seem complicated just to solve these small "niggles", (It's really the reversible enumerate case that's the most interesting) but only a few core iterators need to implement this trait. While we gain more capabilities generically for some iterators, it becomes a tad more complicated to figure out if a type has the right trait impls for it.
2013-09-03auto merge of #8932 : huonw/rust/closed-issues, r=thestingerbors-108/+196
2013-09-03auto merge of #8939 : Kimundi/rust/master, r=huonwbors-3803/+3808
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-3803/+3808
2013-09-03Re-xfail extern-pass-TwoU{8,16}.rs (still doesn't work on 32-bit platforms).Huon Wilson-0/+4
2013-09-03Correctly determine OS to xfail in cross buildSeo Sanghyeon-4/+23
2013-09-03Tests for fixed issues.Huon Wilson-1/+171
Closes #3794. Closes #4025. Closes #5688. Closes #5708. Closes #7012. Closes #7327.
2013-09-03Un-xfail/move/delete some tests.Huon Wilson-122/+36
2013-09-03auto merge of #8940 : ↵bors-2/+26
pnkfelix/rust/fsk-8468-allow-underscore-paramname-in-trait-default-method, r=alexcrichton Fix #8468. (Though the right answer in the end, as noted on the dialogue on the ticket, might be to just require trait methods to name their parameters, regardless of whether they have a default method implementation or not.)
2013-09-03Incorporate review feedback. Fix #8468.Felix S. Klock II-4/+1
2013-09-03repr: add very basic support for functionsDaniel Micay-5/+17
Closes #8917
2013-09-03add type name to the tydescDaniel Micay-5/+20
Closes #8926
2013-09-02Don't have format! move out of local variablesAlex Crichton-2/+11
2013-09-02Remove __extensions__ in names for a "pretty name"Alex Crichton-22/+135
As with the previous commit, this is targeted at removing the possibility of collisions between statics. The main use case here is when there's a type-parametric function with an inner static that's compiled as a library. Before this commit, any impl would generate a path item of "__extensions__". This changes this identifier to be a "pretty name", which is either the last element of the path of the trait implemented or the last element of the type's path that's being implemented. That doesn't quite cut it though, so the (trait, type) pair is hashed and again used to append information to the symbol. Essentially, __extensions__ was removed for something nicer for debugging, and then some more information was added to symbol name by including a hash of the trait being implemented and type it's being implemented for. This should prevent colliding names for inner statics in regular functions with similar names.
2013-09-02Fix inner statics having the same symbol nameAlex Crichton-0/+55
Before, the path name for all items defined in methods of traits and impls never took into account the name of the method. This meant that if you had two statics of the same name in two different methods the statics would end up having the same symbol named (even after mangling) because the path components leading to the symbol were exactly the same (just __extensions__ and the static name). It turns out that if you add the symbol "A" twice to LLVM, it automatically makes the second one "A1" instead of "A". What this meant is that in local crate compilations we never found this bug. Even across crates, this was never a problem. The problem arises when you have generic methods that don't get generated at compile-time of a library. If the statics were re-added to LLVM by a client crate of a library in a different order, you would reference different constants (the integer suffixes wouldn't be guaranteed to be the same). This fixes the problem by adding the method name to symbol path when building the ast_map. In doing so, two symbols in two different methods are disambiguated against.
2013-09-02auto merge of #8941 : alexcrichton/rust/fix-comment, r=thestingerbors-1/+1
2013-09-02Raise the file descriptor limits when running compiletestAlex Crichton-2/+13
We already do this for libstd tests automatically, and compiletest runs into the same problems where when forking lots of processes lots of file descriptors are created. On OSX we can use specific syscalls to raise the limits, in this situation, though. Closes #8904
2013-09-02Fix the std::fmt doc-block to show up in pandocAlex Crichton-1/+1
2013-09-02auto merge of #8936 : pnkfelix/rust/fsk-issue-2355-testcase, r=alexcrichtonbors-0/+27
Fix #2355.
2013-09-03Regression test for #8468.Felix S. Klock II-0/+15
2013-09-03Allow _ param name in trait default method for #8468.Felix S. Klock II-2/+14
2013-09-02Long awaited test case for #2355.Felix S. Klock II-0/+27
2013-09-02Implement BufReaderSteven Fackler-3/+39
2013-09-02librustc: Check for empty crate link meta name and vers.Luqman Aden-4/+4
2013-09-02libsyntax: Remove obsolete fixme.Luqman Aden-1/+0
2013-09-02auto merge of #8927 : thestinger/rust/repr, r=huonwbors-50/+91
2013-09-02switch __field__ hack to <unnamed_field>Daniel Micay-2/+3
avoids conflict with fields actually named `__field__`
2013-09-02repr: handle tuple structs sanelyDaniel Micay-34/+58
Closes #8919
2013-09-02auto merge of #8931 : ILyoan/rust/turnoff_android_ndk_asm, r=thestingerbors-3/+1
Now we don't need android ndk to generate unwind info for arm target thanks to LLVM upgrade. This fix removes the ndk asm pass.
2013-09-02repr: add support for trait objectsDaniel Micay-13/+20
Closes #8916
2013-09-02repr: print functions as `fn()`Daniel Micay-1/+10
2013-09-02turn off android ndk asm passIlyong Cho-3/+1
2013-09-01Fix #8898novalis-2/+35
2013-09-02rt::io: Add Bytes iterator for Readerblake2-ppc-1/+83
An iterator that simply calls `.read_bytes()` each iteration. I think choosing to own the Reader value and implementing Decorator to allow extracting it is the most generically useful. The Reader type variable can of course be some kind of reference type that implements Reader.