Patrick Walton
0fc952372a
rustc: Support irrefutable patterns in function arguments. r=nmatsakis
2012-11-07 19:29:30 -08:00
Niko Matsakis
b0ed151539
Cleanup how we handle proto in types, remove unsound subtyping
...
Fixes #1896 which was never truly fixed, just masked.
The given tests would have failed had they used `~fn()` and
not `@fn()`. They now result in compilation errors.
Fixes #2978 .
Necessary first step for #2202 , #2263 .
2012-11-06 08:56:29 -08:00
Patrick Walton
be93b29d30
rustc: Implement parsing and typechecking for "once fn"
2012-11-05 13:17:02 -08:00
Tim Chevalier
a006608276
Remove stage0 stuff that was awaiting snapshot
...
and re-register snapshots
Just removing unneeded code, no review
2012-11-03 14:04:32 -07:00
Tim Chevalier
62f98c8ff8
Preserve parenthesization in the AST
...
Maintain explicit "paren" nodes in the AST so we can pretty-print
without having to guess where parens should go. We may revisit this
in the future.
r=graydon
2012-10-30 15:05:32 -07:00
Patrick Walton
599b4208fb
rustc: Translate tuple struct constructors
2012-10-25 11:49:26 -07:00
Patrick Walton
4da58a5bd6
rustc: Implement typechecking for tuple structs. r=nmatsakis
2012-10-24 10:54:09 -07:00
Tim Chevalier
087cbb55d0
Remove <- operator from the compiler
...
Yield an obsolete syntax error on things like "let foo <- bar;"
and "foo <- bar;" r=brson
Progress on #3466
2012-10-23 12:10:19 -07:00
Patrick Walton
3bf0a9b094
rustc: Implement typechecking for simple monomorphic derivable traits on monomorphic types. r=brson
2012-10-23 10:45:23 -07:00
Tim Chevalier
46d4bbbae4
Simplify the AST representation of ty param bounds
...
Change ast::ty_param_bound so that all ty param bounds are represented
as traits, with no special cases for Copy/Send/Owned/Const.
typeck::collect generates the special cases.
A consequence of this is that code using the #[no_core] attribute
can't use the Copy kind/trait. Probably not a big deal?
As a side effect, any user-defined traits that happen to be called
Copy, etc. in the same module override the built-in Copy trait.
r=nmatsakis
Closes #2284
2012-10-22 09:01:12 -07:00
Ben Striegel
41c37d9d0f
...missed a merge marker on that last rebase
2012-10-20 17:50:46 -07:00
Ben Striegel
ac81fff229
Remove old fixed-length vector syntax
2012-10-20 17:50:46 -07:00
Patrick Walton
754704ea94
rustc: Implement intra-crate static methods on anonymous trait implementations. r=nmatsakis
2012-10-18 14:29:18 -07:00
Tim Chevalier
b03c71f629
Remove dead type definition
2012-10-18 12:19:43 -07:00
Patrick Walton
91ae5412d8
rustc: Merge module and type namespaces. r=brson
2012-10-15 15:35:36 -07:00
Erick Tryzelaar
ab89b5c294
libstd: make Serializer a trait-level typaram
2012-10-15 08:25:23 -07:00
Niko Matsakis
98887cc7ee
remove ctor from ast (take 2) (no review: just dead code removal)
2012-10-12 19:46:37 -07:00
Niko Matsakis
cb55e246ba
Use the Nth impl when translating a static method call, instead
...
of the 0th. 0th is only correct when there are no bound tps
on the trait.
Fixes #3741 .
2012-10-12 17:46:43 -07:00
Tim Chevalier
bfbb7197d7
Update FIXME numbers
2012-10-11 16:00:30 -07:00
Tim Chevalier
22efa39382
Revert "Revert "Remove old auto_serialize2 code (needs snapshot)""
...
This reverts commit a33535e441
.
2012-10-08 17:43:45 -07:00
Tim Chevalier
a33535e441
Revert "Remove old auto_serialize2 code (needs snapshot)"
...
This reverts commit 0bd6da8a8c
.
2012-10-08 11:58:54 -07:00
Erick Tryzelaar
0bd6da8a8c
Remove old auto_serialize2 code (needs snapshot)
2012-10-07 17:20:19 -07:00
Erick Tryzelaar
eb626e7119
Remove the old serializers (needs snapshot)
2012-10-07 17:20:19 -07:00
Erick Tryzelaar
e1c517ca48
migrate libsyntax/rustc to auto_serialize2
2012-10-07 10:32:25 -07:00
Tim Chevalier
f96a2a2ca1
Remove by-mutable-ref mode from the compiler
...
and test cases. Closes #3513
2012-10-05 22:45:50 -07:00
Tim Chevalier
f8bc0d2545
Revert "wip"
...
This reverts commit ca49fd402a
.
2012-10-05 16:10:08 -07:00
Tim Chevalier
ca49fd402a
wip
2012-10-05 15:39:12 -07:00
Patrick Walton
9284179311
libstd: Switch off legacy modes in both core and std.
2012-10-02 12:20:06 -07:00
Tim Chevalier
b18320446e
Move over to calling ptr::addr_of
...
Everything should now call ptr::addr_of instead of
ptr::p2::addr_of. Only the pipes macro code when compiled
by stage0 will call ptr::p2::addr_of. Needs a snapshot to get
rid of that.
2012-10-01 15:12:09 -07:00
Patrick Walton
0bcb3bc536
libsyntax: Parse visibility modifiers before foreign items
2012-09-27 12:48:09 -07:00
Erick Tryzelaar
b96af73159
turn ast::ident into a struct
...
This will help with the auto_serialize2 migration. We have to change
ident from a type alias to uint into a unique type. We need to use
a struct instead of a "enum ident = token::str_num" because structs
support constants, but newtypes do not.
2012-09-26 16:20:24 -07:00
Graydon Hoare
9c6ae65865
Support visibility qualifiers in crate directives properly.
2012-09-24 17:29:32 -07:00
Brian Anderson
afd91f8a56
Register snapshots. Remove redundant Eq impls, Makefile hacks
2012-09-23 23:01:49 -07:00
Niko Matsakis
ba3eebd41d
Make it illegal to use modes in a fn signature with providing
...
an explicit variable name. (Step one to changing the defaults)
First step to #3535
2012-09-23 13:30:13 -05:00
Brian Anderson
f5be40384f
Revert "syntax: Make attributes sendable for rustdoc's benefit"
...
This reverts commit 90e3665fa7
.
2012-09-20 18:15:39 -07:00
Brian Anderson
90e3665fa7
syntax: Make attributes sendable for rustdoc's benefit
2012-09-20 17:37:21 -07:00
Patrick Walton
9117dcb968
rustc: De-mode all overloaded operators
2012-09-20 09:48:05 -07:00
Brian Anderson
1397dca2dd
core: Move TLS to task::local_data
2012-09-19 19:08:32 -07:00
Brian Anderson
2906f2de31
core: Rename 'unsafe' mod to 'cast'
2012-09-18 19:36:25 -07:00
Brian Anderson
2d11a04e74
libsyntax: Remove 'unchecked_blk' from AST
2012-09-18 11:51:17 -07:00
Niko Matsakis
7107b4eff5
Have parser recognize static, self region.
...
Fixes a bug in methods that &self couldn't be referenced in the
body. Also fixes #2479 .
2012-09-14 15:22:15 -07:00
Niko Matsakis
5d540de769
fixup mutability of vec::each, make iter_bytes pure
...
also, change DVec() to work with imm vectors rather than mut ones
2012-09-12 13:29:31 -07:00
Niko Matsakis
8a8f200d10
Introduce auto adjustment table to subsume autoderef/autoref/borrowings.
...
Fixes #3261
Fixes #3443
2012-09-11 21:25:01 -07:00
Brian Anderson
1a8a0a77b1
Camel case std::serialization
2012-09-10 19:02:57 -07:00
Patrick Walton
22b8757705
rustc: Make shape-based compare glue never called for comparison operators.
...
Only called for string patterns.
2012-09-10 12:48:42 -07:00
Graydon Hoare
5d823d46ad
Migrate std::map to use core: #️⃣ :Hash trait. Disable many hokey hashes.
2012-09-07 17:24:16 -07:00
Tim Chevalier
f5093dff7b
Remove support for multiple traits in a single impl
...
There was half-working support for them, but they were never fully
implemented or even approved. Remove them altogether.
Closes #3410
2012-09-07 17:22:04 -07:00
Tim Chevalier
53ce42dc4f
Implement &-patterns
...
Closes #2855
2012-09-07 17:09:07 -07:00
Patrick Walton
feb014eb3c
rustc: Add an "ne" method to the Eq trait, and implement it everywhere
2012-09-07 12:24:48 -07:00
Patrick Walton
fba673b26b
rustc: Implement private methods.
...
Doesn't work cross-crate yet.
2012-09-04 18:30:27 -07:00