Commit Graph

71 Commits

Author SHA1 Message Date
Tim Chevalier
499a58708f Assign correct types to struct-like enum variant constructors
Before, the type was just the enum type itself, which caused an
assertion failure in iter_variant in trans::base.

r=brson

Closes #4229
2012-12-24 15:59:15 -08:00
Jakub Wieczorek
1968cb315a Add support for destructuring vectors in match expressions 2012-12-17 16:50:40 -08:00
Patrick Walton
41c0d7083e librustc: Fix type_use for generic newtype structs. Closes #4188. rs=bugfix 2012-12-14 19:44:07 -08:00
Patrick Walton
cd120736cb librustc: Allow moves out of self. r=nmatsakis 2012-12-13 15:49:07 -08:00
Patrick Walton
45848b2040 librustc: Automatically move non-implicitly-copyable types into unique closures. r=nmatsakis 2012-12-13 15:33:33 -08:00
Patrick Walton
efb9b74718 librustc: Fix explicit self for objects in more cases. r=nmatsakis 2012-12-13 13:29:08 -08:00
Patrick Walton
4c2e4c37ce librustc: Make use statements crate-relative by default. r=brson 2012-12-13 13:05:22 -08:00
Brian Anderson
6047dd35bb Fix vtable calculations when translating static methods. Closes #4165 2012-12-12 17:14:39 -08:00
Brian Anderson
a7159be24a Remove old deriving 2012-12-11 18:11:14 -08:00
Tim Chevalier
01c0971172 Allow pattern-matching on any strings, not just unique strings
r=brson

Closes #3574
2012-12-11 11:22:13 -08:00
Tim Chevalier
e7dd3af970 Remove commented-out code 2012-12-10 21:08:22 -08:00
Tim Chevalier
0046ed9462 Remove un-needed code for obsolete classes
and rename "class" to "struct" everywhere possible (except local
vars, I was too lazy for that) -- that is why this commit is so
big.

No review, just dead code removal and renaming.

Closes #3515
2012-12-10 18:45:01 -08:00
Patrick Walton
98fdcb0b9d librustc: De-mode pattern bindings. r=nmatsakis 2012-12-07 19:34:57 -08:00
Patrick Walton
ab3b752906 librustc: Implement "&mut [T]" as an expression. r=brson 2012-12-07 18:29:10 -08:00
Brian Anderson
e5e6d3c43d Long lines 2012-12-07 16:48:55 -08:00
Brian Anderson
2fcf562d16 Add an auto-slice-and-ref step to method lookup. Allows ~[T] to work with explicit self 2012-12-07 15:29:38 -08:00
Brian Anderson
e71081ec03 Merge pull request #4101 from brson/bound-default-methods
Call default methods on bound typarams more correctly
2012-12-07 15:10:57 -08:00
Patrick Walton
cf3972e95a librustc: Propagate type uses correctly from method calls to the containing functions. rs=bugfix
This adds a new script, `monodebug.pl`. It can be used to diagnose problems stemming from incorrect combining of monomorphic generic instantiations.
2012-12-06 19:11:51 -08:00
Patrick Walton
4fc03bac65 librustc: Implement "-Z no-monomorphic-collapse" as a debugging tool to diagnose mysterious crashes we're seeing. rs=debug-tool 2012-12-05 20:45:58 -08:00
Patrick Walton
aa3aa3b1b2 librustc: Fix type_use to not treat i1* arguments as interchangeable with i8* arguments. Closes #3917. rs=bugfix 2012-12-05 20:23:14 -08:00
Brian Anderson
1fc802233b Long lines 2012-12-05 18:10:45 -08:00
Brian Anderson
4f3cc01487 Fix cross-crate inlining of static functions 2012-12-05 18:09:52 -08:00
Patrick Walton
b8cfd5c414 librustc: Long lines. rs=rustbot 2012-12-04 21:13:02 -08:00
Brian Anderson
01cd53baf0 Merge remote-tracking branch 'luqmana/incoming'
Conflicts:
	src/librustc/middle/typeck/check.rs
