Commit Graph

18066 Commits

Author SHA1 Message Date
Daniel Micay
cda3ac905a rc: fix tests 2013-05-15 04:34:31 -04:00
bors
4e4f90d4a0 auto merge of #6482 : catamorphism/rust/unsafe-fn-autoderef, r=catamorphism 2013-05-14 23:59:19 -07:00
Björn Steinbrink
109bb7c78b Allow static strings to be used with keyword checks 2013-05-15 08:01:04 +02:00
bors
217f96339a auto merge of #6224 : erickt/rust/rustc-cleanup, r=erickt
Just a couple minor cleanups and renames of librustc
2013-05-14 22:57:37 -07:00
Daniel Micay
75822f2894 add a DeepClone trait
for deep copies through shared ownership boundaries
2013-05-15 01:36:41 -04:00
bors
31cedf6927 auto merge of #6478 : dotdash/rust/inlining, r=catamorphism
Not inlining these affects the hash table performance quite badly.
2013-05-14 22:00:01 -07:00
Daniel Micay
fa45958ec8 clone: clarify docstring 2013-05-15 00:42:52 -04:00
Daniel Micay
298a72602b vim: be is still a reserved keyword 2013-05-15 00:03:55 -04:00
Daniel Micay
d65a136cb0 vim: no more drop blocks 2013-05-15 00:01:58 -04:00
Daniel Micay
17a68d1e8d vim: swap operator is gone 2013-05-14 23:59:55 -04:00
Brian Anderson
5af8646a8b core: Fix leak in TLS. #6231 2013-05-14 20:50:43 -07:00
Erick Tryzelaar
729708d112 rustc: rename ty::method to ty::Method and add ctor 2013-05-14 20:10:46 -07:00
Erick Tryzelaar
18f6a51d0a rustc: rename ast::self_ty and related fields to explicit_self 2013-05-14 20:10:46 -07:00
Erick Tryzelaar
70e02cf445 rustc: rename a method receiver type to rcvr_ty 2013-05-14 20:10:46 -07:00
Erick Tryzelaar
8d19f44c9d syntax: add IterBytes impls for some ast types 2013-05-14 20:10:46 -07:00
Erick Tryzelaar
4bfe0f717f rustc: rename some ty_self variables to self_arg 2013-05-14 20:10:45 -07:00
Erick Tryzelaar
9c80cf548a rustc: Remove ty::arg 2013-05-14 20:10:45 -07:00
Erick Tryzelaar
191fdda46a rustc: minor cleanup 2013-05-14 20:10:45 -07:00
Brian Anderson
2d35c01a28 rusti: Ignore tests. Failing on i686. #6489 2013-05-14 19:11:57 -07:00
bors
2fc6b0998b auto merge of #6475 : sonwow/rust/tutorials, r=brson 2013-05-14 19:08:19 -07:00
Youngmin Yoo
a2a8596c3d Rename vec::len(var) to var.len() 2013-05-15 11:05:28 +09:00
Tim Chevalier
80a7e2644c rustpkg: Tests for well-formed and ill-formed package IDs...
...and cleanup, making how we handle version numbers more rational
(specifically, not passing in a versioned name to rustc
with the -o flag), and removing unused code.
2013-05-14 18:13:45 -07:00
bors
cf0f760560 auto merge of #6333 : bjz/rust/cond-macro, r=thestinger
Addressing issue #6037, this Scheme-style conditional helps to improve code clarity in instances where the `if`, `else if`, and `else` keywords obscure predicates undesirably.

Here is an example:

~~~rust
let clamped =
    if x > mx { mx }
    else if x < mn { mn }
    else { x };
~~~

Using `cond!`, the above could be written as:

~~~rust
let clamped = cond!(
    (x > mx) { mx }
    (x < mn) { mn }
    _        { x  }
);
~~~

The optional default case is denoted by `_`.

I have altered `std::fun_treemap` to demonstrate it in use. I am definitely interested in using it for some of the numeric functions, but I will have to wait for it to reach `stage0` first.
2013-05-14 18:11:00 -07:00
Brendan Zabarauskas
7e4a176dd3 Use parentheses for cond! macro instead of preceding pipes
This is temporary. Once the macro parser has improved or been re-written these can be removed.
2013-05-15 11:02:17 +10:00
Tim Chevalier
c3875e8c70 rustpkg: Implement URL-like package IDs
This patch implements package IDs like
github.com/catamorphism/test-pkg.

To support such package IDs, I changed the PkgId struct to contain
a LocalPath and a RemotePath field, where the RemotePath reflects
the actual URL and the LocalPath reflects the file name of the cached
copy. Right now, the only difference is that the local path doesn't
contain dashes, but this will change when we implement #6407.

