summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2014-12-01auto merge of #19418 : P1start/rust/unsafe-extern-trait, r=alexcrichtonbors-7/+8
Fixes #19398.
2014-11-30auto merge of #19415 : P1start/rust/error-message-fixes, r=alexcrichtonbors-3/+3
This is the style followed by most other error messages.
2014-11-30allow macro expansions in attributesAlexander Light-0/+6
2014-11-30Allow trailing commas in array patterns and attributesP1start-7/+7
2014-11-30Fix the ordering of `unsafe` and `extern` in methodsP1start-7/+8
This breaks code that looks like this: trait Foo { extern "C" unsafe fn foo(); } impl Foo for Bar { extern "C" unsafe fn foo() { ... } } Change such code to look like this: trait Foo { unsafe extern "C" fn foo(); } impl Foo for Bar { unsafe extern "C" fn foo() { ... } } Fixes #19398. [breaking-change]
2014-11-30Adjust some error messages to start with a lowercase letter and not finish ↵P1start-3/+3
with a full stop
2014-11-30syntax: Make `asm!` clobbers a proper vector.Kang Seonghoon-9/+9
Otherwise `--pretty expanded` diverges.
2014-11-29Replace some verbose match statements with their `if let` equivalent.jfager-108/+54
No semantic changes, no enabling `if let` where it wasn't already enabled.
2014-11-29Fix rustc panic on second compile_inputMurarth-0/+21
2014-11-29fix expand_quote_ty function as parse_ty was changed and needs no arguments nowJauhien Piatlicki-2/+1
2014-11-27auto merge of #19343 : sfackler/rust/less-special-attrs, r=alexcrichtonbors-1/+0
Descriptions and licenses are handled by Cargo now, so there's no reason to keep these attributes around.
2014-11-26rollup merge of #19329: steveklabnik/doc_style_cleanup2Alex Crichton-64/+31
2014-11-26/*! -> //!Steve Klabnik-64/+31
Sister pull request of https://github.com/rust-lang/rust/pull/19288, but for the other style of block doc comment.
2014-11-26Test fixes and rebase conflictsAlex Crichton-6/+6
2014-11-26rollup merge of #19326: huonw/safer-syntaxAlex Crichton-89/+17
This makes it correct (e.g. avoiding null pointers) and safe.
2014-11-26rollup merge of #19298: nikomatsakis/unboxed-closure-parse-the-plusAlex Crichton-166/+146
Implements RFC 438. Fixes #19092. This is a [breaking-change]: change types like `&Foo+Send` or `&'a mut Foo+'a` to `&(Foo+Send)` and `&'a mut (Foo+'a)`, respectively. r? @brson
2014-11-26rollup merge of #19288: steveklabnik/doc_style_cleanupAlex Crichton-23/+15
This is considered good convention. This is about half of them in total, I just don't want an impossible to land patch. :smile:
2014-11-26Remove special casing for some meta attributesSteven Fackler-1/+0
Descriptions and licenses are handled by Cargo now, so there's no reason to keep these attributes around.
2014-11-26auto merge of #19176 : aturon/rust/stab-iter, r=alexcrichtonbors-6/+5
This is an initial pass at stabilizing the `iter` module. The module is fairly large, but is also pretty polished, so most of the stabilization leaves things as they are. Some changes: * Due to the new object safety rules, various traits needs to be split into object-safe traits and extension traits. This includes `Iterator` itself. While splitting up the traits adds some complexity, it will also increase flexbility: once we have automatic impls of `Trait` for trait objects over `Trait`, then things like the iterator adapters will all work with trait objects. * Iterator adapters that use up the entire iterator now take it by value, which makes the semantics more clear and helps catch bugs. Due to the splitting of Iterator, this does not affect trait objects. If the underlying iterator is still desired for some reason, `by_ref` can be used. (Note: this change had no fallout in the Rust distro except for the useless mut lint.) * In general, extension traits new and old are following an [in-progress convention](rust-lang/rfcs#445). As such, they are marked `unstable`. * As usual, anything involving closures is `unstable` pending unboxed closures. * A few of the more esoteric/underdeveloped iterator forms (like `RandomAccessIterator` and `MutableDoubleEndedIterator`, along with various unfolds) are left experimental for now. * The `order` submodule is left `experimental` because it will hopefully be replaced by generalized comparison traits. * "Leaf" iterators (like `Repeat` and `Counter`) are uniformly constructed by free fns at the module level. That's because the types are not otherwise of any significance (if we had `impl Trait`, you wouldn't want to define a type at all). Closes #17701 Due to renamings and splitting of traits, this is a: [breaking-change]
2014-11-26Rote changes due to the fact that ast paths no longer carry this extraneous ↵Niko Matsakis-48/+40
bounds.
2014-11-26Fixup various places that were doing `&T+'a` and do `&(T+'a)`Niko Matsakis-1/+1
2014-11-26Implement the new parsing rules for types in the parser, modifying the AST ↵Niko Matsakis-117/+105
appropriately.
2014-11-26auto merge of #19262 : murarth/rust/module-path-fix, r=jakub-bors-2/+9
Closes #18859
2014-11-26auto merge of #19252 : japaric/rust/cow, r=aturonbors-6/+6
- Add `IntoCow` trait, and put it in the prelude - Add `is_owned`/`is_borrowed` methods to `Cow` - Add `CowString`/`CowVec` type aliases (to `Cow<'_, String, str>`/`Cow<'_, Vec, [T]>` respectively) - `Cow` implements: `Show`, `Hash`, `[Partial]{Eq,Ord}` - `impl BorrowFrom<Cow<'a, T, B>> for B` [breaking-change]s: - `IntoMaybeOwned` has been removed from the prelude - libcollections: `SendStr` is now an alias to `CowString<'static>` (it was aliased to `MaybeOwned<'static>`) - libgraphviz: - `LabelText` variants now wrap `CowString` instead of `MaybeOwned` - `Nodes` and `Edges` are now type aliases to `CowVec` (they were aliased to `MaybeOwnedVec`) - libstd/path: `Display::as_maybe_owned` has been renamed to `Display::as_cow` and now returns a `CowString` - These functions now accept/return `Cow` instead of `MaybeOwned[Vector]`: - libregex: `Replacer::reg_replace` - libcollections: `str::from_utf8_lossy` - libgraphviz: `Id::new`, `Id::name`, `LabelText::pre_escaped_content` - libstd: `TaskBuilder::named` r? @aturon
2014-11-25/** -> ///Steve Klabnik-23/+15
This is considered good convention.
2014-11-25Fallout from stabilizationAaron Turon-6/+5
2014-11-26Make syntax::owned_slice a Box<[T]> wrapper.Huon Wilson-89/+17
This makes it correct (e.g. avoiding null pointers) and safe.
2014-11-25Deprecate MaybeOwned[Vector] in favor of CowJorge Aparicio-6/+6
2014-11-24Fixed "::::" appearing in module_path!()Murarth-2/+9
2014-11-24Add `node_to_user_string`, `node_to_string` variant that drops id from output.Felix S. Klock II-26/+33
2014-11-23std: Add a new top-level thread_local moduleAlex Crichton-59/+34
This commit removes the `std::local_data` module in favor of a new `std::thread_local` module providing thread local storage. The module provides two variants of TLS: one which owns its contents and one which is based on scoped references. Each implementation has pros and cons listed in the documentation. Both flavors have accessors through a function called `with` which yield a reference to a closure provided. Both flavors also panic if a reference cannot be yielded and provide a function to test whether an access would panic or not. This is an implementation of [RFC 461][rfc] and full details can be found in that RFC. This is a breaking change due to the removal of the `std::local_data` module. All users can migrate to the new thread local system like so: thread_local!(static FOO: Rc<RefCell<Option<T>>> = Rc::new(RefCell::new(None))) The old `local_data` module inherently contained the `Rc<RefCell<Option<T>>>` as an implementation detail which must now be explicitly stated by users. [rfc]: https://github.com/rust-lang/rfcs/pull/461 [breaking-change]
2014-11-23rollup merge of #19215: aochagavia/prettyJakub Bukaj-21/+16
Closes https://github.com/rust-lang/rust/issues/19077 I would appreciate any guidance on how to write a test for this. I saw some examples in `test/pretty`, but there are different ways to test... With or without `.pp` files, with a `pp-exact` comment, etc.
2014-11-23rollup merge of #19211: aochagavia/tuple-indexJakub Bukaj-66/+30
This breaks code like ``` let t = (42i, 42i); ... t.0::<int> ...; ``` Change this code to not contain an unused type parameter. For example: ``` let t = (42i, 42i); ... t.0 ...; ``` Closes https://github.com/rust-lang/rust/issues/19096 [breaking-change] r? @aturon
2014-11-23auto merge of #19158 : jakub-/rust/issue-14091, r=alexcrichtonbors-33/+45
Closes #14091. Closes #19195.
2014-11-23Remove type parameters from ExprField and ExprTupFieldAdolfo Ochagavía-51/+23
2014-11-23libsyntax: Forbid type parameters in tuple indicesAdolfo Ochagavía-16/+8
This breaks code like ``` let t = (42i, 42i); ... t.0::<int> ...; ``` Change this code to not contain an unused type parameter. For example: ``` let t = (42i, 42i); ... t.0 ...; ``` Closes https://github.com/rust-lang/rust/issues/19096 [breaking-change]
2014-11-22Fix pretty printing unsafe match armsAdolfo Ochagavía-21/+16
2014-11-22auto merge of #19132 : sinistersnare/rust/patch-1, r=alexcrichtonbors-2/+2
Just used Githubs edit view, so I hope this works...
2014-11-22auto merge of #19122 : Kintaro/rust/remove_struct_variant, r=jakub-bors-1/+1
The struct_variant is not gated anymore. This commit just removes it and the resulting warnings when compiling rust. Now compiles with the snapshot from 11/18 (as opposed to PR #19014)
2014-11-21unicode: Rename is_XID_start to is_xid_start, is_XID_continue to is_xid_continueBrian Anderson-3/+3
2014-11-21unicode: Add stability attributes to u_charBrian Anderson-2/+2
Free functions deprecated. UnicodeChar experimental pending final decisions about prelude.
2014-11-21core: Convert Char::escape_default, escape_unicode to iteratorsBrian Anderson-3/+5
[breaking-change]
2014-11-21Fix various deprecation warnings from char changesBrian Anderson-3/+3
2014-11-20Remove libnativeAaron Turon-28/+3
With runtime removal complete, there's nothing left of libnative. This commit removes it. Fixes #18687 [breaking-change]
2014-11-20Fix an ICE on diagnostics originating in external macrosJakub Bukaj-33/+45
2014-11-20auto merge of #19071 : huonw/rust/col2column, r=nikomatsakisbors-5/+5
This macro is very rarely used, so there is no need (and it is better) for it to avoid the abbreviation. Closes rust-lang/rfcs#467.
2014-11-20auto merge of #19113 : nikomatsakis/rust/unboxed-boxed-closure-unification, ↵bors-88/+27
r=acrichto Use the expected type to infer the argument/return types of unboxed closures. Also, in `||` expressions, use the expected type to decide if the result should be a boxed or unboxed closure (and if an unboxed closure, what kind). This supercedes PR #19089, which was already reviewed by @pcwalton.
2014-11-20Rename `col!` to `column!`.Huon Wilson-5/+5
This macro is very rarely used, so there is no need (and it is better) for it to avoid the abbreviation. Closes rust-lang/rfcs#467. [breaking-change]
2014-11-20fixed markdown rendering a H1 in commentDavis Silverman-2/+2
2014-11-20removed usage of struct_variant feature as it is no longer gatedSimon Wollwage-1/+1