2012-12-04 18:49:50 -08:00
Patrick Walton
33c1e47c1b librustc: Implement moves based on type. r=nmatsakis 2012-12-04 15:38:04 -08:00
Patrick Walton
56ece46f7d librustc: Remove all legacy pattern bindings from libsyntax and librustc. rs=refactoring 2012-12-04 14:19:19 -08:00
Graydon Hoare
00c856c0b1 Update license, add license boilerplate to most files. Remainder will follow. 2012-12-03 17:12:14 -08:00
Brian Anderson
05e51e6f7f Call default methods on bound typarams more correctly 2012-12-02 18:29:22 -08:00
Patrick Walton
1088006ed9 librustc: Implement unit-like struct constants. r=brson 2012-11-30 21:10:54 -08:00
Patrick Walton
8fa306a0ad librustc: Implement tuple struct constants. r=brson 2012-11-30 21:10:17 -08:00
Patrick Walton
5b5a0df7ee librustc: Implement C-like enum constants. r=tjc 2012-11-30 21:09:14 -08:00
Patrick Walton
f34833abfc librustc: Make a.b() always a method call. r=nmatsakis 2012-11-30 20:41:46 -08:00
Patrick Walton
54ae377ec2 librustc: Implement explicit @self and ~self for objects. r=nmatsakis 2012-11-30 19:39:01 -08:00
Patrick Walton
3afd6c3d79 librustc: Implement simple explicit self for objects. r=nmatsakis 2012-11-30 18:55:12 -08:00
Tim Chevalier
daf28a421a Disallow dereferencing enum types when the variant is private
If an enum type's only variant is private, disallow dereferencing
values of its type.

Due to #4082, this only applies to enums that are in the same crate.

r=pcwalton

Closes #818
2012-11-30 12:45:10 -08:00
Graydon Hoare
d783f4d7bb libs: Remove transitionary material on iter_bytes, add workcache to build. 2012-11-30 10:33:16 -08:00
Brian Anderson
78ee821154 Implement trait inheritance for bounded type parameters 2012-11-29 18:10:11 -08:00
Patrick Walton
a0617eae68 librustc: Eliminate most expressions of the form a.b() that are not method calls. rs=refactoring 2012-11-29 17:51:56 -08:00
Paul Stansifer
9814e58815 No longer parse the delimiters of the RHS of a macro as part of the expansion. 2012-11-29 12:09:10 -08:00
Paul Stansifer
ee076f63f9 Allow for macros to occur in statement position. 2012-11-29 12:09:10 -08:00
Patrick Walton
9e1c9be16f librustc: Make the Drop trait use explicit self 2012-11-29 11:06:15 -08:00
Luqman Aden
c6b1739232 Add more standard c lib llvm intrinsics. 2012-11-29 06:48:07 -05:00
Brian Anderson
16f72df704 Merge remote-tracking branch 'erickt/time'
Conflicts:
	src/libstd/time.rs
2012-11-28 14:49:58 -08:00
Brian Anderson
fc06114ddf Merge remote-tracking branch 'brson/companion' into incoming
Conflicts:
	src/compiletest/compiletest.rs
	src/libcargo/cargo.rs
	src/libcore/core.rs
	src/librustc/rustc.rs
	src/librustdoc/rustdoc.rc
2012-11-28 13:17:33 -08:00
Brian Anderson
8179e268ef Register snapshots 2012-11-28 12:33:00 -08:00
Patrick Walton
669fbddc44 librustc: Add explicit self to IterBytes. r=nmatsakis 2012-11-28 11:36:04 -08:00
Patrick Walton
ca6970a65e librustc: Make overloaded operators with explicit self translate correctly 2012-11-28 11:01:14 -08:00
Patrick Walton
1c348e6e38 librustc: Implement @mut [T] as the new replacement for @[mut T] 2012-11-27 09:23:31 -08:00
Erick Tryzelaar
cd6300e938 libstd: turn time::Tm and time::Timespec into structs
This avoids #4044 by not using the enum wrapper, and turning Tm_
directly into a struct. Along the way it modernizes the codebase
to eliminate no-implicit-copies warnings.
2012-11-26 22:22:22 -08:00
Patrick Walton
de0268b693 librustc: Fix translation of cross-crate inline or generic methods with explicit self. rs=blocking-snapshot 2012-11-26 18:09:12 -08:00