Commit Graph

18954 Commits

Author SHA1 Message Date
John Clements
999f692645 getting rid of interner_key! macro 2013-05-20 11:49:21 -07:00
John Clements
fc4f304ef9 hygiene infrastructure.
- added a hash table to memoize rename and mark operations.
- added rename, mark, and resolve fold fns
2013-05-20 11:49:21 -07:00
John Clements
b621820dc4 detect unused attrs in one more place, allow parsing to continue for all
changed a bunch of fatal()'s into err()'s, to allow parsing to proceed.
2013-05-20 11:49:20 -07:00
John Clements
05ab83eea8 parser comment 2013-05-20 11:49:20 -07:00
John Clements
975f264983 refactoring test functions 2013-05-20 11:49:20 -07:00
Alex Crichton
15f97acdc8 Correctly track the source of imports with the same name 2013-05-20 13:02:08 -05:00
Björn Steinbrink
19dc72809d Optimize the lookup of traits containing a given method
Currently, trait_info is a hashmap that allows a quick lookup of all
methods contained in a given trait, but we actually only use it to
lookup traits that contain a given method. Adjusting the map to support
the lookup we actually need gives a nice speed boost, reducing the time
required for the resolution step for librustc from ~2.6s to ~1.0s on my
box.
2013-05-20 19:50:30 +02:00
bors
f3b458b5c5 auto merge of #6644 : steveklabnik/rust/remove_unsafe_warning, r=bstrie
Since a snapshot was done last night, these are good to go.
2013-05-20 10:31:44 -07:00
Björn Steinbrink
b5be7d8a2c Avoid range checks in HashMap::each() 2013-05-20 18:42:31 +02:00
bors
84233c0b4b auto merge of #6643 : sanxiyn/rust/legacy-modes, r=bstrie 2013-05-20 09:34:44 -07:00
Steve Klabnik
eb3f47a40a Remove two warnings about unneccesary safe blocks.
Since a snapshot was done last night, these are good to go.
2013-05-20 09:17:19 -07:00
Seo Sanghyeon
17dfebf883 Remove legacy_modes 2013-05-21 00:41:56 +09:00
bors
f323b0c8ba auto merge of #6640 : dotdash/rust/hash_perf, r=bstrie
The function was a workaround for bootstrapping that isn't required
anymore and just degrades hashmap performance, as it doesn't get inlined
cross-crate and turns a no-op into a call.
2013-05-20 05:19:40 -07:00
Brendan Zabarauskas
eef03c39cf Update to stop unsolicited copying and mark methods as unsafe 2013-05-20 22:07:35 +10:00
Björn Steinbrink
09efd472a9 Remove outdated function transmute_for_stage0
The function was a workaround for bootstrapping that isn't required
anymore and just degrades hashmap performance, as it doesn't get inlined
cross-crate and turns a no-op into a call.
2013-05-20 12:10:55 +02:00
Olivier Saut
3f232bc4a0 Add ARC::get method and implements the function from it. Add an example showing a simple use of ARC. 2013-05-20 12:07:14 +02:00
Olivier Saut
a9c7d3f775 Typo corrected and updated copyright years 2013-05-20 12:06:37 +02: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
bors
ea0640764a auto merge of #6629 : steveklabnik/rust/remove_uvio_warnings, r=catamorphism
Mostly of the 'unused imports' kind.

I'm unsure about the 'no unsafe' bit, but that's what it says...
2013-05-20 00:25:40 -07:00
Brian Anderson
66319b0278 Register snapshots 2013-05-19 23:34:32 -07:00
bors
d019e145c0 auto merge of #6621 : steveklabnik/rust/expand_reader_docs, r=thestinger
Had a conversation with @cmr in IRC about some places that these
docs were confusing. The functions that advance the stream now say so.

