ljedrz
e5e6375352
Move SmallVec and ThinVec out of libsyntax
2018-08-13 22:11:57 +02:00
Vadim Petrochenkov
e3acb341b2
Remove some tests using AST comparisons, fix other tests
2018-07-14 14:57:14 +03:00
Vadim Petrochenkov
4d1a30c92b
Remove most of PartialEq impls from AST and HIR structures
2018-07-14 14:56:57 +03:00
Taylor Cramer
cf844b547d
async await desugaring and tests
2018-06-21 22:36:36 -07:00
varkor
c5f16e0e18
Rename ParamBound(s) to GenericBound(s)
2018-06-20 12:23:46 +01:00
varkor
80dbe58efc
Use ParamBounds in WhereRegionPredicate
2018-06-20 12:23:07 +01:00
varkor
aed530a457
Lift bounds into GenericParam
2018-06-20 12:22:46 +01:00
varkor
3bcb006fd9
Rename structures in ast
2018-06-20 12:21:52 +01:00
varkor
d643946550
Rename ast::GenericParam and ast::GenericArg
...
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20 12:19:04 +01:00
varkor
3e89753283
Rename PathParameter(s) to GenericArg(s)
2018-06-20 12:19:04 +01:00
Niko Matsakis
01d6ed525f
restore emplacement syntax (obsolete)
2018-05-24 18:49:58 -04:00
Vadim Petrochenkov
44acea4d88
AST/HIR: Merge field access expressions for named and numeric fields
2018-04-12 23:02:09 +03:00
Vadim Petrochenkov
b3b5ef186c
Remove more duplicated spans
2018-04-06 11:50:49 +03:00
Aidan Hobson Sayers
9b5859aea1
Remove all unstable placement features
...
Closes #22181 , #27779
2018-04-03 11:02:34 +02:00
John Kåre Alsaker
b74e97cf42
Replace Rc with Lrc for shared data
2018-03-02 10:48:52 +01:00
Esteban Küber
71c08734a3
Move ExprPrecedence to libsyntax/util/parser.rs
2018-01-15 15:09:39 -08:00
Esteban Küber
afe8d13a66
Use single source of truth for expr precedence
...
Introduce a new unified type that holds the expression precedence for
both AST and HIR nodes.
2018-01-15 02:02:37 -08:00
Jonas Platte
78493ed21a
Add GenericParam, refactor Generics in ast, hir, rustdoc
...
The Generics now contain one Vec of an enum for the generic parameters,
rather than two separate Vec's for lifetime and type parameters.
Additionally, places that previously used Vec<LifetimeDef> now use
Vec<GenericParam> instead.
2017-12-21 13:38:10 +01:00
Oliver Schneider
d732da813b
Use PathBuf instead of String where applicable
2017-12-14 11:22:08 +01:00
bors
7a649872a9
Auto merge of #46347 - raventid:did-you-mean-increase-accuracy, r=estebank
...
Add case insensitive comparison, besides Levenstein for DYM
Closes #46332
Draft version. The idea is that Levenstein does not work for some cases when we have multiple equal weights for strings. I didn't understand the case with `if found != name => Some(found)` so it means that new code does not work correctly yet.
At least now I think that we might return all maximal weights from levenstein and think about next cases in priority order:
1) There is exact match -> None
2) There is exact match, but case insensitive -> Some(match)
3) There is some match from levenstein -> Some(matches.take_any)
4) There is no match -> None
@estebank WDYT?
2017-12-02 12:42:54 +00:00
Julian Kulesh
537f2a6e1e
move comparator into +find_best_match_name+ function
2017-12-01 00:39:47 +03:00
Pietro Albini
91ba8b42fc
Implement RFC 2128 (use_nested_groups)
...
This commit adds support for nested groups inside `use` declarations,
such as `use foo::{bar, sub::{baz::Foo, *}};`.
2017-11-30 13:10:26 +01:00
Badel2
3c41c28f48
Using ... in expressions is now an error
2017-11-06 20:33:51 +01:00
Alex Burka
e64efc91f4
Add support for ..= syntax
...
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-22 22:05:18 +02:00
Stuart Pernsteiner
3454d99cb6
pprust: increase precedence of block-like exprs
2017-09-07 10:28:31 -04:00
Stuart Pernsteiner
b79dada453
pprust: fix parenthesization of exprs
2017-09-06 10:26:51 -04:00
Alex Crichton
d316874c87
Update and fix a few tests
2017-06-26 02:08:14 +00:00
Jeffrey Seyfried
e42836b208
Implement quote! and other proc_macro API.
2017-06-26 02:06:26 +00:00
Mark Simulacrum
4066c8ec71
Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkov
...
Fix some clippy warnings in libsyntax
This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes.
2017-05-16 17:31:50 -06:00
Andre Bogus
a9c163ebe9
Fix some clippy warnings in libsyntax
...
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-12 20:05:39 +02:00
Nick Cameron
fb7ba4772c
Pass crate attributes in visit.rs
2017-05-12 07:15:29 +12:00
Michael Woerister
39ffea31df
Implement a file-path remapping feature in support of debuginfo and reproducible builds.
2017-04-26 15:44:02 +02:00
Michael Woerister
c47cdc0d93
Introduce HashStable trait and base ICH implementations on it.
...
This initial commit provides implementations for HIR, MIR, and
everything that also needs to be supported for those two.
2017-04-06 16:01:51 +02:00
Jeffrey Seyfried
212b6c2550
Refactor out ast::ItemKind::MacroDef.
2017-03-10 08:08:32 -08:00
Jeffrey Seyfried
0d554139ad
Fix fallout in unit tests.
2017-03-03 02:15:39 +00:00
Jeffrey Seyfried
f6eaaf350e
Integrate TokenStream.
2017-03-03 02:15:37 +00:00
Jeffrey Seyfried
2dc60b1180
Refactor TokenStream.
2017-01-22 21:37:38 +00:00
Oliver Schneider
5e51edb0de
annotate stricter lifetimes on LateLintPass methods to allow them to forward to a Visitor
2016-12-06 11:28:51 +01:00
Jeffrey Seyfried
a8e86f0f81
Fix fallout in rustdoc and tests.
2016-11-21 12:16:46 +00:00
Jeffrey Seyfried
e85a0d70b8
Use Symbol instead of InternedString in the AST, HIR, and various other places.
2016-11-21 09:00:55 +00:00
Jeffrey Seyfried
d2f8fb0a0a
Move syntax::util::interner -> syntax::symbol, cleanup.
2016-11-20 23:40:20 +00:00
Mark-Simulacrum
7bbebb1f54
Change implementation of syntax::util::SmallVector to use data_structures::SmallVec.
2016-11-11 07:38:48 -07:00
Eduard Burtescu
49772fbf5d
syntax: don't fake a block around closures' bodies during parsing.
2016-11-10 01:44:45 +02:00
iirelu
e593c3b893
Changed most vec! invocations to use square braces
...
Most of the Rust community agrees that the vec! macro is clearer when
called using square brackets [] instead of regular brackets (). Most of
these ocurrences are from before macros allowed using different types of
brackets.
There is one left unchanged in a pretty-print test, as the pretty
printer still wants it to have regular brackets.
2016-10-31 22:51:40 +00:00
Jeffrey Seyfried
cbd24757eb
Move CrateConfig from Crate to ParseSess.
2016-10-29 07:52:58 +00:00
Nicholas Nethercote
3fd90d8aa5
Use SmallVector for TtReader::stack.
...
This avoids 800,000 heap allocations when compiling html5ever. It
requires tweaking `SmallVector` a little.
2016-10-25 11:48:25 +11:00
Vadim Petrochenkov
6d062809cb
Get rid of double indirection in string interner by using Rc<str>
2016-10-13 01:15:33 +03:00
Jeffrey Seyfried
3af0c6572e
Refactor code out of the folder implementation for StripUnconfigured.
2016-09-07 22:12:30 +00:00
Jeffrey Seyfried
060b5c5ef2
Factor the RefCell out of the Interner.
2016-07-11 22:25:08 +00:00
Jeffrey Seyfried
1eb6d0b485
Remove Interner<T> and rename StrInterner to Interner.
2016-07-11 22:16:00 +00:00