Commit Graph

1227 Commits

Author SHA1 Message Date
Tom Lee
e02716e6d3 Reexport static trait methods on traits in the same module. 2013-05-19 17:07:18 -07:00
Corey Richardson
cc57ca012a Use assert_eq! rather than assert! where possible 2013-05-19 08:16:02 -04:00
bors
99c7750ca6 auto merge of #6603 : thestinger/rust/whitespace, r=thestinger 2013-05-18 22:55:34 -07:00
Daniel Micay
20ef4238bb reduce the usage of explicit version markers 2013-05-19 00:21:41 -04:00
Daniel Micay
1789174541 minor automated whitespace fixes 2013-05-18 22:40:12 -04:00
Tim Chevalier
f21fb3aff5 rustc: Cleaning up bad copies and other XXXes 2013-05-17 21:41:54 -07:00
bors
d68c0279ea auto merge of #6249 : crabtw/rust/arm, r=brson
It uses the private field of TCB head to store stack limit. I tested on my Raspberry PI. A simple hello world program ran without any problem. However, for a more complex program, it segfaulted as #6231.
2013-05-17 18:19:27 -07:00
Huon Wilson
aa179cb0f1 rustc: relax limits on (u)int type limit lint. Fixes #6130. 2013-05-18 01:49:36 +10:00
bors
a3d31f4b80 auto merge of #6550 : Aatch/rust/atomic-load, r=thestinger
This closes #6548

The change makes it match the standard Load signature.
2013-05-17 00:55:29 -07:00
bors
c69f8ea91a auto merge of #6093 : alexcrichton/rust/issue-2647, r=thestinger
Closes #2647

This way it's much easier to add lints throughout compilation correctly, and
functions on impls can alter the way lints are emitted. This involved pretty much rewriting how lints are emitted. Beforehand, only items could alter the lint settings, so whenever a lint was added it had to be associated with whatever item id it was coming from. I removed this (possibly questionably) in favor of just specifying a span and a message when adding a lint. When lint checking comes around, it looks at all the lints and sees which node with attributes best encloses it and uses that level of linting. This means that all consumer code doesn't have to deal with what item things came from (especially because functions on impls aren't items). More details of this can be found in the code (and comments).

