| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
first step towards issue #1273
|
|
It is only a way to flag an alt as intentionally non-exhaustive right now.
Issue #1679
|
|
|
|
|
|
|
|
|
|
Closes #1728
Comments out a section of debuginfo.rs. This code was already broken
(only being called when --xg was passed, and only working on trivial
programs).
|
|
This allows a 'Name:' to appear in front of an iface declaration's
name, which will cause 'Name' to refer to the self type (with the same
number of type parameters as the iface has) in the method signatures
of the iface. For example:
iface F: functor<A> {
fn fmap<B>(f: fn(A) -> B) -> F<B>;
}
Issue #1718
|
|
|
|
Added class support to the parser, prettyprinter, fold, and visit.
(See Issue 1726.)
This is WIP -- the test case is xfailed, and attempting to compile
it will error out in resolve.
|
|
|
|
|
|
|
|
|
|
Issue #1673
|
|
`expr_ternary`, `ternary_to_if`, and all parses & lexer definitions have
been removed.
|
|
Removes a bunch of (eventually) unused arguments. Makes span passing to debuginfo
explicit, instead of relying on the (usually incorrect) spans held in the contexts.
Closes #1439
|
|
|
|
This should reduce confusion of people trying to read the code.
|
|
This involved changing the prototype for the callbacks to thread the
span though. A wrapper function, fold::wrap, can be used to wrap the
old style callbacks.
|
|
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)
|
|
Does what it says on the tin.
The next commit will remove support for this syntax.
|
|
This commit allows patterns like:
alt x { some(_) { ... } none { } }
without the '.' after none. The parser suspends judgment about
whether a bare ident is a tag or a new bound variable; instead,
the resolver disambiguates.
This means that any code after resolution that pattern-matches on
patterns needs to call pat_util::normalize_pat, which consults
an environment to do this disambiguation.
In addition, local variables are no longer allowed to shadow
tag names, so this required changing some code (e.g. renaming
variables named "mut", and renaming ast::sub to subtract).
The parser currently accepts patterns with and without the '.'.
Once the compiler and libraries are changed, it will no longer
accept the '.'.
|
|
Remove disr_val from ast::variant_ and always use ty::variant_info
when the value is needed. Move what was done during parsing into
other passes, primary typeck.rs. This move also correctly type checks
the disr. value expression; thus, fixing rustc --pretty=typed when
disr. values are used.
|
|
Removes the obj system from the compiler.
Closes #1484
|
|
|
|
|
|
Addresses issue #1393.
For now disallow disr. values unless all variants use nullary
contractors (i.e. "enum-like").
Disr. values are now encoded in the crate metadata, but only when it
will differ from the inferred value based on the order.
|
|
|
|
this will address the (crashing) new test added.
|
|
The (temporary) syntax is
iface seq<T> {
fn len() -> uint;
fn iter(f: block(T));
}
// The 'blah<T>' can be left of to default the name of the
// impl to seq<T>. The 'of seq<T>' can be left off when
// not implementing a named interface.
impl blah<T> of seq<T> for [T] {
fn len() -> uint { vec::len(self) }
fn iter(f: block(T)) { for x in self { f(x); } }
}
|
|
See issue #1374
|
|
As a preparation to removing some duplication in typeck.
|
|
that parses that expr, prepare for snapshot.
|
|
|
|
This way, you can explicitly provide type parameters when calling a
generic method.
Issue #1227
|
|
|
|
Something will still have to be done to the AST to make it possible to
say `x.foo::<int>()`, since currently field access never allows type
parameters.
Issue #1227
|
|
Move the name of the bundle to the front, allow type parameters (not
handled yet), and add a 'for' keyword:
impl utils for int {
fn str() -> str { int::str(self) }
fn times(f: block()) { ... }
}
|
|
Get rid of expr_self_call, introduces def_self. `self` is now,
syntactically, simply a variable. A method implicitly brings a `self`
binding into scope.
Issue #1227
|
|
Issue #1227
|
|
|
|
|
|
See src/test/run-pass/nested-patterns.rs for some examples. The syntax is
boundvar@subpattern
Which will match the subpattern as usual, but also bind boundvar to the
whole matched value.
Closes #838
|
|
|
|
It seems inefficient to copy them around. Let's measure whether that's actually
> the case
|