about summary refs log tree commit diff
path: root/src/libsyntax/print
AgeCommit message (Collapse)AuthorLines
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-5/+8
For bootstrapping purposes, this commit does not remove all uses of the keyword "pure" -- doing so would cause the compiler to no longer bootstrap due to some syntax extensions ("deriving" in particular). Instead, it makes the compiler ignore "pure". Post-snapshot, we can remove "pure" from the language. There are quite a few (~100) borrow check errors that were essentially all the result of mutable fields or partial borrows of `@mut`. Per discussions with Niko I think we want to allow partial borrows of `@mut` but detect obvious footguns. We should also improve the error message when `@mut` is erroneously reborrowed.
2013-03-18Make &self permit explicit lifetimes, but don't really use themNiko Matsakis-11/+14
(this will be needed for snapshotting at some point).
2013-03-16auto merge of #5374 : z0w0/rust/rustdoc-explicit-self, r=z0w0bors-2/+3
2013-03-16syntax: Fix fun_to_str testZack Corr-1/+1
2013-03-15Actually pass inline asm operands around.Luqman Aden-2/+18
2013-03-14rustdoc: Document explicit self in methods. Closes #5254Zack Corr-1/+2
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-5/+10
2013-03-13Remove `++` mode from the compiler (it is parsed as `+` mode)Niko Matsakis-1/+0
and obsolete `-` mode altogether (it *was* parsed as `+` mode).
2013-03-13auto merge of #5293 : brson/rust/logging, r=brsonbors-1/+1
r? @graydon This removes `log` from the language. Because we can't quite implement it as a syntax extension (probably need globals at the least) it simply renames the keyword to `__log` and hides it behind macros. After this the only way to log is with `debug!`, `info!`, etc. I figure that if there is demand for `log!` we can add it back later. I am not sure that we ever agreed on this course of action, though I *think* there is consensus that `log` shouldn't be a statement.
2013-03-12Add alignstack option for inline asm.Luqman Aden-1/+1
2013-03-12Parse operands properly and add a way to indicate volatile asm.Luqman Aden-2/+6
2013-03-12Create asm! syntax extension.Luqman Aden-1/+1
2013-03-12Parse inline assembly.Luqman Aden-0/+8
2013-03-11Remove uses of logBrian Anderson-1/+1
2013-03-11auto merge of #5304 : jld/rust/const-adjustments, r=graydonbors-0/+5
These changes make const translation use adjustments (autodereference, autoreference, bare-fn-to-closure), like normal code does, replacing some ad-hoc logic that wasn't always right. As a convenient side-effect, explicit dereference (both of pointers and of newtypes) is also supported in const expressions. There is also a “bonus fix” for a bug in the pretty-printer exposed by one of the added tests.
2013-03-11librustc: Lint the old `drop` destructor notation offPatrick Walton-27/+2
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-2/+2
2013-03-11Implement vector destructuring from tailSeo Sanghyeon-5/+11
2013-03-09Don't print addr_of(addr_of(e)) as `&&e`, which means something else.Jed Davis-0/+5
2013-03-09Remove @ast::Region and replace with @ast::Lifetime.Niko Matsakis-33/+26
Modify pretty-printer to emit lifetimes and fix a few minor parser bugs that this uncovered.
2013-03-08syntax: Remove uses of DVecAlex Crichton-4/+3
2013-03-07test: Fix tests.Patrick Walton-1/+3
2013-03-07librustc: Stop parsing `assert`.Patrick Walton-4/+0
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-14/+14
2013-03-07librustc: Remove record patterns from the compilerPatrick Walton-19/+0
2013-03-07libsyntax: Remove struct literal expressions from the compilerPatrick Walton-16/+0
2013-03-07librustc: Remove structural record types from the compilerPatrick Walton-14/+0
2013-03-06patch up pretty printing of things with both lifetime and type parametersNiko Matsakis-0/+1
2013-03-06Improve error messages when illegal lifetimes are usedNiko Matsakis-0/+4
2013-03-06Add manual &self/ and &static/ and /&self declarations thatNiko Matsakis-2/+2
are currently inferred. New rules are coming that will require them to be explicit. All add some explicit self declarations.
2013-03-06Fix a bug with region-parameterized enums etc where trans consideredNiko Matsakis-1/+1
them to be non-monomorphic. Merely having lifetime parameters is not enough to qualify for that status. Fixes #5243.
2013-03-05libsyntax: Separate multiple inherited traits with `+`Patrick Walton-1/+4
2013-03-05Update region inference for traits so that a method withNiko Matsakis-1/+0
explicit self doesn't incorrectly cause the entire trait to be tagged as being region-parameterized. Fixes #5224.
2013-03-05auto merge of #5212 : thestinger/rust/iter, r=graydonbors-6/+6
A small step towards fixing #2827
2013-03-04Remove unused imports throughout src/Alex Crichton-7/+0
2013-03-03replace option::iter with a BaseIter implDaniel Micay-6/+6
2013-03-02librustc: Stop parsing `fn@`, `fn~`, and `fn&`Patrick Walton-11/+0
2013-03-02libsyntax: Remove `fn@`, `fn~`, and `fn&` from libsyntax. rs=defunPatrick Walton-3/+3
2013-03-02Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-17/+13
2013-03-02auto merge of #5137 : yjh0502/rust/empty_struct, r=nikomatsakisbors-1/+1
The fix is straight-forward, but there are several changes while fixing the issue. 1) disallow `mut` keyword when making a new struct In code base, there are following code, ```rust struct Foo { mut a: int }; let a = Foo { mut a: 1 }; ``` This is because of structural record, which is deprecated corrently (see issue #3089) In structural record, `mut` keyword should be allowd to control mutability. But without structural record, we don't need to allow `mut` keyword while constructing struct. 2) disallow structural records in parser level This is related to 1). With structural records, there is an ambiguity between empty block and empty struct To solve the problem, I change parser to stop parsing structural records. I think this is not a problem, because structural records are not compiled already. Misc. issues There is an ambiguity between empty struct vs. empty match stmt. with following code, ```rust match x{} {} ``` Two interpretation is possible, which is listed blow ```rust match (x{}) {} // matching with newly-constructed empty struct (match x{}) {} // matching with empty enum(or struct) x // and then empty block ``` It seems that there is no such code in rust code base, but there is one test which uses empty match statement: https://github.com/mozilla/rust/blob/incoming/src/test/run-pass/issue-3037.rs All other cases could be distinguished with look-ahead, but this can't be. One possible solution is wrapping with parentheses when matching with an uninhabited type. ```rust enum what { } fn match_with_empty(x: what) -> ~str { match (x) { //use parentheses to remove the ambiguity } } ```
2013-03-02Remove REC, change related tests/docsJihyun Yu-1/+1
2013-03-02Fix some struct-tuple def prettyprint issuesSeth Pink-16/+12
- Removed space between struct name and parentheses - Fixed indentation of the rest of the file (missing end) - Don't print parentheses for structs with no fields - Added test
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-2/+5
2013-02-28Fix implicit leaks of imports throughout librariesAlex Crichton-2/+5
Also touch up use of 'pub' and move some tests around so the tested functions don't have to be 'pub'
2013-02-28Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-52/+76
2013-02-27Introduce lifetime declarations into the lists of type parameters.Niko Matsakis-39/+63
Major changes are: - replace ~[ty_param] with Generics structure, which includes both OptVec<TyParam> and OptVec<Lifetime>; - the use of syntax::opt_vec to avoid allocation for empty lists; cc #4846
2013-02-26libsyntax: remove vecs_implicitly_copyable from the printerErick Tryzelaar-25/+26
2013-02-26libsyntax: change token::to_str to take &TokenErick Tryzelaar-2/+2
2013-02-25libsyntax: progress on making syntax::visit vecs_implicitly_copyable-freeErick Tryzelaar-34/+34
2013-02-25libsyntax: Convert ast::attribute_ to store a @meta_itemErick Tryzelaar-1/+1