summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-09-06test case support fns, remove debugging test caseJohn Clements-3/+7
2013-09-06test case workJohn Clements-4/+2
2013-09-06re-add lost call to expand_block_eltsJohn Clements-1/+2
2013-09-06re-add debug versionJohn Clements-0/+5
2013-09-06test case workJohn Clements-2/+10
2013-09-06use empty_ctxt to simplify downstreamJohn Clements-2/+5
2013-09-06make comparison of special_idents non-hygienicJohn Clements-2/+2
2013-09-06commentsJohn Clements-0/+4
2013-09-06drop back to a simple gensym approach for fresh-name.John Clements-12/+3
this is necessary so that the new idents are connected to the original strings. this is important both for error messages, and so that top-level refs get connected to the right things.
2013-09-06added FIXME commentJohn Clements-0/+4
2013-09-06remove FIXME #2888, now bug is fixedJohn Clements-14/+13
2013-09-06comments onlyJohn Clements-0/+11
2013-09-06adding test case to check marking/unmarkingJohn Clements-12/+25
2013-09-06refactor so tt_fold only requires an ident->ident fnJohn Clements-9/+11
2013-09-06separate ItemDecorator from ItemDecoratorJohn Clements-2/+2
2013-09-06removed unneccessary SyntaxExpander structsJohn Clements-33/+18
2013-09-06comments in ast.rsJohn Clements-0/+5
2013-09-06renaming test casesJohn Clements-6/+12
2013-09-06flip the switch on let renamingJohn Clements-1/+1
2013-09-06add hygiene support fns, move them around.John Clements-60/+175
also adds test cases
2013-09-06compare macro tokens hygienically (commented out)John Clements-2/+19
2013-09-06rename resolve to mtwt_resolveJohn Clements-4/+3
2013-09-06commenting out special Eq implementation for nowJohn Clements-2/+13
See the comments for details on why I'm leaving this code in, though commented out.
2013-09-06disallow ident equality checks when contexts are not equalJohn Clements-1/+14
2013-09-05auto merge of #8997 : fhahn/rust/issue_8985, r=catamorphism,brsonbors-1/+1
Patch for #8985
2013-09-05auto merge of #8992 : chris-morgan/rust/unreachable-macro, r=brsonbors-0/+30
Rationale: having a function which fails means that the location of failure which is output is that of the unreachable() function, rather than the caller. This is part of #8991 but is not all of it; current usage of ``std::util::unreachable()`` must remain so for the moment, until a new snapshot is made; then I will remove that function entirely in favour of using this macro.
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-1/+1
2013-09-05Remove the __log function for __log_levelAlex Crichton-84/+50
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-04auto merge of #8875 : alexcrichton/rust/fix-inner-static-library-bug, r=huonwbors-13/+63
These commits fix bugs related to identically named statics in functions of implementations in various situations. The commit messages have most of the information about what bugs are being fixed and why. As a bonus, while I was messing around with name mangling, I improved the backtraces we'll get in gdb by removing `__extensions__` for the trait/type being implemented and by adding the method name as well. Yay!
2013-09-05Add an ``unreachable!()`` macro.Chris Morgan-0/+30
Rationale: having a function which fails means that the location of failure which is output is that of the unreachable() function, rather than the caller. This is part of #8991 but is not all of it; current usage of ``std::util::unreachable()`` must remain so for the moment, until a new snapshot is made; then I will remove that function entirely in favour of using this macro.
2013-09-04Improve name mangling for gdbAlex Crichton-29/+40
Remove __extensions__ from method symbols as well as the meth_XXX. The XXX is now used to append a few characters at the end of the name of the symbol. Closes #6602
2013-09-04auto merge of #8977 : pnkfelix/rust/fsk-followup-on-6009-rebased, r=alexcrichtonbors-2/+1
Fix #6009. Rebased version of #8970. Inherits review from alexcrichton.
2013-09-04debuginfo: Fixed some merge falloutMichael Woerister-1/+1
2013-09-04debuginfo: Support for variables captured in closures and closure type ↵Michael Woerister-4/+4
descriptions.
2013-09-04stop treating char as an integer typeDaniel Micay-22/+41
Closes #7609
2013-09-04Make non-pub condition! expand to non-pub mod. Fix #6009.Felix S. Klock II-2/+1
2013-09-03auto merge of #8963 : jmgrosen/rust/issue-8881, r=alexcrichtonbors-0/+8
2013-09-03Fixes #8881. condition! imports parent's pub identifiersjmgrosen-0/+8
2013-09-03auto merge of #8921 : huonw/rust/stability, r=brsonbors-0/+58
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-03auto merge of #8945 : alexcrichton/rust/ifmt-dont-move, r=thestingerbors-2/+6
2013-09-04Implement support for indicating the stability of items.Huon Wilson-0/+58
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 #8939 : Kimundi/rust/master, r=huonwbors-1400/+1400
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-1400/+1400
2013-09-03auto merge of #8940 : ↵bors-2/+11
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-02Don't have format! move out of local variablesAlex Crichton-2/+6
2013-09-02Remove __extensions__ in names for a "pretty name"Alex Crichton-5/+36
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/+8
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-03Allow _ param name in trait default method for #8468.Felix S. Klock II-2/+14
2013-09-02libsyntax: Remove obsolete fixme.Luqman Aden-1/+0