about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2017-10-25Auto merge of #44636 - GuillaumeGomez:little-error-msg, r=michaelwoeristerbors-2/+5
Add short error message-format Fixes #42653.
2017-10-24Auto merge of #45401 - zackmdavis:crate_shorthand_visibility_modifier, ↵bors-4/+31
r=nikomatsakis `crate` shorthand visibility modifier cc #45388. r? @nikomatsakis
2017-10-24Auto merge of #44766 - sunjay:lift_generics, r=nikomatsakisbors-32/+38
Move Generics from MethodSig to TraitItem and ImplItem As part of `rust-impl-period/WG-compiler-traits`, we want to "lift" `Generics` from `MethodSig` into `TraitItem` and `ImplItem`. This is in preparation for adding associated type generics. (https://github.com/rust-lang/rust/issues/44265#issuecomment-331172238) Currently this change is only made in the AST. In the future, it may also impact the HIR. (Still discussing) To understand this PR, it's probably best to start from the changes to `ast.rs` and then work your way to the other files to understand the far reaching effects of this change. r? @nikomatsakis
2017-10-22`crate` shorthand visibility modifierZack M. Davis-4/+31
With regrets, this breaks rustfmt and rls. This is in the matter of #45388.
2017-10-20Add short message-formatGuillaume Gomez-2/+5
2017-10-19Auto merge of #45232 - zackmdavis:moar_lint_suggestions, r=estebankbors-0/+11
code suggestions for non-shorthand field pattern, no-mangle lints continuing in the spirit of #44942 ![moar_lint_suggestions](https://user-images.githubusercontent.com/1076988/31485011-3b20cc80-aee7-11e7-993d-81267ab77732.png) r? @estebank
2017-10-17Removed Generics from FnKind::ItemFn in libsyntaxSunjay Varma-6/+6
2017-10-17Fixed tidy errorsSunjay Varma-2/+4
2017-10-17Lifting Generics from MethodSig to TraitItem and ImplItem since we want to ↵Sunjay Varma-26/+30
support generics in each variant of TraitItem and ImplItem
2017-10-16code suggestion for non-shorthand field patterns lintZack M. Davis-0/+11
We also edit the lint description to clarify that this is different from the struct field init shorthand.
2017-10-15don't issue "expected statement after outer attr." after inner attr.Zack M. Davis-2/+2
While an inner attribute here is in fact erroneous, that error ("inner attribute is not permitted in this context") successfully gets set earlier; this further admonition is nonsensical. Resolves #45296.
2017-10-14Implement `dyn Trait` syntaxVadim Petrochenkov-32/+67
2017-10-13Rollup merge of #45178 - Badel2:comma-after-struct, r=petrochenkovkennytm-0/+11
Better error message for comma after base struct #41834 This adds a better error for commas after the base struct: ``` let foo = Foo { one: 111, ..Foo::default(), // This comma is a syntax error }; ``` The current error is a generic `expected one of ...` which isn't beginner-friendly. My error looks like this: ``` error: cannot use a comma after the base struct --> tmp/example.rs:26:9 | 26 | ..Foo::default(), | ^^^^^^^^^^^^^^^^- help: remove this comma | = note: the base struct expansion must always be the last field ``` I even added a note for people who don't know why this isn't allowed.
2017-10-13Rollup merge of #45122 - jean-lourenco:master, r=nikomatsakiskennytm-0/+1
Better compile error output when using arguments instead of types Following @estebank sugestion on issue https://github.com/rust-lang/rust/issues/18945#issuecomment-331251436
2017-10-13Fix typo in libsyntax/parse/lexer/unicode_chars.rskennytm-1/+1
` (U+0060) should be the "grave" accent, not "Greek" accent.
2017-10-10output compiler message updatedJean Lourenço-0/+1
output message is shown in another 'help:' block line with +100 columns formatted test adjusted
2017-10-11Add error for comma after base struct fieldBadel2-0/+11
`let x = { ..default(), } // This comma is an error`
2017-10-09Fix a bug in diagnostics for `x as usize < y`Vadim Petrochenkov-3/+16
Improve diagnostics for `x as usize << y`
2017-10-08Rollup merge of #45060 - topecongiro:semi-in-local-span, r=petrochenkovkennytm-1/+6
Add a semicolon to span for ast::Local
2017-10-06implement pattern-binding-modes RFCTobias Schottdorf-0/+3
See the [RFC] and [tracking issue]. [tracking issue]: https://github.com/rust-lang/rust/issues/42640 [RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md
2017-10-06Add a semicolon to span for ast::LocalSeiichi Uchida-1/+6
2017-10-05Auto merge of #44943 - nivkner:fixme_fixup, r=dtolnaybors-2/+0
address some FIXME whose associated issues were marked as closed part of #44366
2017-10-05Rollup merge of #45024 - QuietMisdreavus:doc-masked-issue-num, r=pnkfelixkennytm-1/+1
add the issue number to doc_masked's feature gate Whoops, missed this in the original `#[doc(masked)]` PR.
2017-10-05Rollup merge of #44972 - durka:patch-44, r=arielb1kennytm-1/+1
fix ItemKind::DefaultImpl doc comment Upgrade comment to doc comment. ...Is this actually used? If so, why does the `Impl` variant right below have a `Defaultness`?
2017-10-05Auto merge of #44940 - philipc:remap-path, r=michaelwoeristerbors-9/+25
Don't use remapped path when loading modules and include files Fixes bug reported in https://github.com/rust-lang/rust/issues/41555#issuecomment-327866056. cc @michaelwoerister
2017-10-04add the issue number to doc_masked's feature gateQuietMisdreavus-1/+1
2017-10-03Rename FileMap::path and change to an OptionPhilip Craig-10/+16
2017-10-02fix comment on DefaultImplAlex Burka-2/+2
2017-10-02fix ItemKind::DefaultImpl doc commentAlex Burka-2/+2
Upgrade comment to doc comment.
2017-09-30code suggestion for deprecated-attribute lintZack M. Davis-1/+2
Also, fix the deprecation message for the late no-debug feature.
2017-09-30remove "refinement on pat" FIXMENiv Kaminer-1/+0
2017-09-30address some `FIXME`s whose associated issues were marked as closedNiv Kaminer-2/+1
remove FIXME(#13101) since `assert_receiver_is_total_eq` stays. remove FIXME(#19649) now that stability markers render. remove FIXME(#13642) now the benchmarks were moved. remove FIXME(#6220) now that floating points can be formatted. remove FIXME(#18248) and write tests for `Rc<str>` and `Rc<[u8]>` remove reference to irelevent issues in FIXME(#1697, #2178...) update FIXME(#5516) to point to getopts issue 7 update FIXME(#7771) to point to RFC 628 update FIXME(#19839) to point to issue 26925
2017-09-30Don't use remapped path when loading modules and include filesPhilip Craig-8/+18
2017-09-29Auto merge of #44866 - mdevlamynck:impl-trait, r=eddybbors-0/+6
First step toward implementing impl Trait in argument position First step implementing #44721. Add a flag to hir and ty TypeParameterDef and raise an error when using explicit type parameters when calling a function using impl Trait in argument position. I don't know if there is a procedure to add an error code so I just took an available code. Is that ok ? r? @nikomatsakis
2017-09-28Auto merge of #44528 - tmnilsson:attr_proc_macro_cfg_process, r=jseyfriedbors-14/+25
Apply attr proc macros before cfg processing Fixes #39336. r? @jseyfried
2017-09-27Apply attr proc macros before cfg processingTomas Nilsson-14/+25
Now items are not fully configured until right before expanding derives.
2017-09-27Auto merge of #44709 - Badel2:inclusive-range-dotdoteq, r=petrochenkovbors-48/+98
Initial support for `..=` syntax #28237 This PR adds `..=` as a synonym for `...` in patterns and expressions. Since `...` in expressions was never stable, we now issue a warning. cc @durka r? @aturon
2017-09-26impl Trait in argument position desugaring:Matthias Devlamynck-0/+6
Add a flag to hir and ty TypeParameterDef and raise an error when using explicit type parameters when calling a function using impl Trait in argument position.
2017-09-25Fix bug in collecting trait and impl items with derives.Jeffrey Seyfried-7/+1
2017-09-24Rollup merge of #44103 - zackmdavis:cmp_op_must_use, r=arielb1Guillaume Gomez-1/+1
add comparison operators to must-use lint (under `fn_must_use` feature) Although RFC 1940 is about annotating functions with `#[must_use]`, a key part of the motivation was linting unused equality operators. (See https://github.com/rust-lang/rfcs/pull/1812#issuecomment-265695898—it seems to have not been clear to discussants at the time that marking the comparison methods as `must_use` would not give us the lints on comparison operators, at least in (what the present author understood as) the most straightforward implementation, as landed in #43728 (3645b062).) To rectify the situation, we here lint unused comparison operators as part of the unused-must-use lint (feature gated by the `fn_must_use` feature flag, which now arguably becomes a slight (tolerable in the opinion of the present author) misnomer). This is in the matter of #43302. cc @crumblingstatue
2017-09-23Auto merge of #44784 - frewsxcv:rollup, r=frewsxcvbors-7/+7
Rollup of 14 pull requests - Successful merges: #44554, #44648, #44658, #44712, #44717, #44726, #44745, #44746, #44749, #44759, #44770, #44773, #44776, #44778 - Failed merges:
2017-09-23Rollup merge of #44746 - topecongiro:span-for-unary, r=petrochenkovCorey Farwell-7/+7
Include unary operator to span for ExprKind::Unary
2017-09-23Auto merge of #44055 - zackmdavis:condensed_non-ADT_derive_error, r=jseyfriedbors-0/+30
only set non-ADT derive error once per attribute, not per trait I found the expansion code very hard to follow, leaving me unsure as to whether this might somehow be done better, but this patch does give us the behavior requested in #43927 (up to exact choice of span; here, it's the entire attribute, not just the `derive` token). (Note to GitHub robots: _resolves #43927_.) r? @jseyfried
2017-09-22add comparison operators to must-use lint (under `fn_must_use` feature)Zack M. Davis-1/+1
Although RFC 1940 is about annotating functions with `#[must_use]`, a key part of the motivation was linting unused equality operators. (See https://github.com/rust-lang/rfcs/pull/1812#issuecomment-265695898—it seems to have not been clear to discussants at the time that marking the comparison methods as `must_use` would not give us the lints on comparison operators, at least in (what the present author understood as) the most straightforward implementation, as landed in #43728 (3645b062).) To rectify the situation, we here lint unused comparison operators as part of the unused-must-use lint (feature gated by the `fn_must_use` feature flag, which now arguably becomes a slight (tolerable in the opinion of the present author) misnomer). This is in the matter of #43302.
2017-09-22dotdoteq_in_patterns feature gateBadel2-1/+8
2017-09-22Add information about the syntax used in rangesBadel2-8/+18
... or ..=
2017-09-22Add support for `..=` syntaxAlex Burka-41/+74
Add ..= to the parser Add ..= to libproc_macro Add ..= to ICH Highlight ..= in rustdoc Update impl Debug for RangeInclusive to ..= Replace `...` to `..=` in range docs Make the dotdoteq warning point to the ... Add warning for ... in expressions Updated more tests to the ..= syntax Updated even more tests to the ..= syntax Updated the inclusive_range entry in unstable book
2017-09-21suggest an outer attribute when `#![derive(...)]` (predictably) failsZack M. Davis-5/+17
2017-09-21only set non-ADT derive error once per attribute, not per traitZack M. Davis-0/+18
A slight eccentricity of this change is that now non-ADT-derive errors prevent derive-macro-not-found errors from surfacing (see changes to the gating-of-derive compile-fail tests). Resolves #43927.
2017-09-22Include unary operator to span for ExprKind::UnarySeiichi Uchida-7/+7