about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2015-11-24Remove "this"Jonas Schievink-1/+1
2015-11-23Print the macro context name on incomplete parseJonas Schievink-10/+10
Fixes #22425 Also fixes #30007, since it's just a change from `true` to `false`.
2015-11-22Look up macro names as well when suggesting replacements for function ↵Manish Goregaokar-18/+28
resolve errors fixes #5780
2015-11-18Rework the `IdVisitor` so that it only visits item contents (and doesn'tNiko Matsakis-18/+10
visit nested items). This is what all clients wanted anyhow.
2015-11-18Add some unicode aliases for ".Huon Wilson-0/+17
2015-11-17Auto merge of #29887 - sanxiyn:match-ref-pats, r=sfacklerbors-57/+57
2015-11-17Auto merge of #29766 - oli-obk:impl_item, r=nikomatsakisbors-38/+37
[breaking change] I'm not sure if those renames are ok. [TokenType::Tt* to TokenType::*](https://github.com/rust-lang/rust/pull/29582) was obvious, but for all those Item-enums it's less obvious to me what the right way forward is due to the underscore.
2015-11-17Fix match_ref_pats flagged by ClippySeo Sanghyeon-57/+57
2015-11-17Auto merge of #29837 - Wafflespeanut:unicode_chars, r=Manishearthbors-1/+193
fixes #25957
2015-11-17Detect confusing unicode characters and show the alternativeRavi Shankar-1/+193
2015-11-16rename `ast::ImplItem_::*ImplItem` to `ast::ImplItemKind::*`Oliver Schneider-38/+37
2015-11-16Auto merge of #29828 - sanxiyn:check-macro, r=nrcbors-49/+63
Fix #27409.
2015-11-14Check macro definition and do not expand invalid macrosSeo Sanghyeon-3/+22
2015-11-14Reindent codeSeo Sanghyeon-22/+22
2015-11-14Store TokenTree in MacroRulesMacroExpanderSeo Sanghyeon-28/+23
2015-11-13Move the panicking parse functions out of the parserKyle Mayes-50/+52
Since these functions are only used by the AST quoting syntax extensions, they should be there instead of in the parser.
2015-11-13Auto merge of #29761 - eefriedman:rename-nopanic, r=sanxiynbors-87/+87
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more readable.
2015-11-12Auto merge of #29807 - nrc:op_span, r=brsonbors-1/+1
cc @nagisa
2015-11-13Fix a bad span for binopsNick Cameron-1/+1
2015-11-12Auto merge of #29780 - KyleMayes:quote-ext, r=nrcbors-1/+86
This is my first code contribution to Rust, so I'm sure there are some issues with the changes I've made. I've added the `quote_arg!`, `quote_block!`, `quote_path!`, and `quote_meta_item!` quasiquoting macros. From my experience trying to build AST in compiler plugins, I would like to be able to build any AST piece with a quasiquoting macro (e.g., `quote_struct_field!` or `quote_variant!`) and then use those AST pieces in other quasiquoting macros, but this pull request just adds some of the low-hanging fruit. I'm not sure if these additions are desirable, and I'm sure these macros can be implemented in an external crate if not.
2015-11-12Auto merge of #29544 - Ryman:reduce_doc_warnings, r=steveklabnikbors-17/+24
Did this alphabetically, so I didn't see [how `std` was doing things](https://dxr.mozilla.org/rust/source/src/libstd/lib.rs#215) till I was nearly finished. If you prefer to add crate-level-whitelists like std instead of test-level, I can rebase with that strategy. A number of these commits can probably be dropped as the crates don't have much to test, and are deprecated. Let me know which if any to drop! (can also squash after review if desired) r? @steveklabnik
2015-11-12libsyntax: deny warnings in doctestsKevin Butler-17/+24
2015-11-12Add -Zinput-statsNick Cameron-1/+174
Emits loc, and node count - before and after expansion. E.g., ``` rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore Lines of code: 32060 Pre-expansion node count: 120205 Post-expansion node count: 482749 ```
2015-11-11libsyntax: Add more quasiquoting macrosKyle Mayes-1/+86
2015-11-11Auto merge of #29744 - sanxiyn:modernize, r=nrcbors-30/+30
2015-11-11Auto merge of #29727 - alexcrichton:debug-unused-result, r=sfacklerbors-4/+21
This should help avoid triggering the unused_results lint which can frequently be turned on. Closes #29710
2015-11-10Rename _nopanic methods to remove the suffix.Eli Friedman-87/+87
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more readable.
2015-11-10Auto merge of #29725 - aturon:lang-features, r=huonwbors-45/+59
This commit adds issue numbers to the vast majority of active feature gates. The few that are left without issues are rustc/runtime-internal features that are essentially private APIs. Closes #28244 r? @huonw
2015-11-10Auto merge of #29714 - petrochenkov:strparse, r=nrcbors-46/+37
In particular, attributes are now parsed on fields of tuple variants
2015-11-10Use lifetime elisionSeo Sanghyeon-10/+10
2015-11-10Use deref coercionsSeo Sanghyeon-20/+20
2015-11-09std: Migrate to the new libcAlex Crichton-5/+8
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself * Update all references to use `libc` as a result. * Update all references to the new flat namespace. * Moves all windows bindings into sys::c
2015-11-09Use enum ParsePub instead of bool in field parsing + typoVadim Petrochenkov-13/+26
2015-11-09Improve error messageVadim Petrochenkov-0/+2
2015-11-09syntax: Use `let _` in #[derive(Debug)]Alex Crichton-4/+21
This should help avoid triggering the unused_results lint which can frequently be turned on. Closes #29710
2015-11-09Tag feature gates with issuesAaron Turon-45/+59
This commit adds issue numbers to the vast majority of active feature gates. The few that are left without issues are rustc/runtime-internal features that are essentially private APIs. Closes #28244
2015-11-09syntax: Merge parsing code for structures and variantsVadim Petrochenkov-44/+20
2015-11-06Auto merge of #29582 - oli-obk:token_tree, r=sfacklerbors-204/+214
2015-11-06remove `Tt` prefix from TokenType variantsOliver Schneider-204/+214
[breaking change]
2015-11-06Auto merge of #29615 - steveklabnik:lol_strings, r=alexcrichtonbors-4/+2
&format!("...") is the same as "" if we're not doing any interpolation, and doesn't allocate an intermediate String.
2015-11-05Auto merge of #29565 - sfackler:issue-29540, r=huonwbors-24/+35
Closes #29540 r? @huonw
2015-11-05remove excess string allocationSteve Klabnik-4/+2
&format!("...") is the same as "" if we're not doing any interpolation, and doesn't allocate an intermediate String.
2015-11-05Auto merge of #28887 - steveklabnik:gh28851, r=alexcrichtonbors-5/+6
If you try to put something that's bigger than a char into a char literal, you get an error: fn main() { let c = 'ஶ்ரீ'; } error: unterminated character constant: This is a very compiler-centric message. Yes, it's technically 'unterminated', but that's not what you, the user did wrong. Instead, this commit changes it to error: character literal that's larger than a char: As this actually tells you what went wrong. Fixes #28851
2015-11-05Improve error message for char literalsSteve Klabnik-5/+6
If you try to put something that's bigger than a char into a char literal, you get an error: fn main() { let c = 'ஶ்ரீ'; } error: unterminated character constant: This is a very compiler-centric message. Yes, it's technically 'unterminated', but that's not what you, the user did wrong. Instead, this commit changes it to error: character literal may only contain one codepoint As this actually tells you what went wrong. Fixes #28851
2015-11-03Don't chain method calls in #[derive(Debug)]Steven Fackler-24/+35
Closes #29540
2015-11-03Allow indirect operands to be used as inputs for inline asmAmanieu d'Antras-2/+2
2015-11-03Auto merge of #29285 - eefriedman:libsyntax-panic, r=nrcbors-177/+161
A set of commits which pushes some panics out of core parser methods, and into users of those parser methods.
2015-11-02Auto merge of #29291 - petrochenkov:privacy, r=alexcrichtonbors-0/+6
The public set is expanded with trait items, impls and their items, foreign items, exported macros, variant fields, i.e. all the missing parts. Now it's a subset of the exported set. This is needed for https://github.com/rust-lang/rust/pull/29083 because stability annotation pass uses the public set and all things listed above need to be annotated. Rustdoc can now be migrated to the public set as well, I guess. Exported set is now slightly more correct with regard to exported items in blocks - 1) blocks in foreign items are considered and 2) publicity is not inherited from the block's parent - if a function is public it doesn't mean structures defined in its body are public. r? @alexcrichton or maybe someone else
2015-11-01Auto merge of #29501 - Manishearth:pat-docs, r=alexcrichtonbors-3/+3
None
2015-11-01Add code formatting on PatVec docsManish Goregaokar-2/+2