Commit Graph

1601 Commits

Author SHA1 Message Date
Niko Matsakis
2093952847 Partial fix for #2687---impl method must only be subtype of trait method, not exact match. 2012-10-26 19:41:17 -07:00
Tim Chevalier
decbbaa182 Fix long line 2012-10-25 14:54:40 -07:00
Brian Anderson
a9d7642b5d Merge remote-tracking branch '14427/incoming'
Conflicts:
	src/libstd/sort.rs
2012-10-25 14:01:49 -07:00
Patrick Walton
57cd6b3e3f rustc: Translate and check exhaustiveness of struct-like enum variant patterns. r=nmatsakis 2012-10-25 13:59:10 -07:00
Patrick Walton
65ee0e1ded Merge pull request #3858 from pcwalton/struct-like-typeck
rustc: Typecheck, privacy check, and borrow check struct-like enum variants. r=tjc
2012-10-25 12:35:29 -07:00
Tim Chevalier
75947b311a Make error message for non-copyable args less misleading
No review, just changing error message text.

Closes #3855
2012-10-25 12:20:41 -07:00
Patrick Walton
588ea59992 rustc: Typecheck, privacy check, and borrow check struct-like enum variants 2012-10-25 12:15:52 -07:00
Patrick Walton
599b4208fb rustc: Translate tuple struct constructors 2012-10-25 11:49:26 -07:00
Brian Anderson
d82ddc280c Long lines 2012-10-24 20:28:39 -07:00
Niko Matsakis
c6ed01cab3 adjust comments 2012-10-24 18:56:31 -07:00
Niko Matsakis
1a3a70760b Implement proper subtyping for region fn types (part of #2263) 2012-10-24 18:56:31 -07:00
Brian Anderson
a66e01369d Merge pull request #3852 from veddan/type-limits
Lint pass like GCC's -Wtype-limits (#3833)
2012-10-24 14:38:49 -07:00
Patrick Walton
4da58a5bd6 rustc: Implement typechecking for tuple structs. r=nmatsakis 2012-10-24 10:54:09 -07:00
Viktor Dahl
87b5f05a9d Cleaned up formatting and fixed bug in rev_binop 2012-10-24 18:44:37 +02:00
Viktor Dahl
9d915294c9 Implemented '-W type-limits' (#3833) 2012-10-24 18:44:37 +02:00
Patrick Walton
61bb3571a5 rustc: Implement construction of monomorphic struct-like variants. r=nmatsakis 2012-10-23 19:23:46 -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
Tim Chevalier
48c8d1fecd Remove uses of binary move in the compiler 2012-10-23 12:10:04 -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
Brian Anderson
575950d12c rustc: Lower-case the error messages in kind.rs, for consistency 2012-10-23 10:41:33 -07:00
Brian Anderson
b2af873b76 Merge remote-tracking branch 'luqmana/incoming' 2012-10-22 21:44:53 -07:00
Patrick Walton
1048f9abfa rustc: Factor out struct literal typechecking in preparation for struct-like enum variants 2012-10-22 18:00:55 -07:00
Patrick Walton
ec1c60c4d6 rustc: Implement generic cross-crate trait inheritance 2012-10-22 18:00:48 -07:00
Simon BD
cc0f2c6bb2 Merge remote-tracking branch 'original/incoming' into incoming 2012-10-22 18:33:41 -05:00
Brian Anderson
5a86f5d084 rustc: Convert two printlns in trans into debug! 2012-10-22 13:33:44 -07:00
Brian Anderson
64e1ecb939 Long lines 2012-10-22 12:02:55 -07:00
Brian Anderson
2eea07be11 Merge pull request #3826 from jdm/doublefail
Fix ICE stemming from use of unique pointers in unreachable blocks.
2012-10-22 11:32:30 -07:00
Tim Chevalier
14e7df7d1a Fix breakage (forgot to commit this... 2012-10-22 10:54:23 -07:00
Tim Chevalier
dca0776747 Incorporate review comments (mostly fixing indentation)
Previous commit was r=nmatsakis
2012-10-22 09:44:56 -07:00
Tim Chevalier
dd66e7549b Preliminary support for labeled break/continue for loops
This patch adds preliminary middle-end support (liveness and trans)
for breaks and `loop`s to `loop` constructs that have labels.

while and for loops can't have labels yet.

Progress on #2216
2012-10-22 09:20:37 -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
Niko Matsakis
42c05fe642 Correct propagation of mutability from components to base in borrowck
Fixes #3828.
2012-10-21 23:52:36 -07:00
Luqman Aden
e1db959ec2 rustc: add new intrinsics - atomic_cxchg{_acq,_rel} 2012-10-21 22:23:50 -04:00
Josh Matthews
7c7980196c Fix ICE stemming from use of unique pointers in unreachable blocks. 2012-10-21 03:43:41 -04:00
Ben Striegel
ac81fff229 Remove old fixed-length vector syntax 2012-10-20 17:50:46 -07:00
Tim Chevalier
10612ee30c Remove superfluous by-ref in option::get, option::get_default, option::expect
Superficial change, no review.
2012-10-19 11:38:28 -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
Erick Tryzelaar
a7ecde3323 libcore: minor code cleanup.
This is minor and probably completely inconsequential to performance,
but I find vec::map to be more clear than vec::each and a push.
2012-10-18 10:09:57 -07:00
Erick Tryzelaar
95423d28f2 libcore: call [u8] values bytes, not bufs 2012-10-18 10:09:42 -07:00
Erick Tryzelaar
4e03ffdb65 rustc: optimize away some mallocs when building GEP args 2012-10-18 08:03:04 -07:00
Tim Chevalier
33adb7a824 Merge pull request #3739 from killerswan/usagemsg
Add a module to getopts for verbose option group declaration (and use it in rustc)
2012-10-17 13:05:04 -07:00
Kevin Cantu
32baf1c54c Add a module to getopts to support verbose option definition
This is built on top of the existing functionality, but
adds a `groups` module which defines functions allowing
the user to specify whole short/long/description groups
at once and provides a usage message.
2012-10-17 12:10:06 -07:00
Tim Chevalier
7f12cc4e63 Merge pull request #3716 from Blei/fix-3656
rustc: fix size computation of structs for the FFI
2012-10-17 11:00:36 -07:00
Tim Chevalier
081a0434fb Remove integer suffixes 2012-10-16 23:32:58 -07:00
Tim Chevalier
1679960889 Change a use of map::get to map::find 2012-10-16 23:32:57 -07:00
Patrick Walton
4dc67c5e6a rustc: Implement intra-crate static methods on anonymous trait implementations. 2012-10-16 12:22:56 -07:00
Tim Chevalier
b38092e9a2 In ty::normalize_ty, don't replace self_regions with None
Instead, replace with re_static. This was causing ty::subst to
fail when called from trans::type_of::type_of.

Already discussed with nmatsakis and it's a small change, so
no review.

Closes #3447
2012-10-15 17:46:09 -07:00
Tim Chevalier
7d84505654 Error out in resolve if structs try to capture type parameters
Closes #3214
2012-10-15 16:27:53 -07:00
Patrick Walton
91ae5412d8 rustc: Merge module and type namespaces. r=brson 2012-10-15 15:35:36 -07:00
Patrick Walton
c886629d4f rustc: Implement monomorphic default methods. r=nmatsakis 2012-10-15 14:14:05 -07:00