summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2017-05-25Stabilize non capturing closure to fn coercionest31-6/+2
2017-05-25Auto merge of #41145 - matthewjasper:stabilize-relaxed-adts, r=petrochenkovbors-25/+3
Stabilize rfc 1506 - Clarified ADT Kinds Closes #35626 Documentation: - [ ] Reference rust-lang-nursery/reference#37 - [ ] Book? - [ ] Rust by example?
2017-05-25Hygienize lifetimes.Jeffrey Seyfried-13/+13
2017-05-25Hygienize `librustc_resolve`.Jeffrey Seyfried-21/+47
2017-05-25Declarative macros 2.0 without hygiene.Jeffrey Seyfried-29/+66
2017-05-25Refactor out `ast::MacroDef`.Jeffrey Seyfried-7/+29
2017-05-24Rollup merge of #42120 - euclio:unicode, r=arielb1Mark Simulacrum-1/+1
remove "much" from unicode diagnostic The English seems slightly awkward to me, and it's unnecessary.
2017-05-24Rollup merge of #42071 - nrc:parse-mods, r=nikomatsakisMark Simulacrum-10/+46
Add an option to the parser to avoid parsing out of line modules This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST.
2017-05-24add thiscall calling convention supportNathan Froyd-0/+9
This support is needed for bindgen to work well on 32-bit Windows, and also enables people to begin experimenting with C++ FFI support on that platform. Fixes #42044.
2017-05-23incr.comp.: Track expanded spans instead of FileMaps.Michael Woerister-28/+0
2017-05-23Stabilize in 1.19Matthew-789/+896
2017-05-23Rollup merge of #42016 - pietroalbini:stabilize/loop_break_value, r=nikomatsakisCorey Farwell-7/+2
Stabilize the loop_break_value feature Tracking issue: #37339. Documentation PRs already sent to the various repositories.
2017-05-20Auto merge of #42111 - ollie27:stab, r=Mark-Simulacrumbors-1/+1
Correct some stability versions These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-05-20remove "much" from unicode diagnosticAndy Russell-1/+1
2017-05-20Correct some stability versionsOliver Middleton-1/+1
These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-05-19Rollup merge of #42006 - jseyfried:fix_include_regression, r=nrcMark Simulacrum-5/+5
Fix ICE on `include!(line!())` (regression) Fixes #41776. r? @nrc
2017-05-19trace_macro: Show both the macro call and its expansion. #42072.Jason Orendorff-3/+12
2017-05-18Add an option to the parser to avoid parsing out of line modulesNick Cameron-10/+46
This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST.
2017-05-17Stabilize the loop_break_value featurePietro Albini-7/+2
2017-05-17Auto merge of #41961 - kennytm:fix-35829, r=petrochenkovbors-36/+20
Fix #35829 (`quote!()` does not handle `br#"…"#`) Fix issue #35829 (syntax extension's `quote_expr!()` does not handle `b"…"` and proc_macro's `quote!()` does not handle `r#"…"#`) * Handles `b"…"`, `br#"…"#` and `...` for `quote_expr!()`. * Refactored the match statement to allow it to complain loudly on any unhandled token. * Similarly, proc_macro's `quote!()` did not handle `br#"…"#` or `r#"…"#`, so this PR fixes it too.
2017-05-17Auto merge of #42049 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-538/+504
Rollup of 5 pull requests - Successful merges: #41937, #41957, #42017, #42039, #42046 - Failed merges:
2017-05-16Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkovMark Simulacrum-538/+504
Fix some clippy warnings in libsyntax This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes.
2017-05-16Auto merge of #41907 - est31:macro_unused, r=jseyfriedbors-4/+16
Add lint for unused macros Addresses parts of #34938, to add a lint for unused macros. We now output warnings by default when we encounter a macro that we didn't use for expansion. Issues to be resolved before this PR is ready for merge: - [x] fix the NodeId issue described above - [x] remove all unused macros from rustc and the libraries or set `#[allow(unused_macros)]` next to them if they should be kept for some reason. This is needed for successful boostrap and bors to accept the PR. -> #41934 - [x] ~~implement the full extent of #34938, that means the macro match arm checking as well.~~ *let's not do this for now*
2017-05-16Rollup merge of #42005 - jseyfried:fix_macro_regression, r=nrcMark Simulacrum-5/+6
Fix regression in `macro_rules!` name matching Fixes #41803. r? @nrc
2017-05-16(hopefully) fix pprust errorAndre Bogus-1/+3
2017-05-15adressed comments by @kennytm and @petrochenkovAndre Bogus-38/+41
2017-05-15Fix regression on `include!(line!())`.Jeffrey Seyfried-5/+5
2017-05-15Fix regression in `macro_rules!` name matching.Jeffrey Seyfried-5/+6
2017-05-15Address review commentsest31-4/+2
2017-05-14Disallow underscore suffix for string-like literals.Masaki Hara-5/+1
2017-05-13Rollup merge of #41946 - qnighy:disallow-dot-underscore-in-float, r=petrochenkovMark Simulacrum-3/+1
Disallow ._ in float literal. This patch makes lexer stop parsing number literals before `._`, as well as before `.a`. Underscore itself is still allowed like in `4_000_000.000_000_`. Fixes a half part of #41723. The other is `""_`.
2017-05-13Auto merge of #41919 - nrc:save-crate, r=eddybbors-4/+6
Include the crate's root module in save-analysis r? @eddyb
2017-05-13Support #[allow] etc logic on a per macro levelest31-3/+7
This commit extends the current unused macro linter to support directives like #[allow(unused_macros)] or #[deny(unused_macros)] directly next to the macro definition, or in one of the modules the macro is inside. Before, we only supported such directives at a per crate level, due to the crate's NodeId being passed to session.add_lint. We also had to implement handling of the macro's NodeId in the lint visitor.
2017-05-13Extend the libsyntax visitor to work over macro defsest31-1/+5
2017-05-13Add lint for unused macrosest31-0/+6
2017-05-13Fix #35829 (syntax extension's `quote_expr!()` does not handle b"…")kennytm-36/+20
* Handles `b"…"`, `br#"…"#` and `...` for `quote_expr!()`. * Refactored the match statement to allow it to complain loudly on any unhandled token. * Similarly, proc_macro's `quote!()` did not handle `br#"…"#` or `r#"…"#`, so this commit fixes it too.
2017-05-13Auto merge of #41965 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-35/+33
Rollup of 15 pull requests - Successful merges: #41820, #41860, #41876, #41896, #41912, #41916, #41918, #41921, #41923, #41934, #41935, #41940, #41942, #41943, #41951 - Failed merges:
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-537/+498
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-12Disallow ._ in float literal.Masaki Hara-3/+1
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-3/+4
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-12Pass crate attributes in visit.rsNick Cameron-4/+6
2017-05-11Address PR reviewsOliver Schneider-5/+5
2017-05-10Refactor suggestion diagnostic API to allow for multiple suggestionsOliver Schneider-35/+33
2017-05-09Auto merge of #41709 - michaelwoerister:close-metadata-ich-holes, r=nikomatsakisbors-4/+39
incr.comp.: Hash more pieces of crate metadata to detect changes there. This PR adds incr. comp. hashes for non-`Entry` pieces of data in crate metadata. The first part of it I like: `EntryBuilder` is refactored into the more generally applicable `IsolatedEncoder` which provides means of encoding something into metadata while also feeding the encoded data into an incr. comp. hash. We already did this for `Entry`, now we are doing it for various other pieces of data too, like the set of exported symbols and so on. The hashes generated there are persisted together with the per-`Entry` hashes and are also used for dep-graph dirtying the same way. The second part of the PR I'm not entirely happy with: In order to make sure that we don't forget registering a read to the new `DepNodes` introduced here, I added the `Tracked<T>` struct. This struct wraps a value and requires a `DepNode` when accessing the wrapped value. This makes it harder to overlook adding read edges in the right places and works just fine. However, crate metadata is already used in places where there is no `tcx` yet or even in places where no `cnum` has been assigned -- this makes it harder to apply this feature consistently or implement it ergonomically. The result is not too bad but there's a bit more code churn and a bit more opportunity to get something wrong than I would have liked. On the other hand, wrapping things in `Tracked<T>` already has revealed some bugs, so there's definitely some value in it. This is still a work in progress: - [x] I need to write some test cases. - [x] Accessing the CodeMap should really be dependency tracked too, especially with the new path-remapping feature. cc @nikomatsakis
2017-05-08Rollup merge of #41827 - qnighy:allow-bare-cr-in-nondoc-comment, r=estebankCorey Farwell-1/+1
Allow bare CR in ////-style comment. Fixes #40624 in a way that bare CR is allowed in all non-doc comments.
2017-05-08Rollup merge of #41520 - estebank:trace-macro, r=nikomatsakisCorey Farwell-5/+19
Use diagnostics for trace_macro instead of println When using `trace_macro`, use `span_label`s instead of `println`: ```rust note: trace_macro --> $DIR/trace-macro.rs:14:5 | 14 | println!("Hello, World!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expands to `println! { "Hello, World!" }` = note: expands to `print! { concat ! ( "Hello, World!" , "\n" ) }` ``` Fix #22597.
2017-05-08Allow bare CR in ////-style comment.Masaki Hara-1/+1
2017-05-08Remove need for &format!(...) or &&"" dances in `span_label` callsOliver Schneider-10/+9
2017-05-08incr.comp.: Hash more pieces of crate metadata to detect changes there.Michael Woerister-4/+39
2017-05-07Auto merge of #41729 - ubsan:master, r=nrcbors-30/+29
Delete features which are easily removed, in libsyntax