| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
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 '.'.
|
|
|
|
Removes the obj system from the compiler.
Closes #1484
|
|
Rather, it is now a struct where properties like opts are accessed
directly, and the error-reporting methods are part of a static impl
(with the same name as the type).
|
|
|
|
this will address the (crashing) new test added.
|
|
|
|
Removes some more code duplication.
|
|
|
|
|
|
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
|
|
|
|
Also shuffles around the organization of numeric literals and types,
separating by int/uint/float instead of machine-vs-non-machine types.
This simplifies some code.
Closes #974
Closes #1252
|
|
It seems inefficient to copy them around. Let's measure whether that's actually
> the case
|
|
It's proving too inflexible, so I'm ripping out the extra complexity
in the hope that regions will, at some point, provide something
similar.
Closes #918
|
|
|
|
|
|
The last-use pass now takes input from the alias pass to not mark things
as last uses that are still accessed through a reference.
Issue #925
|
|
This is intended to solve the problem of how to pass arguments to
constructor functions -- you want to move in rvalues, but not have to
explicitly copy stuff that is not an rvalue. The by-copy passing
convention will ensure the callee gets its own copy of the value. For
rvalues, it'll just pass off the value. For lvalues, it'll make a
copy.
Issue #1177
|
|
|
|
It now threads information about invalidated aliases through the AST
properly. This makes it more permissive for conditionals (invalidating
an alias in one branch doesn't prevent you from using it in another),
and less permissive for loops (it now properly notices when a loop
invalidates an alias that it might still use in another iteration).
Closes #1144
|
|
|
|
Remove implicit copying hack.
Closes #1118
|
|
Closes #1055
|
|
This makes it possible to omit the semicolon after the block, and will
cause the pretty-printer to properly print such calls (if
pretty-printing of blocks wasn't so broken). Block calls (with the
block outside of the parentheses) can now only occur at statement
level, and their value can not be used. When calling a block-style
function that returns a useful value, the block must be put insde the
parentheses.
Issue #1054
|
|
Closes #1056
|
|
Now they are both just proto_shared and proto_shared takes an
argument indicating that it is sugared as 'lambda'
|
|
|
|
Issue #1008
|
|
Add sprinkle && throughout the compiler to make it typecheck again.
Issue #1008
|
|
This reverts commit a034f87146e60e1db2327c6f6807c47406a1bb0b.
Conflicts:
src/comp/middle/check_alt.rs
src/comp/middle/trans_alt.rs
src/comp/syntax/ast.rs
src/comp/syntax/ast_util.rs
src/comp/syntax/fold.rs
src/comp/syntax/print/pprust.rs
Conflicts:
src/comp/middle/trans_alt.rs
|
|
|
|
Issue #409
|
|
Issue #409
|
|
This reverts commit ce0f054f9d56df4e60291fc2e1b89ce979cf374f.
|
|
|
|
We were only using it in a single place, and there for no discernable reason
(probably as part of the bare-fn-vals-are-not-copyable plan). It seems more
surprising than useful.
|
|
|
|
It is now 1-based, rather than 0 based. (Seems more natural, and allows 0 to
be used to refer to self and maybe to closure.)
Also allows non-referenced args to be implicitly copied again.
Issue #918
|
|
This allows calls-returning-a-reference to count as expression roots,
making it possible to return the result of such a call by reference.
Issue #918
|
|
Issue #918
|
|
The set of active bindings has to be updated as by-reference locals are
encountered.
Issue #918
|
|
fn f(a: {x: str}) -> &str {
ret a.x;
}
fn main() {
let x = {x: "hi"};
let &y = f(x); // Look ma, no copy!
log_err y;
}
Issue #918.
|
|
Issue #918
|