Patrick Walton
0930b95395
rustc: Typecheck struct literals
2012-07-24 11:29:07 -07:00
Patrick Walton
b3cad86a05
rustc: Resolve struct names in struct literals
2012-07-23 18:58:57 -07:00
Graydon Hoare
7680f504c2
Merge pull request #2998 from elliottslaughter/no-landing-pads
...
Add debug flag to turn off landing pads.
2012-07-23 16:47:35 -07:00
Patrick Walton
df4db83ed8
rustc: Max/min classes: Add struct literal syntax
2012-07-23 16:40:05 -07:00
Tim Chevalier
4806a4f120
Merge pull request #3000 from dgryski/master
...
Fix formatting of multiline code blocks in asm-comments
2012-07-23 14:39:08 -07:00
Damian Gryski
9b02acbc5d
Fix formatting of multi-line blocks in asm-comments
2012-07-23 23:18:12 +02:00
Patrick Walton
674dd14eec
rustc: Make vtables use the coherence tables
2012-07-23 13:24:05 -07:00
Elliott Slaughter
d8c75cfbe7
Add debug flag to turn off landing pads.
2012-07-23 13:07:35 -07:00
Elliott Slaughter
d257382863
Moved malloc and free upcalls into rust runtime.
2012-07-23 10:45:58 -07:00
Elliott Slaughter
de82a9be61
Move fail upcall into rust libcore.
2012-07-23 10:45:58 -07:00
Tim Chevalier
beb2cd1658
Remove what's left of resolve1
2012-07-20 17:08:19 -07:00
Niko Matsakis
f676547c97
Fix intersection of two region params in infer, cc #2962
2012-07-19 10:14:16 -07:00
Patrick Walton
f48dcaaae3
rustc: Make vtable do duplicate-impl checking. Closes #2958 .
2012-07-18 18:10:00 -07:00
Tim Chevalier
3119afc6e8
In resolve3, error on non-existent imports
...
Closes #2937
2012-07-18 18:02:07 -07:00
Tim Chevalier
de5d5e6eeb
Remove non-existent imports
2012-07-18 18:02:07 -07:00
Patrick Walton
57e8de8917
rustc: Implement multiple-traits-per-impl for cross-crate stuff
2012-07-18 17:34:59 -07:00
Patrick Walton
635a959363
rustc: Make coherence aware of multiple-traits-per-impl
2012-07-18 17:08:42 -07:00
Patrick Walton
9d34c706b2
rustc: Move ty::impl_traits over to a multiple-traits-per-impl world
2012-07-18 16:49:55 -07:00
Patrick Walton
3c583def25
rustc: Make resolve3 multiple-trait-per-impl-aware
2012-07-18 16:28:59 -07:00
Patrick Walton
3ac5b4a86f
syntax: Parse multiple trait refs in a single implementation
2012-07-18 16:05:17 -07:00
Niko Matsakis
e0ea67a2a6
prevent regions from escaping in ifaces; remove &r.T syntax
2012-07-18 11:48:58 -07:00
Niko Matsakis
4ee4a2ab31
borrow from @[] vectors (cc #2797 )
2012-07-17 19:16:00 -07:00
Patrick Walton
db020ab63c
rustc: Implement and enforce instance coherence
2012-07-17 15:46:43 -07:00
Tim Chevalier
b5729bd600
Support attributes on class ctors and dtors
...
Closes #2660
2012-07-17 12:40:59 -07:00
Tim Chevalier
cf9a9d1ae8
Remove most of old resolve
...
resolve has a few type definitions in it that are used, so I left
those and deleted everything else. Also, I switched rustdoc to use
resolve3 instead of the old resolve.
In a future commit I'll remove the type definitions entirely, as they're
just duplicates of types defined in resolve3.
2012-07-17 12:40:58 -07:00
Niko Matsakis
0e42004bab
introduce an owned kind for data that contains no borrowed ptrs
2012-07-16 20:18:18 -07:00
Niko Matsakis
748f2e0909
improve comment
2012-07-16 13:29:00 -07:00
Niko Matsakis
3ef7ff8b89
infer the scope of borrows
2012-07-14 17:37:32 -07:00
Niko Matsakis
41a21f053c
remove typestate from code, tests, and docs
2012-07-14 17:37:20 -07:00
Michael Sullivan
6822ec3eb4
Treat bare vector and string literals as fixed length vecs. Closes #2922 .
2012-07-14 14:30:48 -07:00
Michael Sullivan
7b2f4755f3
Get rid of ast::ty_vstore, which was only used for fixed length.
2012-07-14 12:45:52 -07:00
Michael Sullivan
d884085f43
Tear out ty_str and ty_vec.
2012-07-14 12:19:36 -07:00
Michael Sullivan
08a4440d64
Fix a bunch of deprecated str/vec errors in code for non 64-bit linux platforms...
2012-07-14 10:05:49 -07:00
Michael Sullivan
5a7d139a38
Merge branch 'vector-reform' into incoming
2012-07-14 01:03:54 -07:00
Michael Sullivan
e2af785606
Make the new world order normative. Closes #2908 .
2012-07-14 01:03:44 -07:00
Michael Sullivan
92743dc2a6
Move the world over to using the new style string literals and types. Closes #2907 .
2012-07-14 01:03:43 -07:00
Michael Sullivan
5c5065e8bd
Don't emit strings when the destination is ignored.
2012-07-14 00:07:24 -07:00
Michael Sullivan
eaf8b7675e
Warn on old strs
2012-07-13 17:59:59 -07:00
Lindsey Kuper
1ffc0720bb
Add FIXME marking where the work on #2794 has gotten to, so far.
2012-07-13 17:46:24 -07:00
Lindsey Kuper
9aa8a84766
Make an error message more grammatical.
2012-07-13 17:46:24 -07:00
Michael Sullivan
985b52be6d
Support prefix notation for vstore strings. Closes #2906 .
2012-07-13 17:03:49 -07:00
Lindsey Kuper
7bba0ae973
Change stray cont
to again
in a comment.
2012-07-13 15:45:24 -07:00
Lindsey Kuper
5a63b2100e
More consistent use of backticks and "expected" in error messages.
...
Got some of the debug messages, here, too. I figure it doesn't hurt
to get used to doing this even in places where users won't ever see
it.
2012-07-13 15:31:39 -07:00
Tim Chevalier
07a81ad12e
Refactor how impl self types are stored
...
In order to avoid a confusing use of the tcache, I added an extra
node ID field to trait refs. Now trait refs have a "ref ID" (the one
that resolve3 resolves) and an "impl ID" (the one that you look up
in the tcache to get the self type).
Closes #2434
2012-07-13 14:47:04 -07:00
Lindsey Kuper
fc9c4c3245
Front-end support for default impls in traits.
2012-07-13 11:16:07 -07:00
Lindsey Kuper
d5563d732d
Consistently use "allowed" rather than "permitted" in error messages.
2012-07-13 11:10:18 -07:00
Niko Matsakis
a2f60651f1
add comments to region inference
2012-07-13 10:20:50 -07:00
Zack Corr
de001dd61c
Change cont out of loop error to again out of loop
2012-07-14 01:24:33 +10:00
Tim Chevalier
78ec6fe30c
Obliterate the callee_id hack
...
Exprs that could be applications of overloaded operators
(expr_unary, expr_binary, expr_index) relied on the previous node ID
being "reserved" to carry extra typechecking info. This was
incredibly error-prone. Fixed it; now all exprs have two node IDs
(which will be wasted in some cases; future work could make this
an option instead if the extra int field ends up being a performance
problem).
Closes #2804
2012-07-12 19:02:07 -07:00
Eric Holk
aba665da32
Fix the signature on vec::view.
...
Due to limitations in region inference, this has the effect of making vec::view pretty much entirely unusable.
2012-07-12 18:16:00 -07:00
Brian Anderson
dac4916cec
rustc: Resolve bounds of trait type parameters
2012-07-12 18:04:40 -07:00
Michael Sullivan
c84c4a8d71
Handle str/~ in patterns.
2012-07-12 16:52:26 -07:00
Michael Sullivan
2ea9c8df0f
Accept prefix notation for writing the types of str/~ and friends.
2012-07-12 16:52:26 -07:00
Brian Anderson
46fba10fe8
rustc: Make all impls even more reachable
...
With this we write metadata for all impls so that we can properly find
reexported impls.
2012-07-12 15:09:33 -07:00
Michael Sullivan
9d2e5f3a65
Merge branch 'rt-changes' into incoming
2012-07-12 15:03:54 -07:00
Michael Sullivan
7b26503566
Make str be treated as str/~.
2012-07-12 00:21:04 -07:00
Michael Sullivan
b569bdec9f
Refactor how we convert vstore ast types to ty types.
2012-07-12 00:12:13 -07:00
Niko Matsakis
b9aa9def85
infer when types are region parameterized rather than requiring /&
...
- removes various fields from various variants in the AST
- also update tests not to use this notation
2012-07-11 14:41:41 -07:00
Niko Matsakis
9b094c0baf
new option to note where purity is req'd
2012-07-11 14:41:41 -07:00
Niko Matsakis
668285b9c8
add ability to report statistics about how borrowck is being used
2012-07-11 14:41:41 -07:00
Patrick Walton
9b7d9a9a1b
rustc: Treat existential traits as base types for coherence purposes
2012-07-11 14:28:03 -07:00
Michael Sullivan
62e9ae04e2
Remove obsolete type param field from shape information.
2012-07-11 11:42:49 -07:00
Michael Sullivan
120773b2a7
Change the interface of placement new to take a tydesc as part of Issue #2831 .
2012-07-11 11:42:49 -07:00
Patrick Walton
e51f259ff0
rustc: Add some more checks to coherence
2012-07-11 11:23:14 -07:00
Eric Holk
877ebed6cf
Visit item macros.
2012-07-10 22:00:48 -07:00
Tim Chevalier
f39477d926
In resolve, check that an or-pattern has the same number of bindings in each disjunct
...
resolve3 wasn't checking this. Added test cases. Also added a helpful informational
message in the case where you have a variable binding that you probably think
refers to a variant that you forgot to import.
This is easier to do in resolve than in typeck because there's code in typeck
that assumes that each of the patterns binds the same number of variables.
2012-07-10 18:24:41 -07:00
Patrick Walton
019d4291c7
rustc: Introduce a coherence checker, behind a compile switch for now
2012-07-10 17:35:18 -07:00
Michael Sullivan
260f73ed85
Get rid of unused fields in tydescs. Closes #2351 .
2012-07-10 16:33:21 -07:00
Michael Sullivan
e430a699f2
Fix take glue for slices.
2012-07-10 16:32:54 -07:00
Michael Sullivan
baebccd2c8
Don't fail when emitting free glue for fixed and region evecs.
2012-07-10 15:57:48 -07:00
Graydon Hoare
f2b8ab0ad3
Mop up merge collision.
2012-07-10 15:25:58 -07:00
Graydon Hoare
0a4a602a23
Modify reflect interface to pass tydescs back to client, stop on false return.
...
These changes are required to prune type-recursion and admit early
returns in the visitor code. Changes to visitors in subsequent csets.
2012-07-10 15:16:48 -07:00
Michael Sullivan
ef9a64709e
Make old_vecs an error.
2012-07-10 15:12:13 -07:00
Michael Sullivan
bf06deafe6
Disallow implicitly binding methods in typechecker. Closes #2189 .
2012-07-10 15:12:13 -07:00
Michael Sullivan
e4362a59b9
Remove the empty tuple of tydescs from closures. Closes #2531 .
2012-07-10 15:12:13 -07:00
Michael Sullivan
95dd9f3204
Get rid of a lot of bind related cruft as part of Issue #2189 .
2012-07-10 15:12:12 -07:00
Michael Sullivan
25b152397d
Clean up the tydesc handling code in trans.
2012-07-10 15:12:12 -07:00
Patrick Walton
a6ee46db0b
rustc: Resolve expressions in literal and range patterns
2012-07-10 12:30:02 -07:00
Patrick Walton
f0fe08f1c8
rustc: Handle foreign item purity correctly in resolve3
2012-07-09 18:39:10 -07:00
Paul Stansifer
579768baa5
Allow folds to drop items.
2012-07-09 17:44:46 -07:00
Patrick Walton
6912b11089
rustc: Fix the collision with Tim's change
2012-07-09 17:44:15 -07:00
Patrick Walton
2edc4195d5
rustc: Allow import resolutions to be inferred from external crates in resolve3
2012-07-09 16:29:25 -07:00
Graydon Hoare
c26d02557e
Switch 'cont' to 'again' everywhere. Close #2229 .
2012-07-09 14:37:48 -07:00
Josh Matthews
a7f6e00944
Fix metadata serialization of foreign functions. Properly take the value of foreign functions from other crates to fix #1840 .
2012-07-09 13:13:49 -07:00
Ben Blum
8ffab392ab
change borrowck error msg: 'declared in outer block' -> 'captured in a closure' (properly this time)
2012-07-09 14:01:39 -04:00
Patrick Walton
e41029d236
rustc: Switch to the new resolution pass
2012-07-09 10:27:13 -07:00
Brian Anderson
ea03315cf4
Revert "change borrowck error msg: 'declared in outer block' -> 'captured in a closure'"
...
This change requires some tests to be updated.
This reverts commit b5b8f5efcc
.
2012-07-08 00:07:15 -07:00
Niko Matsakis
a856bccdc6
Revert "rustc: Switch to the new resolution pass"
...
This reverts commit c4af6e92fb
.
Branch was burning...many, many unresolved imports.
2012-07-06 20:45:06 -07:00
Ben Blum
b5b8f5efcc
change borrowck error msg: 'declared in outer block' -> 'captured in a closure'
2012-07-06 22:30:50 -04:00
Patrick Walton
c4af6e92fb
rustc: Switch to the new resolution pass
2012-07-06 19:07:26 -07:00
Michael Sullivan
038f925586
Be less eager about implicit borrowing when doing method resolution. Closes #2796 .
2012-07-06 15:55:18 -07:00
Graydon Hoare
ceac155211
For #2229 , recognize 'again' in place of 'cont', final change pending snapshot.
2012-07-06 15:46:39 -07:00
Michael Sullivan
9e6b43fb33
Rip out a bunch more append code from trans.
2012-07-06 15:04:57 -07:00
Eric Holk
0e1a6cf3d9
Remove tvec::trans_add
2012-07-06 14:13:52 -07:00
Michael Sullivan
ee0177b908
Move string append to libraries. Closes #2710 .
2012-07-06 13:37:56 -07:00
Eric Holk
05cdda3a2c
Plumbing and parsing for item-position macros.
2012-07-06 10:42:40 -07:00
Lindsey Kuper
47f61c5429
Clean up error message punctuation/capitalization
2012-07-05 16:18:58 -07:00
Tim Chevalier
889be71cb4
Comments only: change TODOs to FIXMEs and annotate them
2012-07-05 16:10:29 -07:00
Michael Sullivan
b0d4f09201
Consider slices to be a structural type. Closes #2748 .
2012-07-05 14:48:23 -07:00
Lindsey Kuper
33334f3c43
Change 'iface' to 'trait' internally; parse trait
as iface
synonym
2012-07-05 11:01:43 -07:00