| Age | Commit message (Collapse) | Author | Lines |
|
typestate was using the enclosing function ID for the "this function
returns" constraint, which meant confusion and panic in the case
where a predicate p includes "check p()". Fixed it to use a fresh
ID.
Closes #933
|
|
Close #1428.
|
|
|
|
|
|
The code in Issue 948 was causing typestate to diverge because
it was using the prestate for the whole expression -- not the post-
state for the fields list -- as the prestate for the record base
expression. Fixed.
Closes #948
|
|
If we have log(foo, quux) where foo:_|_, just translate foo and
ignore the rest of the expression.
Closes #1459
|
|
|
|
|
|
Rationale: _|_-typed things diverge, so it's safe to use them in
any context.
Closes #1465
|
|
This is not my ideal way of going about things. I'd prefer not
to have expressions typed as fn*(), for example, but I couldn't
get that to work together with inferring the modes of arguments
and other corner cases.
|
|
The segv fault issue is #1566
|
|
Issue #1543
|
|
This patch starts from move the analysis which checkes of probably
incorrectly usage of `int|uint` in native fn.
Issue #1543
|
|
(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.
|
|
Although the old version of GEP_tup_like was incorrect in some
cases, I do not believe we ever used it in an incorrect fashion.
In particular, it could go wrong with extended index sequences
like [0, 1, 3], but as near as I can tell we only ever use it
with short sequences like [0, i].
|
|
also, streamline type_is_tup_like() to the cases which
actually work
|
|
|
|
|
|
Issue #1403
|
|
Actually, we don't "fix" #843 so much as close it: as with memmove,
we simply use an alignment of 1 with dynamically sized types.
|
|
|
|
Minor cleanups to custom discriminator code.
|
|
|
|
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 '.'.
|
|
This fixes issues #843 and #1546. The cost of an upcall is
unfortunate, though. I assume there must be a way to simply manually
compute the pointer or size, using something akin to the formula in
`align_to` in `rust_util.h`. I could not get this to work,
unfortunately.
|
|
Mostly updates to the comments and docs from Pull Request #1537.
|
|
Closes #1528
|
|
Improves type error messages referring to external types.
Issue #1507
|
|
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
|
|
|
|
For some reason, wildcard patterns were never getting type parameter
substitutions attached. This would cause an assertion failure when
checking a wildcard pattern that matches against a tag with
polymorphic type (not sure why this didn't come up before). Fixed it.
(The diff and test case may be easier to understand than this note
:P)
Closes #1503.
|
|
|
|
|
|
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).
|
|
Closes #1492
|
|
|
|
By simply not resolving that def id until the typeck pass.
Closes #1494
|
|
|
|
|
|
This prevents trans_args from optimizing out nil return types. The
method might be generic, in which case it *will* write to a nil retptr.
|
|
|
|
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.
|
|
|