Commit graph

629 commits

Author SHA1 Message Date
Marijn Haverbeke
f8a35234ad Remove autoderef for calls
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.
2011-09-16 14:39:30 +02:00
Marijn Haverbeke
6eb9738a66 Rename ast::controlflow to ast::ret_style
It will include information about returning by alias.
2011-09-14 10:38:23 +02:00
Graydon Hoare
a4815b6742 Factor imports mindlessly. 2011-09-12 16:13:28 -07:00
Marijn Haverbeke
fc6b7c8b38 Reformat for new mode syntax, step 1
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
2011-09-12 12:04:14 +02:00
Marijn Haverbeke
0e6e56ca60 Make the names of the arg mode tag reflect their (revised) meaning 2011-09-12 11:07:17 +02:00
Brian Anderson
f1555e2ca8 Rename ty_istr to ty_str. Issue #855 2011-09-02 22:11:46 -07:00
Brian Anderson
5c49e4f4e9 Reformat. Issue #855 2011-09-02 22:11:42 -07:00
Brian Anderson
9c173f17c0 Remove lots of estr code from rustc. Issue #855 2011-09-01 23:25:33 -07:00
Brian Anderson
418d09e547 Convert all uses of #ifmt to #fmt. Issue #855 2011-09-01 18:54:03 -07:00
Brian Anderson
ab6bb035e5 Rename std::istr to std::str. Issue #855 2011-09-01 17:27:58 -07:00
Brian Anderson
e35c021aa4 Parse "",str as istrs. Pretty print istrs as "",str. Issue #855 2011-09-01 16:53:53 -07:00
Brian Anderson
e824775d53 Remove std::str. Issue #855 2011-09-01 16:09:15 -07:00
Brian Anderson
6b22640a1f Convert std::test to istrs. Issue #855 2011-09-01 12:14:31 -07:00
Brian Anderson
498e38b705 Convert uses of #fmt to #ifmt. Issue #855 2011-08-31 11:44:06 -07:00
Brian Anderson
5f57a508af Convert misc compiler bits to istrs. Issue #855 2011-08-27 18:05:59 -07:00
Brian Anderson
9857048929 Convert rustc::driver::session to istrs. Issue #855 2011-08-27 16:47:50 -07:00
Brian Anderson
9fb085560d Convert rustc::syntax::ast_util to istrs. Issue #855 2011-08-27 15:54:46 -07:00
Brian Anderson
cbad23a747 Convert pretty-printer to istrs. Issue #855 2011-08-27 15:54:46 -07:00
Brian Anderson
f09ef6ec66 Convert rest of the AST to istrs. Issue #855 2011-08-27 15:54:45 -07:00
Brian Anderson
03119fe269 Convert ast::ident to istr. Issue #855 2011-08-27 15:54:44 -07:00
Tim Chevalier
f841e89443 Support unchecked blocks
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.
2011-08-25 18:28:23 -07:00
Graydon Hoare
c011f13144 Add kind-checking for assign-op, copy, ret, be, fail exprs. Fix caught kinding-violations in rustc and libstd. 2011-08-23 15:58:53 -07:00
Brian Anderson
152cbaade7 Move functions from syntax::ast to syntax::ast_util
This leaves syntax::ast just defining the AST, which strikes me as somewhat
nicer
2011-08-22 10:44:04 -07:00
Brian Anderson
518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00
Brian Anderson
1aa1f8c4b7 Rename various things from ivec to vec 2011-08-18 14:32:25 -07:00
Brian Anderson
4fc3618233 Change ast::ty_ivec, ty::ty_ivec to ty_vec 2011-08-18 14:11:06 -07:00
Brian Anderson
ec898244f7 Remove seq_kind from ast::expr_vec 2011-08-18 13:09:50 -07:00
Marijn Haverbeke
cd440d338e Remove or _-prefix all unused function arguments
This should make the compilation process a bit less noisy.
2011-08-18 10:02:13 +02:00
Brian Anderson
53df58a177 Purge vecs from the std::test interface 2011-08-17 09:55:55 -07:00
Erick Tryzelaar
af21a27002 Port the compiler to the expr foo::<T> syntax. 2011-08-16 15:05:56 -07:00
Erick Tryzelaar
4abc471390 Port the compiler to foo<T> decl syntax. 2011-08-16 15:05:56 -07:00
Erick Tryzelaar
e4a0f997fb Port the compiler to the typaram foo<T> syntax. 2011-08-16 15:05:56 -07:00
Brian Anderson
f05a91a0dc Rename std::ivec to std::vec 2011-08-16 10:36:19 -07:00
Brian Anderson
184eac90ab Add and use an ivec interface to std::test 2011-08-16 10:29:08 -07:00
Lindsey Kuper
f91351aaf6 The wonky for...in... whitespace was bothering me. Sorry! 2011-08-15 22:19:50 -07:00
Paul Stansifer
c48036c0b7 Make spans into stacks (to store expansion backtraces). 2011-08-15 15:35:27 -07:00
Michael Sullivan
2421312dea Don't rely on binop autoderef in the compiler. 2011-08-12 15:16:01 -07:00
Brian Anderson
7625ed52ee Remove vecs from std::sort 2011-08-12 12:14:06 -07:00
Erick Tryzelaar
8b15045224 Port the compiler to the ivec type [T] syntax. 2011-08-09 15:53:26 -07:00
Patrick Walton
fd7ffd5ac2 rustc: Add inlineness to the fn decl instead 2011-08-05 11:46:43 -07:00
Patrick Walton
59e9b629c0 Revert "rustc: Introduce the concept of inline to the AST"
This reverts commit 9b9170f9fe.
2011-08-05 11:38:06 -07:00
Patrick Walton
9b9170f9fe rustc: Introduce the concept of inline to the AST 2011-08-05 11:33:48 -07:00
Marijn Haverbeke
6e2a7bff7f Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
Marijn Haverbeke
df7f21db09 Reformat for new syntax 2011-07-27 15:54:33 +02:00
Michael Sullivan
25a89e068d Rename the block type to be blk also. Sorry. 2011-07-25 14:18:07 -07:00
Brian Anderson
b3dee95514 Add a facility for ignoring tests. Issue #428
Adding the #[ignore] attribute will cause the test not to be run, though it
will still show up in the list of tests.
2011-07-14 13:51:30 -07:00
Brian Anderson
4038010bc6 The test runner's main returns unit, not int. Issue #428
The appropriate way to indicate failure from main is to fail.
2011-07-14 10:51:38 -07:00
Brian Anderson
8d2706cca8 Flag --test implies '--cfg test'. Issue #428
So certain code can be conditionally compiled only when building for testing
2011-07-14 10:27:02 -07:00
Graydon Hoare
39151f2ad8 Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases. 2011-07-13 15:44:09 -07:00
Patrick Walton
cdda0fd6d6 rustc: Remove some useless std::vec imports 2011-07-12 18:07:12 -07:00