about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2015-02-28FIX #21475: Interval match patterns won't parse namespace specifiers correctlydefuz-0/+13
2015-02-27obsolete `|&:|` syntaxJorge Aparicio-1/+0
closes #22881
2015-02-24Implement `<T>::method` UFCS expression syntax.Eduard Burtescu-22/+60
2015-02-24syntax: use a single Path for Trait::Item in QPath.Eduard Burtescu-19/+13
2015-02-24syntax: don't use TraitRef in QPath.Eduard Burtescu-4/+4
2015-02-24syntax: don't store a secondary NodeId for TyPath.Eduard Burtescu-5/+4
2015-02-24Auto merge of #21689 - FlaPer87:oibit-send-and-friends, r=nikomatsakisbors-14/+27
This is one more step towards completing #13231 This series of commits add support for default trait implementations. The changes in this PR don't break existing code and they are expected to preserve the existing behavior in the compiler as far as built-in bounds checks go. The PR adds negative implementations of `Send`/`Sync` for some types and it removes the special cases for `Send`/`Sync` during the trait obligations checks. That is, it now fully relies on the traits check rather than lang items. Once this patch lands and a new snapshot is created, it'll be possible to add default impls for `Send` and `Sync` and remove entirely the use of `BuiltinBound::{BoundSend,BoundSync}` for positive implementations as well. This PR also removes the restriction on negative implementations. That is, it is now possible to add negative implementations for traits other than `Send`/`Sync`
2015-02-23Rollup merge of #22544 - bombless:fix-pattern, r=pnkfelixManish Goregaokar-0/+3
2015-02-22Auto merge of #22466 - Kimundi:str_pattern_ai_safe, r=aturonbors-3/+3
This is not a complete implementation of the RFC: - only existing methods got updated, no new ones added - doc comments are not extensive enough yet - optimizations got lost and need to be reimplemented See https://github.com/rust-lang/rfcs/pull/528 Technically a [breaking-change]
2015-02-22Rename DefTrait to DefaultImplFlavio Percoco-2/+2
2015-02-22Add support for default trait impls in libsyntaxFlavio Percoco-14/+27
2015-02-22Fix errors from #22592Manish Goregaokar-4/+4
2015-02-20Remove remaining uses of `[]`. This time I tried to use deref coercions ↵Niko Matsakis-20/+20
where possible.
2015-02-20make span on obsolete syntax very preciseNiko Matsakis-1/+2
2015-02-20Addressed PR commentsMarvin Löbel-3/+3
2015-02-19Fix issue #22426 #22447bombless-0/+3
2015-02-18Round 3 test fixes and conflictsAlex Crichton-26/+25
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-76/+91
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-65/+66
2015-02-18Declare `&foo[]` to be obsolete syntax. Modify the obsolete mechanism toNiko Matsakis-10/+25
support warnings.
2015-02-18rollup merge of #22497: nikomatsakis/suffixesAlex Crichton-4/+6
Conflicts: src/librustc_trans/trans/tvec.rs
2015-02-18For now, accept the `i`, `u`, `is`, and `us` suffixes, but warn whenNiko Matsakis-11/+4
they are used without a feature-gate. This is both kinder to existing code and should make it easier to land this PR, since we don't have to catch EVERY SINGLE SUFFIX.
2015-02-18Modify parser to require `isize`/`usize` suffixes.Niko Matsakis-4/+13
2015-02-18Remove usage of .map(|&foo| foo)Kevin Butler-1/+1
2015-02-18Opt for .cloned() over .map(|x| x.clone()) etc.Kevin Butler-7/+6
2015-02-15Rollup merge of #22285 - kmcallister:pub-macro, r=nick29581Manish Goregaokar-0/+18
It's not clear what this means, because a macro in item position can expand to zero or more items. For now we disallow it, which is technically a [breaking-change] but is landing without an RFC. The `pub` keyword previously had no effect, which seems quite unintended. Fixes #18317. Fixes #14660.
2015-02-15Rollup merge of #22339 - petrochenkov:int, r=huonwManish Goregaokar-1/+1
Some function signatures have changed, so this is a [breaking-change]. In particular, radixes and numerical values of digits are represented by `u32` now. Part of #22240
2015-02-15Fix the falloutVadim Petrochenkov-1/+1
2015-02-14Auto merge of #22158 - Kimundi:the_lonely_uppercase_keyword, r=pnkfelixbors-25/+59
It is only allowed in paths now, where it will either work inside a `trait` or `impl` item, or not resolve outside of it. [breaking-change] Closes #22137
2015-02-13Forbid `pub mymacro!();`Keegan McAllister-0/+18
It's not clear what this means, because a macro in item position can expand to zero or more items. For now we disallow it, which is technically a [breaking-change] but is landing without an RFC. The `pub` keyword previously had no effect, which seems quite unintended. Fixes #18317. Fixes #14660.
2015-02-12Made `Self` a keyword.Marvin Löbel-25/+59
It is only allowed in paths now, where it will either work inside a `trait` or `impl` item, or not resolve outside of it. [breaking-change] Closes #22137
2015-02-10rollup merge of #21918: ranma42/replace-beAlex Crichton-1/+1
Conflicts: src/test/compile-fail/reserved-be.rs src/test/compile-fail/reserved-become.rs src/test/parse-fail/reserved-be.rs
2015-02-09Accept quantification of lifetimes outside the self type in where clauses.Nick Cameron-5/+28
Closes #20022
2015-02-07Auto merge of #21505 - GuillaumeGomez:interned_string, r=alexcrichtonbors-13/+8
It's in order to make the code more homogeneous.
2015-02-06librustdoc has been updatedGuillaumeGomez-4/+4
Fixes run build error Fix test failure Fix tests' errors
2015-02-07Rollup merge of #22005 - nagisa:obsolete-ctx, r=alexcrichtonManish Goregaokar-3/+3
The word is repeated twice in the message like: error: obsolete syntax: `:`, `&mut:`, or `&:` syntax This removes the word syntax that appears in messages after the second colon (:).
2015-02-06Remove word syntax from obsolete syntax messagesSimonas Kazlauskas-3/+3
The word is repeated twice in the message like error: obsolete syntax: `:`, `&mut:`, or `&:` syntax This removes the word syntax that appears in messages after the second colon (:).
2015-02-06Fix infinite loop errorGuillaumeGomez-1/+1
2015-02-06Update to last version, remove "[]" as much as possibleGuillaumeGomez-1/+1
2015-02-06Libsyntax has been updatedGuillaumeGomez-5/+4
2015-02-06Replace the get method by the deref one on InternedStringGuillaumeGomez-17/+5
2015-02-06Add Str trait to InternedString, set get method deprecatedGuillaumeGomez-0/+8
2015-02-06Rollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnikManish Goregaokar-1/+1
The spelling corrections were made in both documentation comments and regular comments.
2015-02-06Rollup merge of #21980 - pnkfelix:more-robust-span-to-snippet, r=huonwManish Goregaokar-2/+2
This can be considered partial work on #8256. The main observable change: macro expansion sometimes results in spans where `lo > hi`; so for now, when we have such a span, do not attempt to return a snippet result. (Longer term, we might think about whether we could still present a snippet for the cases where this arises, e.g. perhaps by showing the whole macro as the snippet, assuming that is the sole cause of such spans; or by somehow looking up the closest AST node that holds both `lo` and `hi`, and showing that.) As a drive-by, revised the API to return a `Result` rather than an `Option`, with better information-packed error value that should help us (and maybe also our users) identify the causes of such problems in the future. Ideally the call-sites that really want an actual snippet would be updated to catch the newly added `Err` case and print something meaningful about it, but that is not part of this PR.
2015-02-06Auto merge of #21947 - bluss:full-range-syntax, r=brsonbors-19/+14
Implement step 1 of rust-lang/rfcs#702 Allows the expression `..` (without either endpoint) in general, can be used in slicing syntax `&expr[..]` where we previously wrote `&expr[]`. The old syntax &expr[] is not yet removed or warned for.
2015-02-05make codemap more robust in face of ill-formed spans.Felix S. Klock II-2/+2
This can be considered partial work on #8256. The main observable change: macro expansion sometimes results in spans where `lo > hi`; so for now, when we have such a span, do not attempt to return a snippet result. (Longer term, we might think about whether we could still present a snippet for the cases where this arises, e.g. perhaps by showing the whole macro as the snippet, assuming that is the sole cause of such spans; or by somehow looking up the closest AST node that holds both `lo` and `hi`, and showing that.) As a drive-by, revised the API to return a `Result` rather than an `Option`, with better information-packed error value that should help us (and maybe also our users) identify the causes of such problems in the future. Ideally the call-sites that really want an actual snippet would be updated to catch the newly added `Err` case and print something meaningful about it, but that is not part of this PR.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-11/+11
2015-02-04Fix for misspelled comments.Joseph Crail-1/+1
The spelling corrections were made in both documentation comments and regular comments.
2015-02-04register snapshotsJorge Aparicio-5/+3
2015-02-04remove all kind annotations from closuresJorge Aparicio-5/+5