As a bonus, I managed to greatly simplify emission of lints in resolve.rs about unused imports. Now instead of it manually tracking what the lint level is, it's all moved over into the lint module (as is to be expected).
2013-05-16 22:25:39 -07:00
Alex Crichton
4d44abd52a Change lints to indicate exactly where the level was set 2013-05-17 00:54:03 -04:00
Alex Crichton
1daaf785ab Optimize lint passes to perform far fewer allocations
Achieves ~3x speedup on lint passes for libcore
2013-05-17 00:49:17 -04:00
Alex Crichton
030c666cc1 Re-implement lint with less emphasis on item ids
This way it's much easier to add lints throughout compilation correctly, and
functions on impls can alter the way lints are emitted.
2013-05-17 00:49:16 -04:00
bors
918bfa710c auto merge of #6546 : cmr/rust/warning, r=thestinger 2013-05-16 21:19:38 -07:00
James Miller
a289dcd187 Fix AtomicLoad builder code 2013-05-17 14:48:24 +12:00
Corey Richardson
c2baaa8d84 fix warnings 2013-05-16 21:53:54 -04:00
bors
17970a9111 auto merge of #6545 : catamorphism/rust/unused-import, r=catamorphism 2013-05-16 17:52:40 -07:00
Tim Chevalier
1bf4f90291 rustc: Remove import that is, indeed, not necessary 2013-05-16 17:25:19 -07:00
Tim Chevalier
226f4dfdfb rustc: One less bad copy 2013-05-16 17:02:27 -07:00
bors
f89e00b3d1 auto merge of #6543 : catamorphism/rust/traits-cleanup, r=nikomatsakis
r? @nikomatsakis Impls can implement either zero or one traits; this has been true
more or less since we removed classes. So I got rid of the comments
saying "we should support multiple traits" and changed the code to
make it clear that we don't. This is just cleanup, and doesn't break
any existing tests.
2013-05-16 16:49:37 -07:00
Tim Chevalier
65b7903ba3 rustc: Change ty::get_impl_traits to return an option instead of a vec
Impls can implement either zero or one traits; this has been true
more or less since we removed classes. So I got rid of the comments
saying "we should support multiple traits" and changed the code to
make it clear that we don't. This is just cleanup, and doesn't break
any existing tests.
2013-05-16 15:54:51 -07:00
bors
00eef96a00 auto merge of #6536 : kud1ing/rust/patch-1, r=brson 2013-05-16 13:37:39 -07:00
bors
c8159b3e35 auto merge of #6473 : nikomatsakis/rust/issue-5967-rvalue-immutability, r=pcwalton
Simpler version of PR #5974 based on new borrowck.
2013-05-16 12:34:40 -07:00
Niko Matsakis
63d878f36b correct typo 2013-05-16 15:12:39 -04:00
Niko Matsakis
035c01af93 Add BuiltinBounds to closure type: parse and handle subtyping,
but do not integrate with kindck etc (requires a snapshot first)
2013-05-16 14:21:02 -04:00
kud1ing
f9a15a6976 main() is in ./rustc.rc. use "./../" pattern some more 2013-05-16 13:22:43 +03:00
bors
2329651770 auto merge of #6503 : sonwow/rust/at_vec-renamed, r=graydon
`str::from_slice` and `vec::from_slice` are changed to `str::to_owned` and `vec::to_owned`. (#6389)

Replace `at_vec::from_owned` and `at_vec::from_slice` with `at_vec::to_managed_consume` and `at_vec::to_managed`.
2013-05-15 19:22:49 -07:00
bors
8257528b6c auto merge of #6502 : huonw/rust/no-auto-code, r=graydon
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute
and remove the majority of the actual auto_* code, leaving stubs to refer the user to
the new syntax.

Also, moves the useful contents of auto_encode.rs to more appropriate spots: tests and comments to deriving/encodable.rs, and the ExtCtxtMethods trait to build.rs (unused so far, but the method syntax might be nicer than using the mk_* fns in many instances).
2013-05-15 18:16:51 -07:00
bors
c18e44ba17 auto merge of #6501 : june0cho/rust/incoming, r=graydon
Fix #3783.
2013-05-15 17:10:46 -07:00
Huon Wilson
5dc5efefd4 syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute
and remove the majority of the actual code, leaving stubs to refer the user to
the new syntax.
2013-05-16 08:55:57 +10:00
Youngsoo Son
f11297f608 rename at_vec::from_owned and at_vec::from_slice to at_vec::to_managed_consume and at_vec::to_managed 2013-05-16 00:33:54 +09:00
bors
4e82610099 auto merge of #6487 : recrack/rust/vec_len, r=thestinger
Rename vec::len(var) to var.len()

```
libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax
test/auxiliary
test/bench
test/run-pass
```
2013-05-15 07:38:07 -07:00
bors
62c7027a32 auto merge of #6485 : cmr/rust/local_rename_import_error, r=catamorphism 2013-05-15 05:43:58 -07:00
Junyoung Cho
37fe2b60d5 Merge type_span and type_def, and ditto with value_span and value_def 2013-05-15 21:33:33 +09:00
Erick Tryzelaar
729708d112 rustc: rename ty::method to ty::Method and add ctor 2013-05-14 20:10:46 -07:00
Erick Tryzelaar
18f6a51d0a rustc: rename ast::self_ty and related fields to explicit_self 2013-05-14 20:10:46 -07:00
Erick Tryzelaar
70e02cf445 rustc: rename a method receiver type to rcvr_ty 2013-05-14 20:10:46 -07:00
Erick Tryzelaar
4bfe0f717f rustc: rename some ty_self variables to self_arg 2013-05-14 20:10:45 -07:00
Erick Tryzelaar
9c80cf548a rustc: Remove ty::arg 2013-05-14 20:10:45 -07:00
Erick Tryzelaar
191fdda46a rustc: minor cleanup 2013-05-14 20:10:45 -07:00
Youngmin Yoo
a2a8596c3d Rename vec::len(var) to var.len() 2013-05-15 11:05:28 +09:00
Corey Richardson
8a69dba84a Fix ICE 2013-05-14 20:34:05 -04:00
Corey Richardson
3bfc1ca91d Get span from import_directive 2013-05-14 19:28:28 -04:00
Corey Richardson
62cbea1ca1 Add span to some import resolution errors 2013-05-14 18:52:31 -04:00
Corey Richardson
03f75b629a Better error reporting with renaming imports 2013-05-14 18:51:36 -04:00
Alex Crichton
ffcc680f9c Fix test fallout from removing vecs_implicitly_copyable 2013-05-14 12:25:19 -04:00
Alex Crichton
5614e83e81 Remove vecs_implicitly_copyable from the compiler 2013-05-14 12:25:18 -04:00
Marvin Löbel
04de8f852c Fix cosmetics for fail!() calls 2013-05-14 16:36:24 +02:00
Björn Steinbrink
bdc182cc41 Use static string with fail!() and remove fail!(fmt!())
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Niko Matsakis
87398f31e5 Add explanatory comment to is_rvalue_or_immutable() 2013-05-14 09:28:58 -04:00