Commit Graph

3390 Commits

Author SHA1 Message Date
Tim Chevalier
ec0c029a7e Split EBML module into a reader and a writer module
Minor refactoring, no review.

Closes #2739
2012-11-24 13:40:00 -08:00
Tim Chevalier
f74fe894fc [libstd] getopts, now with fewer copies
Change the opt_ functions in getopts to take a reference to a
Matches, instead of taking a Matches by-value, as suggested in
2012-11-24 12:52:27 -08:00
Niko Matsakis
117e5e3583 Implement LUB algorithm and add new unit-testing infrastructure for infer.
r=brson
2012-11-24 09:53:39 -05:00
Brian Anderson
e8dcb654ce Silence some debug logging in rustc 2012-11-22 22:10:49 -08:00
Tim Chevalier
ef833d4101 Introduce a T_err type for type errors
This allows more errors to be non-fatal, as per #1871.

I only went through and started changing span_fatal to span_err in
check.rs. There are probably more errors that could be made
non-fatal. So if you see derived type errors appearing from now on,
file a bug!

r=graydon

Closes #1871
2012-11-21 12:44:51 -08:00
Patrick Walton
318e534895 rustc: Implement explicit self for Eq and Ord. r=graydon 2012-11-19 15:33:11 -08:00
Brian Anderson
1a1e99c27d Merge remote-tracking branch 'brson/codemap'
Conflicts:
	src/libsyntax/ext/source_util.rs
2012-11-17 18:38:39 -08:00
Tim Chevalier
428c58b9f9 Forbid duplicate supertraits
I actually already pushed most of this by accident before I meant to, but
r=nmatsakis anyway.

Closes #3953
2012-11-16 15:12:14 -08:00
Brian Anderson
81d20156cd Change spans to use byte offsets instead of char offsets 2012-11-16 12:06:44 -08:00
Graydon Hoare
2bf6663cf0 librustc: Fastisel dislikes memmove, switch to memcpy. Perf win, r=catamorphism.
Fastisel actually has a special case for memcpy, the intrinsic, by name.
It has no such special case for memmove, so bails.

Close #3987.
2012-11-16 11:26:26 -08:00
Tim Chevalier
2f83baf857 Check for duplicate supertraits and forbid them
As per #3953
2012-11-15 18:41:17 -08:00
Tim Chevalier
82017b8416 Make staticness mismatch a fatal error
Exit with a fatal error, instead of recording a non-fatal error,
when we encounter an impl method that's static when its corresponding
trait method isn't (or vice versa). This is because code later on in
the typechecker will expect the staticness of the two methods to be
consistent and ICE otherwise.

r=nmatsakis

Closes #3969
2012-11-15 18:14:13 -08:00
Patrick Walton
64305174c9 librustc: Fix cross-crate reexports. rs=blocking-servo 2012-11-15 17:15:02 -08:00
Graydon Hoare
1a2eaed43d rustc: make llloadenv bb optional, kill 1.5% of emitted llvm insns. 2012-11-15 14:55:11 -08:00
Graydon Hoare
59a034a63f rt: bump log levels up by one, fix tautological-compare error (and permit turning off logging entirely). 2012-11-15 12:03:54 -08:00
Patrick Walton
adc4bed773 librustc: Implement (and require) explicit self for derivable traits. r=nmatsakis 2012-11-15 10:26:49 -08:00
Patrick Walton
29e10c91fe librustc: Pass through extra parameters in automatically-derived methods. r=brson 2012-11-15 10:26:40 -08:00
Niko Matsakis
b7c04d152b Inherit mutability through fixed-length vectors.
Fixes #3226.  No review (one line bug fix).
2012-11-14 19:47:06 -08:00
Graydon Hoare
41f2670633 librustc: discard side tables after translation, before llvm passes. 2012-11-14 18:21:09 -08:00
Brian Anderson
f67bfe9738 Add types for character position and byte position in the codemap 2012-11-14 15:18:29 -08:00
Brian Anderson
9ecf86343a Camel case all the codemap types except span 2012-11-14 15:18:26 -08:00
Brian Anderson
11024eaebb rustc: Only strip out the main function when generating test executable, not lib 2012-11-14 14:11:20 -08:00
Brian Anderson
b808eaba37 rustc: Generate test code when in the 'test' config 2012-11-14 14:11:10 -08:00
Brian Anderson
234df9cae0 Long lines 2012-11-14 11:49:59 -08:00
Patrick Walton
32ad4ae4cd librustc: Require the #[derivable] attribute, remove the significance of "impl Foo : Bar;", and allow only a subset of methods in a trait to be derived. r=brson 2012-11-14 11:36:55 -08:00
Patrick Walton
3e14ada4f6 rustc: Implement let assignability. r=nmatsakis 2012-11-14 11:26:00 -08:00
Patrick Walton
bad62dcb04 rustc: Allow constants to be used in patterns. r=nmatsakis 2012-11-14 11:06:29 -08:00
Patrick Walton
3e850c3c0c librustc: Stop reexporting all of core in every crate. rs=really-bad-bug 2012-11-13 15:46:39 -08:00
Graydon Hoare
f4e107e6c7 whitespace police 2 2012-11-13 11:30:37 -08:00
Graydon Hoare
d2f93fd290 whitespace police 2012-11-13 11:16:19 -08:00
Patrick Walton
db9f8db741 librustc: Implement deriving with a unit return type. r=tjc 2012-11-13 10:37:58 -08:00
Graydon Hoare
4e1ce014c8 cleanup: convert some remaining #foo invocations to foo! form. 2012-11-13 08:57:31 -08:00
Patrick Walton
2b93ab5a21 rustc: Make static methods not leak out of traits. r=brson 2012-11-12 22:11:22 -08:00
Brian Anderson
2ec09c4eb9 Objectify the codemap 2012-11-12 18:24:56 -08:00
Brian Anderson
5b248a6ca8 Remove CodeMap box typedef from codemap 2012-11-12 17:09:52 -08:00
Patrick Walton
fe02814a63 rustc: Implement floating point literal inference. r=nmatsakis 2012-11-12 10:39:08 -08:00
Brian Anderson
8643f757a2 rustc: Fix cross-crate reexports. #3908. r=pcwalton 2012-11-08 17:10:48 -08:00
Patrick Walton
0fc952372a rustc: Support irrefutable patterns in function arguments. r=nmatsakis 2012-11-07 19:29:30 -08:00
Patrick Walton
b223c9c465 rustc: Autovivify modules even when a type def is present in resolve. Closes #3931. rs=nasty-bug 2012-11-07 14:28:16 -08:00
Brian Anderson
69a8b4d8e2 Rename src/rustc to src/librustc. Use the driver crate 2012-11-07 13:53:39 -08:00