In addition, I think that calling out the similarities to familliar C
functions should help people coming from other languages.
2013-05-19 23:13:36 -07:00
bors
3a481c0f88 auto merge of #6627 : steveklabnik/rust/remove_warnings, r=thestinger,catamorphism
These imports were not being used.
2013-05-19 21:58:38 -07:00
Steve Klabnik
dcc2879266 Add a few 'function's.
This is now 100% consistent. Whoops!
2013-05-19 22:40:13 -06:00
Steve Klabnik
d3f70b141a Fix many warnings. 2013-05-19 21:32:32 -07:00
bors
0b39bc275e auto merge of #6624 : steveklabnik/rust/io_prelude, r=catamorphism
Let's actually give a top-level description of what's in here, eh?
2013-05-19 20:49:42 -07:00
Steve Klabnik
dc57d15b69 Remove more warnings.
Mostly of the 'unused imports' kind.
2013-05-19 20:00:39 -07:00
bors
cab9249c62 auto merge of #6625 : cmr/rust/constops, r=Aatch 2013-05-19 19:40:39 -07:00
Steve Klabnik
06d196ad5f Removing some warnings from logging.rs
These imports were not being used.
2013-05-19 19:40:36 -07:00
Steve Klabnik
91d3e7f1a0 Fix wording per feedback
Thanks @catamorphism!
2013-05-19 20:39:02 -06: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
Steve Klabnik
b1e805694b Add a better introduction for the io module.
Let's actually give a top-level description of what's in here, eh?
2013-05-19 19:02:55 -07:00
bors
9283dfe0b4 auto merge of #6619 : steveklabnik/rust/stdout_docs, r=thestinger
Added docs for stdout, stderr, print, and println.
2013-05-19 18:22:33 -07:00
bors
7396f7f004 auto merge of #6432 : thomaslee/rust/issue-4202-02, r=catamorphism
My earlier fix for #4202 would not work correctly if the trait being exported was a top-level item relative to the module from which it was being exported. An example that would not work correctly with the original patch:

    // foo.rs

    pub use Foo = self::Bar;

    pub trait Bar {
      pub fn bar() -> Self;
    }

    impl Bar for int {
      pub fn bar() -> int { 42 }
    }

    // bar.rs

    fn main() {
      foo::Foo::bar()
    }

This is now supported.

I believe this change will allow the GenericPath trait to be exported from core::path as Path in such a manner, which should allow #5389 to move forward.
2013-05-19 17:13:34 -07: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
Steve Klabnik
5877727285 Fix trailing whitespace 2013-05-19 15:31:19 -07:00
bors
ebdb0dee27 auto merge of #6620 : steveklabnik/rust/stdin_docs, r=brson 2013-05-19 14:10:35 -07:00
Steve Klabnik
1065a92bf3 Elaborate a bit in the Reader docs regarding stream position.
Had a conversation with @cmr in IRC about some places that these
docs were confusing. The functions that advance the stream now say so.

In addition, I think that calling out the similarities to familliar C
functions should help people coming from other languages.
2013-05-19 12:57:00 -07:00
Steve Klabnik
929050de73 Added note about prelude inclusion. 2013-05-19 12:42:00 -07:00
Steve Klabnik
a389d86fa4 Add docs for stdin in core::io. 2013-05-19 12:33:01 -07:00
Steve Klabnik
e0b1bdca5b Add additional documentation in core::io.
Added docs for stdout, stderr, print, and println.
2013-05-19 12:06:39 -07:00
bors
9f671698e6 auto merge of #6106 : thestinger/rust/iter, r=bstrie
I don't have a strong opinion on the function vs. method, but there's no point in having both. I'd like to make a `repeat` adaptor like Python/Haskell for turning a value into an infinite stream of the value, so this has to at least be renamed.
2013-05-19 08:13:30 -07:00
bors
5cbdc53f89 auto merge of #6601 : cmr/rust/assert_eq, r=Aatch 2013-05-19 05:22:31 -07:00
Corey Richardson
cc57ca012a Use assert_eq! rather than assert! where possible 2013-05-19 08:16:02 -04:00
bors
3acf37897a auto merge of #6595 : bjz/rust/core-tuple, r=thestinger 2013-05-19 03:01:28 -07:00
Huon Wilson
3a11ddb1b2 Correct tuple Ord impl, add Total{Eq,Ord} impls and add some tests. 2013-05-19 18:51:14 +10:00