about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2014-07-04new_mark -> apply_mark, new_rename -> apply_renameJohn Clements-29/+29
2014-07-04add PatIdentRenamerJohn Clements-6/+37
2014-07-04move RenameList to mtwt, add new_renames abstractionJohn Clements-23/+40
2014-07-04comments, whitespace, rename NameFinderContext to PatIdentFinderJohn Clements-25/+27
2014-07-03simplify and uncomment item-fn-arg hygiene unit testJohn Clements-9/+6
2014-07-03Simplify creating a parser from a token treePiotr Jawniak-31/+11
Closes #15306
2014-07-03Fix spelling errors.Joseph Crail-3/+3
2014-07-03Fix ICE with nested macro_rules!-style macrosKevin Ballard-2/+2
Fixes #10536.
2014-07-03Simplify PatIdent to contain an Ident rather than a PathJohn Clements-97/+63
Rationale: for what appear to be historical reasons only, the PatIdent contains a Path rather than an Ident. This means that there are many places in the code where an ident is artificially promoted to a path, and---much more problematically--- a bunch of elements from a path are simply thrown away, which seems like an invitation to some really nasty bugs. This commit replaces the Path in a PatIdent with a SpannedIdent, which just contains an ident and a span.
2014-07-01rustc: Remove `&str` indexing from the language.Brian Anderson-3/+3
Being able to index into the bytes of a string encourages poor UTF-8 hygiene. To get a view of `&[u8]` from either a `String` or `&str` slice, use the `as_bytes()` method. Closes #12710. [breaking-change]
2014-06-29Implement RFC#28: Add PartialOrd::partial_cmpSteven Fackler-5/+99
I ended up altering the semantics of Json's PartialOrd implementation. It used to be the case that Null < Null, but I can't think of any reason for an ordering other than the default one so I just switched it over to using the derived implementation. This also fixes broken `PartialOrd` implementations for `Vec` and `TreeMap`. RFC: 0028-partial-cmp
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-5/+5
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-28auto merge of #15208 : alexcrichton/rust/snapshots, r=pcwaltonbors-4/+12
This change registers new snapshots, allowing `*T` to be removed from the language. This is a large breaking change, and it is recommended that if compiler errors are seen that any FFI calls are audited to determine whether they should be actually taking `*mut T`.
2014-06-28Rename all raw pointers as necessaryAlex Crichton-3/+7
2014-06-28auto merge of #15191 : pcwalton/rust/variance-in-trait-matching, r=huonwbors-1/+2
I believe that #5781 got fixed by the DST work. It duplicated the variance inference work in #12828. Therefore, all that is left in #5781 is adding a test. Closes #5781. r? @huonw
2014-06-28librustc: Match trait self types exactly.Patrick Walton-1/+2
This can break code that looked like: impl Foo for Box<Any> { fn f(&self) { ... } } let x: Box<Any + Send> = ...; x.f(); Change such code to: impl Foo for Box<Any> { fn f(&self) { ... } } let x: Box<Any> = ...; x.f(); That is, upcast before calling methods. This is a conservative solution to #5781. A more proper treatment (see the xfail'd `trait-contravariant-self.rs`) would take variance into account. This change fixes the soundness hole. Some library changes had to be made to make this work. In particular, `Box<Any>` is no longer showable, and only `Box<Any+Send>` is showable. Eventually, this restriction can be lifted; for now, it does not prove too onerous, because `Any` is only used for propagating the result of task failure. This patch also adds a test for the variance inference work in #12828, which accidentally landed as part of DST. Closes #5781. [breaking-change]
2014-06-28auto merge of #15233 : jbclements/rust/match-var-hygiene-etc, r=cmrbors-155/+232
This PR includes two big things and a bunch of little ones. 1) It enables hygiene for variables bound by 'match' expressions. 2) It fixes a bug discovered indirectly (#15221), wherein fold traversal failed to visit nonterminal nodes. 3) It fixes a small bug in the macro tutorial. It also adds tests for the first two, and makes a bunch of small comment improvements and cleanup.
2014-06-27comments onlyJohn Clements-1/+3
2014-06-27adjust fold to fold over interpolated items/exprs/etc.John Clements-19/+70
Closes #15221
2014-06-27removed incomplete commentJohn Clements-17/+0
as written, I don't believe this comment was helpful; I think it's better just to steer the reader toward a general understanding of hygiene.
2014-06-27added unit and standalone test for 15221, extra debugging outputJohn Clements-5/+26
2014-06-27undo helpful attempt to spell-checkJohn Clements-1/+1
Yes, that word is spelled \'memoization\'
2014-06-27remove trailing whitespaceJohn Clements-1/+1
2014-06-27hygiene for match-bound vars now implementedJohn Clements-24/+33
Closes #9384
2014-06-27improve match test case to include guardJohn Clements-4/+4
2014-06-27remove unnecessary abstractionJohn Clements-10/+5
2014-06-27cleanup and shiny new more-functional interfaceJohn Clements-55/+36
2014-06-27WIP match hygiene, compilesJohn Clements-12/+12
2014-06-27get rid of needless wrapper functionJohn Clements-14/+8
2014-06-27make fold_attribute part of Folder traitJohn Clements-23/+25
2014-06-27working on hygieneJohn Clements-12/+51
2014-06-26Remove unnecessary to_string callsPiotr Jawniak-32/+26
This commit removes superfluous to_string calls from various places
2014-06-25don't expand subexprs of for loop, just re-expand whole thing.John Clements-5/+6
Fixes #15167
2014-06-25remove misleading and unnecessary underscoresJohn Clements-2/+3
2014-06-25remove unneccessary pubs, shorten namesJohn Clements-9/+9
2014-06-25remove unneeded visit_ty methodsJohn Clements-9/+0
2014-06-25add unit test for match var hygieneJohn Clements-0/+12
2014-06-25enrich and rename crate_idents test caseJohn Clements-6/+12
2014-06-25comments onlyJohn Clements-4/+9
2014-06-25revive old commented-out test cases as ignored test cases for hygieneJohn Clements-6/+59
2014-06-25Register new snapshotsAlex Crichton-1/+5
This change starts denying `*T` in the parser. All code using `*T` should ensure that the FFI call does indeed take `const T*` on the other side before renaming the type to `*const T`. Otherwise, all code can rename `*T` to `*const T`. [breaking-change]
2014-06-25auto merge of #15160 : alexcrichton/rust/remove-f128, r=brsonbors-11/+1
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-24Make parse_expr_res publicKeegan McAllister-1/+1
2014-06-24Allow splicing more things in quotesKeegan McAllister-0/+16
2014-06-24Use macros to implement syntax::ext::quote::ToSourceKeegan McAllister-125/+74
This code deserves a bigger refactor, but here's a local improvement.
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-40/+23
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-24Remove the quad_precision_float feature gateAlex Crichton-11/+1
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-24auto merge of #15118 : stepancheg/rust/concat, r=alexcrichtonbors-2/+5
(And in other extensions implemented with `get_exprs_from_tts` function).
2014-06-24auto merge of #14963 : w3ln4/rust/master, r=alexcrichtonbors-1/+2
The aim of these changes is not working out a generic bi-endianness architectures support but to allow people develop for little endian MIPS machines (issue #7190).
2014-06-24Added Mipsel architecture supportPawel Olzacki-1/+2