Also, PkgIds now have a short_name field -- though the short name
can be derived from the LocalPath, I thought it was cleaner not to
call option::get() wantonly.
2013-05-14 17:47:39 -07:00
Corey Richardson
68863153bb Fix resolution tests 2013-05-14 20:34:12 -04:00
Corey Richardson
8a69dba84a Fix ICE 2013-05-14 20:34:05 -04:00
Corey Richardson
3bfc1ca91d Get span from import_directive 2013-05-14 19:28:28 -04:00
Corey Richardson
62cbea1ca1 Add span to some import resolution errors 2013-05-14 18:52:31 -04:00
Corey Richardson
52f8b22d4f Add test for resolution errors 2013-05-14 18:51:37 -04:00
Corey Richardson
03f75b629a Better error reporting with renaming imports 2013-05-14 18:51:36 -04:00
bors
c30414f980 auto merge of #6471 : gifnksm/rust/reform-rational, r=brson
`std::ratio` module contains `BigRational` type, but the type is not usable by following reasons.
* `Ratio::new` requires `T: Copy + Num + Ord`, but `BigInt` is not implicitly copyable, because it contains unique vector.
* `BigInt` is not implements `Num`

So, I rewrite `Ratio` as follows.
* `Ratio` requires `T: Clone + Integer + Ord`.
  * `Copy` -> `Clone`: to be able to use `BigRational`
  * `Num` -> `Integer`: It is incorrect that a rational number constructed by two non-integer numbers.
* `BigInt` implements `Num` and `Orderable` which are required by `Integer` bound
2013-05-14 15:28:59 -07:00
bors
043d02213e auto merge of #6468 : gifnksm/rust/rposition-immutable, r=brson
`position` and `rposition` belonged to `ImmutableCopyableVector`, but they don't need the value is copyable.
2013-05-14 14:05:07 -07:00
Brendan Zabarauskas
b9824e18c2 Add Scheme-style cond! macro to syntax::ext::expand
Addresses issue #6037
2013-05-15 07:02:43 +10:00
Tim Chevalier
be062db808 testsuite: Update and un-xfail unsafe-fn-autoderef 2013-05-14 12:49:21 -07:00
bors
d217174987 auto merge of #6479 : brson/rust/flatpipes, r=brson 2013-05-14 12:25:54 -07:00
Brian Anderson
133aabc5bb Ignore two failing flatpipes tests 2013-05-14 11:35:10 -07:00
Björn Steinbrink
7ba685c7ab Add inlining for iter_bytes for types used as hashmap keys
Not inlining these affects the hash table performance quite badly.
2013-05-14 20:32:49 +02:00
bors
06c46d5142 auto merge of #6467 : alexcrichton/rust/better-rusti, r=bstrie
These few commits address a few existing issues:

* #5469 - adding regression tests for `rusti`. This adds unit tests to the `rusti.rc` file (which needed some reorganization of the Makefile, see the first commit message). These are super-simple right now, and sadly can't test the output of the tests. I worked for a bit on making a compiletest version of the rusti tests, but I ended up hitting something which blocked me, although I've forgotten it by this point.
* #5937 - regression test added, and it's fixed
* #5803 - just doesn't appear to happen any more
* #5784 - it's no longer broken, and it no longer spits out warnings about unused variables.

I also did some investigation into #5774, and you may want to read the comment I left on the bug. The gist of the situation is that C++ exceptions across JIT code don't look like they're working, even though they [should be working](3aa1122ec2/src/rustllvm/RustWrapper.cpp (L387)). If anyone has any insight on this, that would be awesome!
2013-05-14 11:22:51 -07:00
Alex Crichton
2ab1da5b01 Fix rustpkg tests now that they're in a different location 2013-05-14 14:11:30 -04:00
Alex Crichton
8b87fd7ec0 Don't emit common warnings in rusti 2013-05-14 14:11:29 -04:00
Alex Crichton
9af04f3e77 Add regression tests for various other rusti issues 2013-05-14 14:11:08 -04:00
Alex Crichton
4a9d8ff1a7 Fix use statements with rusti 2013-05-14 14:11:07 -04:00
Alex Crichton
54f2147e8e Get unit tests for rusti working
* They didn't work before, because the location of the tests caused the
  'sysroot' option to crate lookup to be wrong for finding the correct stage's
  core/std libraries. This moves the compiled tests from the $host/test
  directory into a $host/$stage/test directory. This means that the sysroot will
  be correct and the core/std libraries can actually be found
* The LLVM bindings apparently aren't threadsafe, so we can't run multiple tests
  in parallel.
2013-05-14 14:11:07 -04:00
bors
767e3ae86c auto merge of #6434 : alexcrichton/rust/less-implicit-vecs, r=bstrie
This closes #5204 and #6421.

This also removes the `vecs_implicitly_copyable` lint (although now reading #6421, this may not be desired?). If we want to leave it in, it at least removes it from the compiler.
2013-05-14 10:10:54 -07:00
Alex Crichton
ffcc680f9c Fix test fallout from removing vecs_implicitly_copyable 2013-05-14 12:25:19 -04:00
Alex Crichton
5614e83e81 Remove vecs_implicitly_copyable from the compiler 2013-05-14 12:25:18 -04:00
Alex Crichton
ccfb3ebf03 rusti: Remove #[allow(vecs_implicitly_copyable)] 2013-05-14 12:25:18 -04:00
Alex Crichton
92d39fe4d5 syntax: Remove #[allow(vecs_implicitly_copyable)] 2013-05-14 12:24:43 -04:00
Alex Crichton
2951527528 compiletest: Remove #[allow(vecs_implicitly_copyable)] 2013-05-14 12:24:43 -04:00