| Age | Commit message (Collapse) | Author | Lines |
|
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
|
|
|
|
|
|
introduces ctypes::m_* machine type aliases for int, uint, float
depending on cfg(target_arch) that are used in tests
|
|
|
|
This removes the need for the unary minus hacks, and allows some other
neat things like matching on 1 >> 4.
Issue #954
|
|
It seems inefficient to copy them around. Let's measure whether that's actually
> the case
|
|
Closes #49
|
|
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
|
|
Also simplifies the literal-munging, and moves it into ast_util
Closes #1170
|
|
This involved adding 'copy' to more generics than I hoped, but an
experiment with making it implicit showed that that way lies madness --
unless enforced, you will not remember to mark functions that don't
copy as not requiring copyable kind.
Issue #1177
|
|
This goes before a snapshot, so that subsequenct patches can make the
transition without breaking the build. Disables kind checking pass, makes
parser accept both new and old-style kind annotation.
Issue #1177
|
|
|
|
You almost never want a function with pinned type params. For
types, objects, resources, and tags, pinned types are actually often
more sane. For most of these, shared rarely makes sense. Only tricky
case is objs -- you'll have to think about the kinds you want there.
Issue #1076
|
|
Closes #1067
|
|
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
|
|
Issue #1056
|
|
Trans has been assuming that tag node id's are unique across crates and they
are not so, depending on which way the wind is blowing, it would choose to use
a crate-local tag variant instead of the correct one from std.
No test case since I can't come up with a reliable one that compiles in a
reasonable amount of time.
|
|
into the type check
|
|
also repair various errors in the parser related to such blocks.
rename checked_blk to default_blk to reflect the fact that it
inherits its purity from the surrounding context.
|
|
|
|
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
|
|
This reverts commit ce0f054f9d56df4e60291fc2e1b89ce979cf374f.
|
|
|
|
Like the box unop.
Issue #409
|
|
Issue #918
|
|
Issue #918
|
|
This will be used in the near future to decide what can safely
be done with the returned reference.
Issue #918
|
|
|
|
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
|
|
|
|
|
|
|
|
Upvars are now marked with def_upvar throughout, not just when going
through freevars::lookup_def. This makes things less error-prone. One
thing to watch out for is that def_upvar is used in `for each` bodies
too, when they refer to a local outside the body.
|
|
Having it in the alias pass was slightly more efficient (finding
expression roots has to be done in both passes), but further muddled
up the already complex alias checker.
Also factors out some duplication in the mutability-checking code.
|
|
|
|
|
|
|
|
|
|
This reverts commit b0db13956f4f106c4bf5a9210c7df439b34506a4.
(Should work now that we have a new snapshot)
|
|
This patch supports the syntax
unchecked {
...
}
to disable purity checking within a block. Presumably it will only be
used within a declared "pure fn". However, there is no checking that it
doesn't occur elsewhere, and it would be harmless for it to do so.
I went with Lindsey's suggestion for the syntax, but it's subject to
change.
This allows you to write code that uses predicates that call arbitrary
Rust functions, but you must declare your intentions by wrapping it in
an unchecked { ... } block. The test case run-pass/unchecked-predicates.rs
demonstrates how to do that.
|
|
|
|
|
|
kinding-violations in rustc and libstd.
|