about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2014-04-14auto merge of #13496 : alexcrichton/rust/issue-13495, r=sfacklerbors-5/+2
This bug was introduced in #13384 by accident, and this commit continues the work of #13384 by finishing support for loading a syntax extension crate without registering it with the local cstore. Closes #13495
2014-04-13rustc: Don't link in syntax extensionsAlex Crichton-5/+2
This bug was introduced in #13384 by accident, and this commit continues the work of #13384 by finishing support for loading a syntax extension crate without registering it with the local cstore. Closes #13495
2014-04-13auto merge of #13452 : Ryman/rust/fix_uint_as_u, r=alexcrichtonbors-24/+36
Fixes #13359.
2014-04-13libsyntax: update helper to stringify TyU* and TyI* to take into account ↵Kevin Butler-24/+36
having a value. Fixes #13359.
2014-04-11syntax: remove ast::Sigil.Eduard Burtescu-78/+52
2014-04-10auto merge of #13440 : huonw/rust/strbuf, r=alexcrichtonbors-75/+118
libstd: Implement `StrBuf`, a new string buffer type like `Vec`, and port all code over to use it. Rebased & tests-fixed version of https://github.com/mozilla/rust/pull/13269
2014-04-10Renamed ast::Purity to ast::FnStyle and ast::ImpureFn to ast::NormalFn and ↵Kasey Carrothers-72/+72
updated associated variable and function names.
2014-04-10std,syntax: make std::fmt::parse use `Vec`s.Huon Wilson-4/+4
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-75/+118
port all code over to use it.
2014-04-08Test fixes from rollupAlex Crichton-8/+0
Closes #13394 (sync: remove unsafe and add Send+Share to Deref (enabled by autoderef vtables)) Closes #13389 (Made libflate functions return Options instead of outright failing) Closes #13388 (doc: Document flavorful variations of paths) Closes #13387 (Register new snapshots) Closes #13386 (std: Add more docs for ptr mod) Closes #13384 (Tweak crate loading to load less metadata) Closes #13382 (fix ~ZeroSizeType rvalues) Closes #13378 (Update tidy script, replace XXX with FIXME) Closes #13377 (std: User a smaller stdin buffer on windows) Closes #13369 (Fix spelling errors in comments.) Closes #13314 (Made 'make install' include libs for additional targets) Closes #13278 (std: make vec!() macro handle a trailing comma) Closes #13276 (Add test for #11881)
2014-04-08rustc: Never register syntax crates in CStoreAlex Crichton-7/+6
When linking, all crates in the local CStore are used to link the final product. With #[phase(syntax)], crates want to be omitted from this linkage phase, and this was achieved by dumping the entire CStore after loading crates. This causes crates like the standard library to get loaded twice. This loading process is a fairly expensive operation when dealing with decompressing metadata. This commit alters the loading process to never register syntax crates in CStore. Instead, only phase(link) crates ever make their way into the map of crates. The CrateLoader trait was altered to return everything in one method instead of having separate methods for finding information.
2014-04-08Register new snapshotsAlex Crichton-36/+21
2014-04-06auto merge of #13165 : sfackler/rust/io-vec, r=alexcrichtonbors-6/+7
`Reader`, `Writer`, `MemReader`, `MemWriter`, and `MultiWriter` now work with `Vec<u8>` instead of `~[u8]`. This does introduce some extra copies since `from_utf8_owned` isn't usable anymore, but I think that can't be helped until `~str`'s representation changes.
2014-04-06De-~[] Reader and WriterSteven Fackler-6/+7
There's a little more allocation here and there now since from_utf8_owned can't be used with Vec.
2014-04-06auto merge of #13315 : alexcrichton/rust/libc, r=alexcrichton,mebors-0/+2
Rebasing of #12526 with a very obscure bug fixed on windows.
2014-04-06syntax: Tweak parsing lifetime bounds on closuresAlex Crichton-137/+133
In summary these are some example transitions this change makes: 'a || => ||: 'a proc:Send() => proc():Send The intended syntax for closures is to put the lifetime bound not at the front but rather in the list of bounds. Currently there is no official support in the AST for bounds that are not 'static, so this case is currently specially handled in the parser to desugar to what the AST is expecting. Additionally, this moves the bounds on procedures to the correct position, which is after the argument list. The current grammar for closures and procedures is: procedure := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')' [ ':' bound-list ] [ '->' type ] closure := [ 'unsafe' ] ['<' lifetime-list '>' ] '|' arg-list '|' [ ':' bound-list ] [ '->' type ] lifetime-list := lifetime | lifetime ',' lifetime-list arg-list := ident ':' type | ident ':' type ',' arg-list bound-list := bound | bound '+' bound-list bound := path | lifetime This does not currently handle the << ambiguity in `Option<<'a>||>`, I am deferring that to a later patch. Additionally, this removes the support for the obsolete syntaxes of ~fn and &fn. Closes #10553 Closes #10767 Closes #11209 Closes #11210 Closes #11211
2014-04-04auto merge of #13284 : pnkfelix/rust/more-fs-info-on-crate-mismatch, ↵bors-8/+42
r=alexcrichton Fix #13266. There is a little bit of acrobatics in the definition of `crate_paths` to avoid calling `clone()` on the dylib/rlib unless we actually are going to need them. The other oddity is that I have replaced the `root_ident: Option<&str>` parameter with a `root: &Option<CratePaths>`, which may surprise one who was expecting to see something like: `root: Option<&CratePaths>`. I went with the approach here because I could not come up with code for the alternative that was acceptable to the borrow checker.
2014-04-05Added session.fileline_note() method and support infrastucture for it.Felix S. Klock II-8/+42
Add way to print notes with just file:linenum prefix (preserving integration with source lookup for e.g. vi and emacs) but don't repeat the other span info.
2014-04-04Test fixes from rollupAlex Crichton-4/+4
2014-04-04Register new snapshotsAlex Crichton-2/+0
2014-04-04syntax: remove obsolete mutability from ExprVec and ExprRepeat.Eduard Burtescu-24/+15
2014-04-04Fix fallout from std::libc separationCorey Richardson-0/+2
2014-04-03auto merge of #13296 : brson/rust/0.11-pre, r=alexcrichtonbors-1/+1
This also changes some of the download links in the documentation to 'nightly'.
2014-04-03auto merge of #13237 : alexcrichton/rust/private-tuple-structs, r=brsonbors-9/+9
This is the final commit need to implement [RFC #4](https://github.com/rust-lang/rfcs/blob/master/active/0004-private-fields.md), it makes all tuple struct fields private by default, overridable with the `pub` keyword. I'll note one divergence from the original RFC which is outlined in the first commit.
2014-04-03auto merge of #13290 : alexcrichton/rust/rollup, r=alexcrichtonbors-348/+100
Closes #13285 (rustc: Stop using LLVMGetSectionName) Closes #13280 (std: override clone_from for Vec.) Closes #13277 (serialize: add a few missing pubs to base64) Closes #13275 (Add and remove some ignore-win32 flags) Closes #13273 (Removed managed boxes from libarena.) Closes #13270 (Minor copy-editing for the tutorial) Closes #13267 (fix Option<~ZeroSizeType>) Closes #13265 (Update emacs mode to support new `#![inner(attribute)]` syntax.) Closes #13263 (syntax: Remove AbiSet, use one Abi)
2014-04-03Test fixes from the rollupAlex Crichton-8/+8
2014-04-03Bump version to 0.11-preBrian Anderson-1/+1
This also changes some of the download links in the documentation to 'nightly'.
2014-04-03auto merge of #13286 : alexcrichton/rust/release, r=brsonbors-1/+1
Merging the 0.10 release into the master branch.
2014-04-03syntax: Remove AbiSet, use one AbiAlex Crichton-348/+100
This change removes the AbiSet from the AST, converting all usage to have just one Abi value. The current scheme selects a relevant ABI given a list of ABIs based on the target architecture and how relevant each ABI is to that architecture. Instead of this mildly complicated scheme, only one ABI will be allowed in abi strings, and pseudo-abis will be created for special cases as necessary. For example the "system" abi exists for stdcall on win32 and C on win64. Closes #10049
2014-04-02Fix fallout of requiring uint indicesAlex Crichton-2/+2
2014-03-31syntax: allow stmt/expr macro invocations to be delimited by [].Gábor Lehel-34/+22
this is useful for macros like vec! which construct containers
2014-03-31Switch some tuple structs to pub fieldsAlex Crichton-3/+3
This commit deals with the fallout of the previous change by making tuples structs have public fields where necessary (now that the fields are private by default).
2014-03-31rustc: Switch tuple structs to have private fieldsAlex Crichton-6/+6
This is a continuation of the work done in #13184 to make struct fields private by default. This commit finishes RFC 4 by making all tuple structs have private fields by default. Note that enum variants are not affected. A tuple struct having a private field means that it cannot be matched on in a pattern match (both refutable and irrefutable), and it also cannot have a value specified to be constructed. Similarly to private fields, switching the type of a private field in a tuple struct should be able to be done in a backwards compatible way. The one snag that I ran into which wasn't mentioned in the RFC is that this commit also forbids taking the value of a tuple struct constructor. For example, this code now fails to compile: mod a { pub struct A(int); } let a: fn(int) -> a::A = a::A; //~ ERROR: first field is private Although no fields are bound in this example, it exposes implementation details through the type itself. For this reason, taking the value of a struct constructor with private fields is forbidden (outside the containing module). RFC: 0004-private-fields
2014-03-31syntax: Switch field privacy as necessaryAlex Crichton-297/+297
2014-03-31Bump version to 0.10Alex Crichton-1/+1
2014-03-31auto merge of #13221 : thestinger/rust/append, r=alexcrichtonbors-29/+14
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-31vec: convert `append` and `append_one` to methodsDaniel Micay-29/+14
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-30Rename `from_iterator` to `from_iter` for consistency.Brian Anderson-3/+3
2014-03-30Removed deprecated functions `map` and `flat_map` for vectors and slices.Marvin Löbel-111/+117
2014-03-29auto merge of #13188 : FlaPer87/rust/master, r=alexcrichtonbors-98/+0
2014-03-28auto merge of #13170 : eddyb/rust/syntax-cleanup, r=alexcrichtonbors-444/+400
Removes all Cell's/RefCell's from lexer::Reader implementations and a couple @.
2014-03-29Register new snapshotFlavio Percoco-98/+0
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-15/+17
Closes #2569
2014-03-28syntax: Accept meta matchers in macrosAlex Crichton-16/+13
This removes the `attr` matcher and adds a `meta` matcher. The previous `attr` matcher is now ambiguous because it doesn't disambiguate whether it means inner attribute or outer attribute. The new behavior can still be achieved by taking an argument of the form `#[$foo:meta]` (the brackets are part of the macro pattern). Closes #13067
2014-03-28Remove a RefCell from pprust::State.Eduard Burtescu-10/+9
2014-03-28De-@ IdentInterner.Eduard Burtescu-8/+10
2014-03-28De-@ NamedMatch.Eduard Burtescu-26/+27
2014-03-28De-@ TokenTree.Eduard Burtescu-17/+26
2014-03-28Used inherited mutability in lexer::Reader.Eduard Burtescu-388/+333
2014-03-28Rename Pod into CopyFlavio Percoco-3/+3
Summary: So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the Pod kind into Copy. RFC: 0003-opt-in-builtin-traits Test Plan: make check Reviewers: cmr Differential Revision: http://phabricator.octayn.net/D3