Commit Graph

1420 Commits

Author SHA1 Message Date
bors b5ab1012f1 auto merge of #6680 : ben0x539/rust/slashslashslash, r=graydon
There's currently a function in the lexer that rejects a line comment that is all slashes from being a doc comment. I think the intention was that you could draw boxes,

    /////////////
    // like so //
    /////////////

Since a line doc comment split up over multiple paragraphs will have a "blank" line that is just /// between the paragraphs, that would get mistaken for a box segment, lexed as a regular comment, and go missing from the sequence of doc comment attributes before they were reassembled by rustdoc into markdown input.

I figure the best plan here is to just declare that a comment that is exactly `///` is a doc comment after all, and to only omit comments with four slashes or more, which is what this commit implements. Can't really draw boxes that narrow, anyway.
2013-05-24 05:34:45 -07:00
Erick Tryzelaar a4df35f2bc cleanup warnings from libsyntax 2013-05-23 17:57:07 -07:00
Erick Tryzelaar 1965d72957 core: remove iter_bytes helper functions 2013-05-23 17:48:16 -07:00
Patrick Walton 3a66d732bb libsyntax: Fix more merge fallout. 2013-05-22 21:57:11 -07:00
Patrick Walton 18df18c817 libstd: Fix merge fallout. 2013-05-22 21:57:11 -07:00
Patrick Walton c10e0cb9c9 syntax: Change syntax extensions to expand to std::foo instead of core::foo 2013-05-22 21:57:08 -07:00
Patrick Walton c532e033c9 librustc: Change std to extra throughout libsyntax and librustc 2013-05-22 21:57:08 -07:00
Patrick Walton f3723cf7c4 libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra 2013-05-22 21:57:07 -07:00
bors f517ed0b08 auto merge of #6686 : cmr/rust/fix-6596, r=catamorphism
The error message is extremely unideal.
2013-05-22 16:22:35 -07:00
Corey Richardson 7ccc97e5b4 Fix ICE in macros 2013-05-22 19:18:50 -04:00
Benjamin Herr 5a42481366 declare that "///" is still a doc comment, just not "////+" (fixes #5838) 2013-05-22 15:53:26 +02:00
Jihyun Yu 6c33f5044b Fix #6342 2013-05-22 16:11:48 +09:00
bors 0252c30443 auto merge of #6658 : sanxiyn/rust/static-string-2, r=thestinger 2013-05-21 12:49:33 -07:00
Seo Sanghyeon 743e4b044c Use static strings 2013-05-22 02:48:56 +09:00
bors 64963d6cba auto merge of #6611 : huonw/rust/syntax-ext-no-dup, r=jbclements
Fixes https://github.com/mozilla/rust/issues/6578 by merging the 3 different ways to build an AST into a single `AstBuilder` trait, creating a more uniform and briefer interface.

Also, converts the `ext_ctxt` trait-object to be a plain struct, as well as renaming it to `ExtCtxt`.

Seems to make expansion slightly faster for the normal case (e.g. `libcore` and `libstd`), but slower for `librustc` (slightly) and `libsyntax` (0.3s -> 0.8s! I'm investigating this, but I'd prefer this patch to land relatively quickly.).

`git blame` suggests maybe @graydon or @erickt are familiar with this area of the code. r?
2013-05-21 10:43:17 -07:00
Seo Sanghyeon 6b525ecbda Take string slices 2013-05-22 02:32:29 +09:00
Huon Wilson a59bec43e3 syntax/ext: convert all AstBuilder methods to a uniform syntax. 2013-05-22 00:30:52 +10:00
Huon Wilson 6e50515530 syntax/ext: migrate build.rs functions to AstBuilder methods. 2013-05-22 00:15:36 +10:00
Huon Wilson 8c15a0ec4c syntax/ext: collect the ast building traits into a single trait. 2013-05-22 00:04:10 +10:00
Huon Wilson 4045da9f4f syntax/ext: modernise ext_ctxt to be CamelCase and use new. 2013-05-22 00:04:10 +10:00
Huon Wilson eea265ea16 syntax/ext: Remove the trait-object indirection of the ext_ctxt object. 2013-05-22 00:02:37 +10:00
Huon Wilson 8e9eba8013 syntax/ext: remove the ~str dependence of the deriving code. 2013-05-21 23:33:58 +10:00
Seo Sanghyeon 9390cdaa8b Correct span for expr_vec 2013-05-21 19:08:34 +09:00
Alex Crichton 82fa0018c8 Remove all unnecessary allocations (as flagged by lint) 2013-05-20 16:10:40 -05:00
Alex Crichton 074799b4c5 Implement a lint mode to detect unnecessary allocations 2013-05-20 16:08:50 -05:00
John Clements 999f692645 getting rid of interner_key! macro 2013-05-20 11:49:21 -07:00
John Clements fc4f304ef9 hygiene infrastructure.
- added a hash table to memoize rename and mark operations.
- added rename, mark, and resolve fold fns
2013-05-20 11:49:21 -07:00
John Clements b621820dc4 detect unused attrs in one more place, allow parsing to continue for all
changed a bunch of fatal()'s into err()'s, to allow parsing to proceed.
2013-05-20 11:49:20 -07:00
John Clements 05ab83eea8 parser comment 2013-05-20 11:49:20 -07:00
John Clements 975f264983 refactoring test functions 2013-05-20 11:49:20 -07:00
bors 2e6cda254a auto merge of #6635 : brson/rust/snapshot, r=brson 2013-05-20 02:46:36 -07:00
Brian Anderson 66319b0278 Register snapshots 2013-05-19 23:34:32 -07:00
Steve Klabnik d3f70b141a Fix many warnings. 2013-05-19 21:32:32 -07:00
Corey Richardson cc57ca012a Use assert_eq! rather than assert! where possible 2013-05-19 08:16:02 -04:00
bors 99c7750ca6 auto merge of #6603 : thestinger/rust/whitespace, r=thestinger 2013-05-18 22:55:34 -07:00
Daniel Micay 20ef4238bb reduce the usage of explicit version markers 2013-05-19 00:21:41 -04:00
Daniel Micay 1789174541 minor automated whitespace fixes 2013-05-18 22:40:12 -04:00
Marvin Löbel 7a2afb7288 Made bytes!() accept a list of string, integer or char literals 2013-05-18 00:26:04 +02:00
Alex Crichton 030c666cc1 Re-implement lint with less emphasis on item ids
This way it's much easier to add lints throughout compilation correctly, and
functions on impls can alter the way lints are emitted.
2013-05-17 00:49:16 -04:00
Niko Matsakis 035c01af93 Add BuiltinBounds to closure type: parse and handle subtyping,
but do not integrate with kindck etc (requires a snapshot first)
2013-05-16 14:21:02 -04:00
bors 53196bb364 auto merge of #6530 : huonw/rust/deriving-deepclone, r=bstrie 2013-05-16 06:58:52 -07:00
Huon Wilson 47c9157d87 syntax: use fmt! over + in deriving/clone 2013-05-16 23:22:01 +10:00
bors f19883223c auto merge of #6531 : sammykim/rust/bytes, r=luqmana
Fix #4334.
2013-05-16 05:55:42 -07:00
Huon Wilson cd2eb4701f syntax: implement #[deriving(DeepClone)]. Fixes #6514. 2013-05-16 22:55:08 +10:00
Sangeun Kim 70a19d5f63 Implement bytes! syntax extension 2013-05-16 13:29:54 +09:00
bors 8257528b6c auto merge of #6502 : huonw/rust/no-auto-code, r=graydon
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute
and remove the majority of the actual auto_* code, leaving stubs to refer the user to
the new syntax.

Also, moves the useful contents of auto_encode.rs to more appropriate spots: tests and comments to deriving/encodable.rs, and the ExtCtxtMethods trait to build.rs (unused so far, but the method syntax might be nicer than using the mk_* fns in many instances).
2013-05-15 18:16:51 -07:00
bors 7012c42c41 auto merge of #6500 : kud1ing/rust/cleanup, r=bstrie
Fixes #6445
2013-05-15 16:07:44 -07:00
Huon Wilson 5dc5efefd4 syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute
and remove the majority of the actual code, leaving stubs to refer the user to
the new syntax.
2013-05-16 08:55:57 +10:00
bors 08b4cdd395 auto merge of #6499 : dotdash/rust/static_keywords, r=thestinger 2013-05-15 15:10:48 -07:00
bors 4e82610099 auto merge of #6487 : recrack/rust/vec_len, r=thestinger
Rename vec::len(var) to var.len()

```
libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax
test/auxiliary
test/bench
test/run-pass
```
2013-05-15 07:38:07 -07:00