about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-09-25rustdoc: Improve comment strippingAlex Crichton-15/+40
There is less implicit removal of various comment styles, and it also removes extraneous stars occasionally found in docblock comments. It turns out that the bug for getops was just a differently formatted block. Closes #9425 Closes #9417
2013-09-25rustdoc: Change all code-blocks with a scriptAlex Crichton-24/+24
find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g' find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g' find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
2013-09-25auto merge of #9481 : jbclements/rust/minor-cleanup, r=cmrbors-18/+62
Small stuff... might as well get it into the tree. One new test case, some issue # cleanup, remove some unused imports.
2013-09-25auto merge of #9432 : alexcrichton/rust/correct-item-visibility, r=pcwaltonbors-49/+9
This fixes private statics and functions from being usable cross-crates, along with some bad privacy error messages. This is a reopening of #8365 with all the privacy checks in privacy.rs instead of resolve.rs (where they should be anyway). These maps of exported items will hopefully get used for generating documentation by rustdoc Closes #8592
2013-09-24auto merge of #9335 : alexcrichton/rust/issue-7945, r=thestingerbors-21/+28
As documented in issue #7945, these literal identifiers are all accepted by rust today, but they should probably be disallowed (especially `'''`). This changes all escapable sequences to being *required* to be escaped. Closes #7945 I wanted to write the tests with more exact spans, but I think #9308 will be fixing that?
2013-09-24Disallow char literals which should be escapedAlex Crichton-21/+28
As documented in issue #7945, these literal identifiers are all accepted by rust today, but they should probably be disallowed (especially `'''`). This changes all escapable sequences to being *required* to be escaped. Closes #7945
2013-09-24added test case for tokenization of macro_rulesJohn Clements-0/+45
2013-09-24auto merge of #9336 : alexcrichton/rust/issue-7981, r=catamorphismbors-12/+13
Progress on #7981 This doesn't completely close the issue because `struct A;` is still allowed, and it's a much larger change to disallow that. I'm also not entirely sure that we want to disallow that. Regardless, punting that discussion to the issue instead.
2013-09-24renumbered due to bug shufflingJohn Clements-5/+5
2013-09-24Stop accepting 'impl ...;', require {} insteadAlex Crichton-12/+13
Progress on #7981
2013-09-24cleanupJohn Clements-10/+7
2013-09-24comment changes onlyJohn Clements-3/+5
2013-09-24Correctly encode item visibility in metadataAlex Crichton-49/+9
This fixes private statics and functions from being usable cross-crates, along with some bad privacy error messages. This is a reopening of #8365 with all the privacy checks in privacy.rs instead of resolve.rs (where they should be anyway). These maps of exported items will hopefully get used for generating documentation by rustdoc Closes #8592
2013-09-23librustc: Fix merge fallout.Patrick Walton-1/+1
2013-09-23test: Fix rustdoc and tests.Patrick Walton-16/+6
2013-09-23librustc: Remove `@fn` managed closures from the language.Patrick Walton-11/+0
2013-09-23libsyntax: Introduce routines and remove all `@fn`s from libsyntax save the ↵Patrick Walton-27/+11
old visitor
2013-09-23libsyntax: Remove some more `@fn`s from the macro expanderPatrick Walton-109/+300
2013-09-23libsyntax: Remove some more `@fn` usesPatrick Walton-7/+0
2013-09-23librustc: Change the ID visitor to use traits instead of garbage-collected ↵Patrick Walton-31/+46
functions.
2013-09-23librustc: Remove the remaining direct uses of `@fn` from librustc.Patrick Walton-32/+44
2013-09-23librustc: Port the pretty printer annotation infrastructure to use traits ↵Patrick Walton-18/+29
instead of garbage collected functions.
2013-09-23librustc: Change fold to use traits instead of `@fn`.Patrick Walton-972/+979
2013-09-22auto merge of #9389 : poiru/rust/issue-9333, r=alexcrichtonbors-4/+14
Closes #9333.
2013-09-22Reserve the `alignof`, `offsetof`, and `sizeof` keywordsBirunthan Mohanathas-4/+14
Closes #9333.
2013-09-21Update version numbers to 0.8Brian Anderson-1/+1
2013-09-20Implement a web backend for rustdoc_ngAlex Crichton-4/+2
This large commit implements and `html` output option for rustdoc_ng. The executable has been altered to be invoked as "rustdoc_ng html <crate>" and it will dump everything into the local "doc" directory. JSON can still be generated by changing 'html' to 'json'. This also fixes a number of bugs in rustdoc_ng relating to comment stripping, along with some other various issues that I found along the way. The `make doc` command has been altered to generate the new documentation into the `doc/ng/$(CRATE)` directories.
2013-09-20Invert --cfg debug to --cfg ndebugAlex Crichton-2/+2
Many people will be very confused that their debug! statements aren't working when they first use rust only to learn that they should have been building with `--cfg debug` the entire time. This inverts the meaning of the flag to instead of enabling debug statements, now it disables debug statements. This way the default behavior is a bit more reasonable, and requires less end-user configuration. Furthermore, this turns on debug by default when building the rustc compiler.
2013-09-19auto merge of #9308 : ben0x539/rust/lexer-error-spans, r=alexcrichtonbors-26/+91
Previously, the lexer calling `rdr.fatal(...)` would report the span of the last complete token, instead of a span within the erroneous token (besides one span fixed in 1ac90bb). This branch adds wrappers around `rdr.fatal(...)` that sets the span explicilty, so that all fatal errors in `libsyntax/parse/lexer.rs` now report the offending code more precisely. A number of tests try to verify that, though the `compile-fail` testing setup can only check that the spans are on the right lines, and the "unterminated string/block comment" errors can't have the line marked at all, so that's incomplete. This closes #9149. Also, the lexer errors now report the offending code in the error message, not just via the span, just like other errors do.
2013-09-19lexer: further slight improvements to lexer errorsBenjamin Herr-16/+30
2013-09-19auto merge of #9279 : erickt/rust/master, r=alexcrichtonbors-10/+6
`Some(5).or_{default,zero}` can be easily replaced with `Some(Some(5).unwrap_or_default())`.
2013-09-19lexer: report problematic chars verbatim or as escape sequenceBenjamin Herr-12/+23
... instead of giving their numeric codepoint, following the lead of fdaae34. So the error message for, say, '\_' mentions _ instead of 95, and '\●' now mentions \u25cf.
2013-09-19lexer: show correct span on lexical errorsBenjamin Herr-19/+59
Previously, the lexer calling `rdr.fatal(...)` would report the span of the last complete token, instead of a span within the erroneous token (besides one span fixed in 1ac90bb). This commit adds a wrapper around `rdr.fatal(...)` that sets the span explicilty, so that all fatal errors in `libsyntax/parse/lexer.rs` now report the offending code more precisely. A number of tests try to verify that, though the `compile-fail` testing setup can only check that the spans are on the right lines, and the "unterminated string/block comment" errors can't have the line marked at all, so that's incomplete. Closes #9149.
2013-09-19auto merge of #9299 : alexcrichton/rust/fmt-trailing-comma, r=huonwbors-0/+1
This is more consistent with other parts of the language and it also makes it easier to use in situations where format string is massive.
2013-09-19auto merge of #9291 : jzelinskie/rust/remove-cond, r=alexcrichtonbors-36/+0
This is my first contribution, so please point out anything that I may have missed. I consulted IRC and settled on `match () { ... }` for most of the replacements.
2013-09-18Allow trailing commas in format!Alex Crichton-0/+1
This is more consistent with other parts of the language and it also makes it easier to use in situations where format string is massive.
2013-09-18Register new snapshotsAlex Crichton-39/+6
2013-09-18Remove and replace cond! Closes #9282.Jimmy Zelinskie-36/+0
2013-09-18auto merge of #9264 : ben0x539/rust/pp-work, r=alexcrichtonbors-8/+8
Since 3b6314c the pretty printer seems to only print trait bounds for `ast::ty_path(...)`s that have a generics arguments list. That seems wrong, so let's always print them. Closes #9253, un-xfails test for #7673.
2013-09-17extra: minor cleanup of Zero and Default syntax extensionErick Tryzelaar-10/+6
2013-09-17Added support for a `\0` escape sequence.Daniel Rosenwasser-0/+2
This commit adds support for `\0` escapes in character and string literals. Since `\0` is equivalent to `\x00`, this is a direct translation to the latter escape sequence. Future builds will be able to compile using `\0` directly. Also updated the grammar specification and added a test for NUL characters.
2013-09-17pp: also print bounds in paths with no generic paramsBenjamin Herr-7/+7
Since 3b6314c3 the pretty printer seems to only print trait bounds for `ast::ty_path(...)`s that have a generics arguments list. That seems wrong, so let's always print them. Closes #9253, un-xfails test for #7673.
2013-09-17pp: typo in commentBenjamin Herr-1/+1
2013-09-17auto merge of #9245 : kballard/rust/bytes-span, r=catamorphismbors-10/+10
This constrains the span to the appropriate argument, so you know which one caused the problem. Instead of foo.rs:2:4: 2:21 error: Too large integer literal in bytes! foo.rs:2 bytes!(1, 256, 2) ^~~~~~~~~~~~~~~~~ it will say foo.rs:2:14 2:17 error: Too large integer literal in bytes! foo.rs:2 bytes!(1, 256, 2) ^~~
2013-09-17auto merge of #9244 : thestinger/rust/drop, r=catamorphismbors-1/+1
This doesn't close any bugs as the goal is to convert the parameter to by-value, but this is a step towards being able to make guarantees about `&T` pointers (where T is Freeze) to LLVM.
2013-09-16switch Drop to `&mut self`Daniel Micay-1/+1
2013-09-16Limit spans in bytes!() error messages to the argument in questionKevin Ballard-10/+10
This constrains the span to the appropriate argument, so you know which one caused the problem. Instead of foo.rs:2:4: 2:21 error: Too large integer literal in bytes! foo.rs:2 bytes!(1, 256, 2) ^~~~~~~~~~~~~~~~~ it will say foo.rs:2:14 2:17 error: Too large integer literal in bytes! foo.rs:2 bytes!(1, 256, 2) ^~~
2013-09-16Update syntax testCorey Richardson-1/+123
2013-09-16Fix hardcoded string in libsyntaxCorey Richardson-24/+2
2013-09-16auto merge of #9187 : lkuper/rust/no-simplevisitor, r=catamorphismbors-144/+3
We don't seem to be using `SimpleVisitor` anywhere in rustc. Is there any reason to keep it around? r? anyone