Commit Graph

1238 Commits

Author SHA1 Message Date
Alex Crichton
074799b4c5 Implement a lint mode to detect unnecessary allocations 2013-05-20 16:08:50 -05:00
Seo Sanghyeon
17dfebf883 Remove legacy_modes 2013-05-21 00:41:56 +09:00
bors
2e6cda254a auto merge of #6635 : brson/rust/snapshot, r=brson 2013-05-20 02:46:36 -07:00
bors
ab46a38039 auto merge of #6632 : steveklabnik/rust/remove_more_warnings, r=thestinger
With this, the build is almost 100% warning free.

One more can be fixed after the next snapshot, and there's one other that I filed an issue about already.
2013-05-20 01:37:39 -07:00
Brian Anderson
66319b0278 Register snapshots 2013-05-19 23:34:32 -07:00
Steve Klabnik
d3f70b141a Fix many warnings. 2013-05-19 21:32:32 -07:00
Corey Richardson
808c5b8d4e Test fixes, use LLVMConstFCmp in ConstFCmp 2013-05-19 22:09:32 -04:00
Corey Richardson
b97642758f Fix LLVMConst{I,F}Cmp 2013-05-19 22:09:32 -04:00
Corey Richardson
e42fcb958c Implement unimplemented const binops 2013-05-19 22:09:32 -04:00
Tom Lee
e3a91f60c5 Explain an odd conditional check. 2013-05-19 17:07:18 -07:00
Tom Lee
cac97d7ee5 Remove unused variable. 2013-05-19 17:07:18 -07:00
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