about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
AgeCommit message (Collapse)AuthorLines
2015-02-27obsolete `|&:|` syntaxJorge Aparicio-1/+0
closes #22881
2015-02-24Implement `<T>::method` UFCS expression syntax.Eduard Burtescu-16/+54
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-4/+3
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-1/+1
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-20Remove remaining uses of `[]`. This time I tried to use deref coercions ↵Niko Matsakis-1/+1
where possible.
2015-02-20make span on obsolete syntax very preciseNiko Matsakis-1/+2
2015-02-20Addressed PR commentsMarvin Löbel-1/+1
2015-02-19Fix issue #22426 #22447bombless-0/+3
2015-02-18Round 3 test fixes and conflictsAlex Crichton-23/+23
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-46/+44
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-40/+40
2015-02-18Declare `&foo[]` to be obsolete syntax. Modify the obsolete mechanism toNiko Matsakis-5/+4
support warnings.
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-5/+4
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-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-22/+51
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-09Accept quantification of lifetimes outside the self type in where clauses.Nick Cameron-5/+28
Closes #20022
2015-02-06Libsyntax has been updatedGuillaumeGomez-4/+3
2015-02-06Replace the get method by the deref one on InternedStringGuillaumeGomez-3/+4
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-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-2/+2
2015-02-04register snapshotsJorge Aparicio-5/+3
2015-02-04Implement `..` syntax for RangeFull as expressionUlrik Sverdrup-19/+14
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-03Update for new snapshot after rebasing.Niko Matsakis-1/+1
2015-02-03Remove the explicit closure kind syntax from the parser and AST;Niko Matsakis-29/+33
upgrade the inference based on expected type so that it is able to infer the fn kind in isolation even if the full signature is not available (and we could perhaps do better still in some cases, such as extracting just the types of the arguments but not the return value).
2015-02-02rollup merge of #21845: Potpourri/import-syntaxAlex Crichton-3/+8
syntax like `use foo::bar::;` and `use foo:: as bar;` should be rejected, see issue #21629
2015-02-02rollup merge of #21830: japaric/for-cleanupAlex Crichton-3/+3
Conflicts: src/librustc/metadata/filesearch.rs src/librustc_back/target/mod.rs src/libstd/os.rs src/libstd/sys/windows/os.rs src/libsyntax/ext/tt/macro_parser.rs src/libsyntax/print/pprust.rs src/test/compile-fail/issue-2149.rs
2015-02-02rollup merge of #21825: kmcallister/ttdelim-spanAlex Crichton-1/+1
2015-02-02rollup merge of #21710: alfie/libsyntaxAlex Crichton-8/+8
Conflicts: src/libsyntax/parse/parser.rs
2015-02-02`for x in xs.into_iter()` -> `for x in xs`Jorge Aparicio-1/+1
Also `for x in option.into_iter()` -> `if let Some(x) = option`
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-2/+2
2015-02-02Omit integer suffix when unnecessaryAlfie John-8/+8
See PR # 21378 for context
2015-02-02Tweak some ‘expected…’ error messagesP1start-56/+61
Fixes #21153.
2015-02-01Reject syntax like `use foo::bar::;` and `use foo:: as bar;` and keywords in ↵Potpourri-3/+8
view path idents
2015-01-31Fix end of TtDelimited spanKeegan McAllister-1/+1
2015-01-30std: Stabilize FromStr and parseAlex Crichton-2/+2
This commits adds an associated type to the `FromStr` trait representing an error payload for parses which do not succeed. The previous return value, `Option<Self>` did not allow for this form of payload. After the associated type was added, the following attributes were applied: * `FromStr` is now stable * `FromStr::Err` is now stable * `FromStr::from_str` is now stable * `StrExt::parse` is now stable * `FromStr for bool` is now stable * `FromStr for $float` is now stable * `FromStr for $integral` is now stable * Errors returned from stable `FromStr` implementations are stable * Errors implement `Display` and `Error` (both impl blocks being `#[stable]`) Closes #15138
2015-01-30Change from core::ops::RangeFull to std::opsNick Cameron-1/+1
2015-01-30Rename FullRange to RangeFullNick Cameron-3/+3
2015-01-30Use absolute path to FullRange, rather than assuming it is in the preludeNick Cameron-4/+17
Closes #21263 [breaking-change] If you are using `core::ops::FullRange` you should change to using `core::ops::RangeFull`
2015-01-28Move return type an associated type of the `Fn*` traits. Mostly this ↵Niko Matsakis-1/+6
involves tweaking things in the compiler that assumed two input types to assume two ouputs; we also have to teach `project.rs` to project `Output` from the unboxed closure and fn traits.
2015-01-26Fallout of io => old_ioAlex Crichton-1/+1
2015-01-26Adjust most comments and messages to not use "unboxed".Eduard Burtescu-1/+1
2015-01-26Remove "unboxed" attribute in code referring to new closures.Eduard Burtescu-18/+15