Patrick Walton
57e4ed479e
librustc: Add missing case in mem_categorization. rs=bugfix
2012-12-13 18:03:48 -08:00
Patrick Walton
036b26a197
librustc: Remove merge markers. rs=oops
2012-12-13 16:17:57 -08:00
Patrick Walton
732c39c183
librustc: Have coherence check Copy kind bounds when determining whether parameter substitutions could possibly unify. r=nmatsakis
2012-12-13 16:14:54 -08:00
Brian Anderson
ed4fac01b5
Rename Send trait to Owned
2012-12-13 15:52:50 -08:00
Brian Anderson
a277081ee4
Rename Owned trait to Durable
2012-12-13 15:52:50 -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
Graydon Hoare
9cced55b93
syntax: remove all remaining uses of #ast, and #ast / qquote itself.
2012-12-12 15:02:47 -08:00
Tim Chevalier
d42bdf1997
Auto-deref when checking field and method privacy
...
This disallows using pointers to sneak around priv qualifiers.
Deeming this too small for review as well. Closes #3763
2012-12-11 19:17:31 -08:00
Brian Anderson
a7159be24a
Remove old deriving
2012-12-11 18:11:14 -08:00
Tim Chevalier
6439f2d546
Avoid extra error for type mismatches in patterns
...
When a type error has already occurred, don't call ty::subst,
which may ICE due to the mismatch in the number of type params
involved.
I'm deeming this too small to review.
Closes #3680
2012-12-11 17:38:57 -08:00
Tim Chevalier
94a76843f4
Revert "Merge pull request #4144 from luqmana/deprecated-attribute"
...
This reverts commit f675b97ddc
, reversing
changes made to e7dd3af970
.
2012-12-11 12:28:30 -08:00
Tim Chevalier
1abad3b4e6
Fix whitespace
2012-12-11 11:42:44 -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
f675b97ddc
Merge pull request #4144 from luqmana/deprecated-attribute
...
Add deprecated attribute.
2012-12-10 21:16:20 -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
Graydon Hoare
12c32e944d
Add license boilerplate to more files.
2012-12-10 17:32:58 -08:00
Patrick Walton
3f78e0ecc0
librustc: Fix bug preventing cross-crate struct destructuring from working. rs=bugfix
2012-12-10 12:38:31 -08:00
Patrick Walton
ac2b0456f4
librustc: Remove is_self_field from borrowck. Unused. rs=#rust
2012-12-10 10:50:45 -08:00
Luqman Aden
4b4c8331bb
Add deprecated attribute.
2012-12-09 02:26:12 -05:00
Tim Chevalier
42f8a3366a
Print out a more helpful type error message for do-blocks/for-loops
...
If a do-block body has the wrong type, or a for-loop body has a
non-() type, suggest that the user might have meant the other one.
Closes #2817
r=brson
2012-12-08 23:04:38 -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
ecdc8aae41
Remove impl_id from trait_ref. Unused
2012-12-07 15:54:17 -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
Tim Chevalier
d2ad028a7c
Rename std::ebml::Reader => std::ebml::reader, same for writer
...
Closes #4076
2012-12-06 16:14:54 -08:00
Brian Anderson
3464f60c00
Remove previous x86 data corruption workaround. #4054
2012-12-06 15:26:22 -08:00
Patrick Walton
7203be1109
librustc: Fix handling of ~
and @
unary operators in mode computation. Closes #4114 . rs=bugfix
2012-12-05 22:57:58 -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
Patrick Walton
e23ea24aed
librustc: Move the "legality of move bindings" check from typechecking to alt checking. rs=refactoring
2012-12-05 19:01:14 -08:00
Patrick Walton
16506c0250
librustc: Make a context including the method map in check_alt, in preparation for moving check_legality_of_move_bindings there. rs=refactoring
2012-12-05 18:28:34 -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
1282fc8074
librustc: Hook borrow check loan checking up to the moves-based-on-type infrastructure. rs=helps-unbreak-the-build
2012-12-05 15:07:48 -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
c0d3b291d5
librustc: Shot in the dark to try to unbreak Windows. rs=me
2012-12-04 16:03:50 -08:00
Patrick Walton
33c1e47c1b
librustc: Implement moves based on type. r=nmatsakis
2012-12-04 15:38:04 -08:00
Patrick Walton
f02e9db212
librustc: Remove bogus ValueMode. rs=tree-on-fire
2012-12-04 15:09:40 -08:00
Patrick Walton
d1ebdbeb6c
librustc: Implement explicit self for Add and Index; add a hack in the borrow checker to support this. r=nmatsakis
2012-12-04 14:51:31 -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
94be145169
core: rename box to managed. Close #4079 .
2012-12-03 17:45: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
Patrick Walton
b6f1e3084f
librustc: Add missing cases in kind and privacy checking to try to put out the burning tinderbox. rs=rustbot
2012-12-03 15:28:51 -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
3ed9fbd63c
impls of traits cannot define methods on the anonymous trait
2012-11-29 22:07:49 -08:00
Brian Anderson
78ee821154
Implement trait inheritance for bounded type parameters
2012-11-29 18:10:11 -08:00
Brian Anderson
daa89e0861
rustc: Remove existing inheritance code from coherence
...
Inheritance will be implemented differently, hopefully simpler
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
Brian Anderson
b38d7f6538
Remove more uses of #[merge]
2012-11-29 16:41:47 -08:00
Brian Anderson
0a3a2eebfc
Long lines
2012-11-29 14:43:33 -08:00
Tim Chevalier
f459acc45d
Disallow importing private items
...
resolve wasn't checking that a `use` referred to a public item.
r=brson
2012-11-29 14:12:51 -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
65bd40e300
Remove uses of #[merge]
2012-11-28 17:09:26 -08: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
430583c8b4
librustc: Allow &T to be assigned to *T. r=nmatsakis
2012-11-28 11:29:53 -08:00
Patrick Walton
ca6970a65e
librustc: Make overloaded operators with explicit self translate correctly
2012-11-28 11:01:14 -08:00
Graydon Hoare
082a88e42c
Merge pull request #4032 from catamorphism/getopts
...
[libstd] getopts, now with fewer copies
2012-11-28 08:47:25 -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
7bc29c62d0
libcore: Add explicit self to all overloaded operators but Add and Index. r=brson
2012-11-26 19:35:52 -08:00
Brian Anderson
be6613e048
Remove the crate language
2012-11-26 18:13:54 -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
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
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
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
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