]> git.lizzy.rs Git - rust.git/log
rust.git
11 years agolibcore: Add read_until to ReaderUtil.
Luqman Aden [Sun, 3 Mar 2013 10:03:30 +0000 (02:03 -0800)]
libcore: Add read_until to ReaderUtil.

11 years agoauto merge of #5203 : erickt/rust/incoming, r=brson
bors [Sun, 3 Mar 2013 04:12:36 +0000 (20:12 -0800)]
auto merge of #5203 : erickt/rust/incoming, r=brson

My merges for #5143 missed a couple other copies. This patch corrects this, and gets stage0 to compile libsyntax with `#[deny(vecs_implicitly_copyable)]`. stage1 still fails though.

11 years agoauto merge of #5197 : pcwalton/rust/fn-types, r=pcwalton
bors [Sun, 3 Mar 2013 03:18:37 +0000 (19:18 -0800)]
auto merge of #5197 : pcwalton/rust/fn-types, r=pcwalton

r? @catamorphism

11 years agolibrustc: Stop parsing `fn@`, `fn~`, and `fn&`
Patrick Walton [Sat, 2 Mar 2013 00:59:46 +0000 (16:59 -0800)]
librustc: Stop parsing `fn@`, `fn~`, and `fn&`

11 years agolibrustdoc: Remove `fn@`, `fn~`, and `fn&` from compiletest, fuzzer, rustdoc, and...
Patrick Walton [Sat, 2 Mar 2013 00:02:22 +0000 (16:02 -0800)]
librustdoc: Remove `fn@`, `fn~`, and `fn&` from compiletest, fuzzer, rustdoc, and rt. rs=defun

11 years agotest: Remove `fn@`, `fn~`, and `fn&` from the test suite. rs=defun
Patrick Walton [Fri, 1 Mar 2013 23:55:31 +0000 (15:55 -0800)]
test: Remove `fn@`, `fn~`, and `fn&` from the test suite. rs=defun

11 years agoauto merge of #5114 : osaut/rust/incoming, r=brson
bors [Sun, 3 Mar 2013 02:21:39 +0000 (18:21 -0800)]
auto merge of #5114 : osaut/rust/incoming, r=brson

Several typos corrected in the comments of  src/libcore/iter.rs and 2013 added to the copyright header (as requested on CONTRIBUTING.md)

11 years agolibcore: Remove `fn@`, `fn~`, and `fn&` from libcore. rs=defun
Patrick Walton [Fri, 1 Mar 2013 22:32:37 +0000 (14:32 -0800)]
libcore: Remove `fn@`, `fn~`, and `fn&` from libcore. rs=defun

11 years agolibstd: Remove `fn@`, `fn~`, and `fn&` from libstd. rs=defun
Patrick Walton [Fri, 1 Mar 2013 22:15:15 +0000 (14:15 -0800)]
libstd: Remove `fn@`, `fn~`, and `fn&` from libstd. rs=defun

11 years agolibsyntax: Remove `fn@`, `fn~`, and `fn&` from libsyntax. rs=defun
Patrick Walton [Fri, 1 Mar 2013 21:30:06 +0000 (13:30 -0800)]
libsyntax: Remove `fn@`, `fn~`, and `fn&` from libsyntax. rs=defun

11 years agolibrustc: Remove `fn@`, `fn~`, and `fn&` from librustc. rs=defun
Patrick Walton [Fri, 1 Mar 2013 20:11:07 +0000 (12:11 -0800)]
librustc: Remove `fn@`, `fn~`, and `fn&` from librustc. rs=defun

11 years agolibrustc: Forbid chained imports and fix the logic for one-level renaming imports
Patrick Walton [Fri, 1 Mar 2013 18:44:43 +0000 (10:44 -0800)]
librustc: Forbid chained imports and fix the logic for one-level renaming imports

11 years agoauto merge of #5199 : thestinger/rust/hashmap, r=brson
bors [Sun, 3 Mar 2013 00:30:39 +0000 (16:30 -0800)]
auto merge of #5199 : thestinger/rust/hashmap, r=brson

Closes #4764

11 years agoauto merge of #5198 : youknowone/rust/repeat-count, r=brson
bors [Sat, 2 Mar 2013 23:33:39 +0000 (15:33 -0800)]
auto merge of #5198 : youknowone/rust/repeat-count, r=brson

Before:
````
test.rs:3:21: 3:30 error: expected constant integer for repeat count but found variable
test.rs:3             let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable
                              ^~~~~~~~~
````

After:
````
test.rs:3:27: 3:28 error: expected constant integer for repeat count but found variable
test.rs:3             let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable
                                     ^
````

11 years agoauto merge of #5206 : thestinger/rust/cmp, r=brson
bors [Sat, 2 Mar 2013 21:57:40 +0000 (13:57 -0800)]
auto merge of #5206 : thestinger/rust/cmp, r=brson

minor little performance issue - the vector and string implementations of TotalOrd turn out badly without explicitly inlining this

11 years agoinline the implementation of TotalOrd for integers
Daniel Micay [Sat, 2 Mar 2013 21:30:42 +0000 (16:30 -0500)]
inline the implementation of TotalOrd for integers

11 years agolibsyntax: add some more explicit copies for vecs_implicitly_copyable)
Erick Tryzelaar [Sat, 2 Mar 2013 19:17:11 +0000 (11:17 -0800)]
libsyntax: add some more explicit copies for vecs_implicitly_copyable)

11 years agoauto merge of #5143 : erickt/rust/incoming, r=pcwalton
bors [Sat, 2 Mar 2013 16:30:41 +0000 (08:30 -0800)]
auto merge of #5143 : erickt/rust/incoming, r=pcwalton

Good morning,

It's taken a long time, but I finally am almost done freeing libsyntax of `vecs_implicitly_copyable` in this pull request, but I'm running into some issues. I've confirmed that all but the last commit (which only disables `vecs_implicitly_copyable` pass the `check` tests. The last commit errors with this message, which makes no sense to me:

```
/Users/erickt/rust/rust/src/libcore/num/f32.rs:35:37: 35:43 error: expected `,` but found `=`
/Users/erickt/rust/rust/src/libcore/num/f32.rs:35         pub pure fn $name($( $arg : $arg_ty ),*) -> $rv {
                                                                                       ^~~~~~
```

and this stack trace:

```
#1  0x00000001000b059b in sys::begin_unwind_::_a923ca4ae164c::_06 ()
#2  0x00000001000b0542 in sys::begin_unwind::anon::anon::expr_fn_13876 ()
#3  0x00000001000048a1 in sys::begin_unwind::_8ec273289fc0adc0::_06 ()
#4  0x00000001005df999 in diagnostic::__extensions__::meth_7941::span_fatal::_efdf2d14612d79ec::_06 ()
#5  0x0000000100682d48 in parse::parser::__extensions__::meth_16938::fatal::_8aa3239426747a3::_06 ()
#6  0x00000001006850b8 in parse::common::__extensions__::meth_17005::expect::_d3604ec6c7698d5f::_06 ()
#7  0x00000001006b59f1 in parse::common::__extensions__::parse_seq_to_before_end_17860::_48c79835f9eb1011::_06 ()
#8  0x00000001006a50f7 in parse::parser::__extensions__::meth_17606::parse_fn_decl::_14f3785fe78967d::_06 ()
#9  0x00000001006b6f59 in parse::parser::__extensions__::meth_17987::parse_item_fn::_8a6be529cf7b2ca5::_06 ()
#10 0x00000001006ac839 in parse::parser::__extensions__::meth_17761::parse_item_or_view_item::_bfead947d6dd7d25::_06 ()
#11 0x00000001006c8b8f in parse::parser::__extensions__::meth_18364::parse_item::_96b54e33f65abe76::_06 ()
#12 0x000000010076179f in ext::tt::macro_rules::add_new_extension::generic_extension::anon::anon::expr_fn_23365 ()
#13 0x000000010072e793 in ext::expand::expand_item_mac::_a4f486c4465cfb1b::_06 ()
#14 0x00000001007b5ad3 in __morestack ()
```

There also a bunch of new warnings that I haven't cleaned up yet: https://gist.github.com/erickt/5048251.

@nikomatsakis thought there might be some scary bug in the parser caused by moving a vector in the parser instead of copying it, which is why I'm filing this pull request before it's ready. Thanks for any help!

11 years agoMerge remote-tracking branch 'remotes/origin/incoming' into incoming
Erick Tryzelaar [Sat, 2 Mar 2013 15:12:53 +0000 (07:12 -0800)]
Merge remote-tracking branch 'remotes/origin/incoming' into incoming

11 years agoauto merge of #5196 : thestinger/rust/ord, r=catamorphism
bors [Sat, 2 Mar 2013 13:15:39 +0000 (05:15 -0800)]
auto merge of #5196 : thestinger/rust/ord, r=catamorphism

This allows `TreeMap`/`TreeSet` to fully express their requirements and reduces the comparisons from ~1.5 per level to 1 which really helps for string keys.

I also added `ReverseIter` to the prelude exports because I forgot when I originally added it.

11 years agotreemap: reimplement using TotalOrd
Daniel Micay [Sat, 2 Mar 2013 18:27:29 +0000 (13:27 -0500)]
treemap: reimplement using TotalOrd

11 years agoadd a TotalOrd trait
Daniel Micay [Sat, 2 Mar 2013 03:07:12 +0000 (22:07 -0500)]
add a TotalOrd trait

11 years agoauto merge of #5137 : yjh0502/rust/empty_struct, r=nikomatsakis
bors [Sat, 2 Mar 2013 12:21:38 +0000 (04:21 -0800)]
auto merge of #5137 : yjh0502/rust/empty_struct, r=nikomatsakis

The fix is straight-forward, but there are several changes
while fixing the issue.

1) disallow `mut` keyword when making a new struct

In code base, there are following code,

```rust
struct Foo { mut a: int };
let a = Foo { mut a: 1 };
```

This is because of structural record, which is
deprecated corrently (see issue #3089) In structural
record, `mut` keyword should be allowd to control
mutability. But without structural record, we don't
need to allow `mut` keyword while constructing struct.

2) disallow structural records in parser level
This is related to 1). With structural records, there
is an ambiguity between empty block and empty struct
To solve the problem, I change parser to stop parsing
structural records. I think this is not a problem,
because structural records are not compiled already.

Misc. issues

There is an ambiguity between empty struct vs. empty match stmt.
with following code,

```rust
match x{} {}
```

Two interpretation is possible, which is listed blow

```rust
match (x{}) {} //  matching with newly-constructed empty struct
(match x{}) {}  //  matching with empty enum(or struct) x
                //  and then empty block
```

It seems that there is no such code in rust code base, but
there is one test which uses empty match statement:
https://github.com/mozilla/rust/blob/incoming/src/test/run-pass/issue-3037.rs

All other cases could be distinguished with look-ahead,
but this can't be. One possible solution is wrapping with
parentheses when matching with an uninhabited type.

```rust
enum what { }
fn match_with_empty(x: what) -> ~str {
    match (x) { //use parentheses to remove the ambiguity
    }
}
```

11 years agoauto merge of #5193 : sethpink/rust/struct-tup-pp, r=catamorphism
bors [Sat, 2 Mar 2013 11:06:38 +0000 (03:06 -0800)]
auto merge of #5193 : sethpink/rust/struct-tup-pp, r=catamorphism

- Removed space between struct name and parentheses
- Fixed indentation of the rest of the file (missing end)
- Don't print parentheses for structs with no fields
- Added test

11 years agoauto merge of #5191 : brson/rust/movert, r=brson
bors [Sat, 2 Mar 2013 10:09:38 +0000 (02:09 -0800)]
auto merge of #5191 : brson/rust/movert, r=brson

Moving them out of the way so the new scheduler code can occupy core::rt.

11 years agomake LinearMap fields private
Daniel Micay [Sat, 2 Mar 2013 10:09:36 +0000 (05:09 -0500)]
make LinearMap fields private

Closes #4764

11 years agoauto merge of #5188 : ben0x539/rust/doc-call-generic-fn, r=catamorphism
bors [Sat, 2 Mar 2013 09:00:41 +0000 (01:00 -0800)]
auto merge of #5188 : ben0x539/rust/doc-call-generic-fn, r=catamorphism

I have seen a few people confused on how to explicitly instantiate generic functions, since the syntax differs from C++'s and C#'s, which is probably where most people asking questions about generic functions are coming from. The only use of the `::<T>` syntax in the reference right now is in the section on paths, which is possibly not where someone trying to find out about generic functions is going to start looking. The tutorial doesn't mention it at all, but I think it's all right to make the reference a tiny bit more redundant and avoid stuffing the tutorial with syntax details.

----

The "Generic functions" subsection mentions that generic functions are instantiated based on context, so let's also mention right away (with a link to the #paths section) that an explicit form is available.

This also adds an example that explicitly instantiates a generic function to the function call expression section.

11 years agoBetter highlight for repeat count error
Jeong YunWon [Sat, 2 Mar 2013 08:43:24 +0000 (17:43 +0900)]
Better highlight for repeat count error

Before:
````
test.rs:3:21: 3:30 error: expected constant integer for repeat count but found variable
test.rs:3             let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable
                              ^~~~~~~~~
````

After:
````
test.rs:3:27: 3:28 error: expected constant integer for repeat count but found variable
test.rs:3             let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable
                                     ^
````

11 years agoauto merge of #5187 : ben0x539/rust/docs-unit-struct, r=catamorphism
bors [Sat, 2 Mar 2013 08:06:41 +0000 (00:06 -0800)]
auto merge of #5187 : ben0x539/rust/docs-unit-struct, r=catamorphism

This adds a few words about unit-like struct types (`struct Foo;`) in the sections for `struct` items, structure expressions and structure types (and fixes an adjacent typo or two). The added text is at the same time triply redundant because of how the sections are split and rather brief because I don't think there's that much to say about field-less structs without digressing into `impl`s and generic functions and whatnot, but it's probably better than nothing for a start.

The added arm for the grammar of struct expressions is really awkward. It's just

    | expr_path

which is clearly not unambiguously a struct expression, but it didn't feel right not to add anything to the grammar chunk (and I can't tell whether the arm for enum-like structs is somehow unambiguous with regular enum expressions, either). Is this okay?

11 years agoauto merge of #5186 : ben0x539/rust/contributing, r=brson
bors [Sat, 2 Mar 2013 07:18:40 +0000 (23:18 -0800)]
auto merge of #5186 : ben0x539/rust/contributing, r=brson

I'm wary of editing the offical-looking things like the contribution policy, but I hope fixing typos/the sentence structure is okay.

11 years agoauto merge of #5185 : ben0x539/rust/net-tcp-docs, r=brson
bors [Sat, 2 Mar 2013 04:51:40 +0000 (20:51 -0800)]
auto merge of #5185 : ben0x539/rust/net-tcp-docs, r=brson

This changes various type_names to TypeNames and fixes the example for `tcp::accept` that was still using the old `match` syntax and `{|args| ...}` closures.

The `accept` example was fairly outdated. I was just going to stay away from all the IO things until the scheduler revamp lands, but `accept` is probably one of the obvious starting points for networking stuff for a learner, and I don't want to get in the way of anyone's enthusiasm.

Doesn't touch non-comment lines, so I hope I will get away without learning about unit tests. It doesn't seem like the test system is set up to extract tests from doc comments right now.

11 years agoMerge remote-tracking branch 'remotes/origin/incoming' into incoming
Erick Tryzelaar [Sat, 2 Mar 2013 04:35:55 +0000 (20:35 -0800)]
Merge remote-tracking branch 'remotes/origin/incoming' into incoming

11 years agoRemove REC, change related tests/docs
Jihyun Yu [Sat, 2 Mar 2013 03:57:05 +0000 (12:57 +0900)]
Remove REC, change related tests/docs

11 years agoauto merge of #5165 : brson/rust/unstable, r=brson
bors [Sat, 2 Mar 2013 03:45:41 +0000 (19:45 -0800)]
auto merge of #5165 : brson/rust/unstable, r=brson

r?

This probably isn't controversial, but I want somebody else to sign off on it.

11 years agoFix some struct-tuple def prettyprint issues
Seth Pink [Sat, 2 Mar 2013 02:42:02 +0000 (12:42 +1000)]
Fix some struct-tuple def prettyprint issues
- Removed space between struct name and parentheses
- Fixed indentation of the rest of the file (missing end)
- Don't print parentheses for structs with no fields
- Added test

11 years agoauto merge of #5190 : brson/rust/snap, r=brson
bors [Sat, 2 Mar 2013 02:15:41 +0000 (18:15 -0800)]
auto merge of #5190 : brson/rust/snap, r=brson

11 years agoMerge remote branch 'nmatsakis/parser-perf-problem' into incoming
Patrick Walton [Sat, 2 Mar 2013 02:09:27 +0000 (18:09 -0800)]
Merge remote branch 'nmatsakis/parser-perf-problem' into incoming

11 years agocore: Move core::rt to core::unstable::lang
Brian Anderson [Sat, 2 Mar 2013 01:27:14 +0000 (17:27 -0800)]
core: Move core::rt to core::unstable::lang

11 years agoRegister FreeBSD snapshot
Brian Anderson [Sat, 2 Mar 2013 01:23:25 +0000 (17:23 -0800)]
Register FreeBSD snapshot

11 years agoAvoid calling to_vec() unnecessarily in parser.
Niko Matsakis [Sat, 2 Mar 2013 00:38:39 +0000 (19:38 -0500)]
Avoid calling to_vec() unnecessarily in parser.

Also, rename the OptVec-to-vector conversion method to
opt_vec::take_vec() and convert from a method into a fn
because I fear strange bugs.

11 years agodoc/rust.md: Demonstrate the `f::<T>()` syntax more often
Benjamin Herr [Sat, 2 Mar 2013 00:07:01 +0000 (01:07 +0100)]
doc/rust.md: Demonstrate the `f::<T>()` syntax more often

The "Generic functions" subsection mentions that generic functions are
instantiated based on context, so let's also mention right away (with a
link to the #paths section) that an explicit form is available.

This also adds an example to the function call expression section that
explicitly instantiates a generic function.

11 years agodocs/rust.md: Mention unit-like structs along with other struct types
Benjamin Herr [Fri, 1 Mar 2013 22:48:17 +0000 (23:48 +0100)]
docs/rust.md: Mention unit-like structs along with other struct types

11 years agoRename core::private to core::unstable. #4743
Brian Anderson [Thu, 28 Feb 2013 03:53:31 +0000 (19:53 -0800)]
Rename core::private to core::unstable. #4743

11 years agoContributing.md: remove spurious verb
Benjamin Herr [Fri, 1 Mar 2013 21:46:00 +0000 (22:46 +0100)]
Contributing.md: remove spurious verb

11 years ago`std::net::tcp` docs: Use current syntax and types
Benjamin Herr [Fri, 1 Mar 2013 20:27:08 +0000 (21:27 +0100)]
`std::net::tcp` docs: Use current syntax and types

Doesn't touch non-comment lines. This changes various type_names to TypeNames
and fixes the example for `tcp::accept` that was still using the old
`match` syntax and `{|args| ...}` closures.

11 years agolibrustc: Add missing import. rs=burningtree
Patrick Walton [Fri, 1 Mar 2013 18:38:54 +0000 (10:38 -0800)]
librustc: Add missing import. rs=burningtree

11 years agoMerge pull request #5178 from catamorphism/constant-buffers
Patrick Walton [Fri, 1 Mar 2013 16:44:47 +0000 (08:44 -0800)]
Merge pull request #5178 from catamorphism/constant-buffers

core: Address XXX, make static constants for strings used when stringify...

11 years agoMerge remote branch 'nmatsakis/issue-4808-representation-of-extern-fn' into incoming
Patrick Walton [Fri, 1 Mar 2013 16:43:36 +0000 (08:43 -0800)]
Merge remote branch 'nmatsakis/issue-4808-representation-of-extern-fn' into incoming

11 years agolibrustc: "APL2" -> "ASL2". rs=license-fix
Patrick Walton [Fri, 1 Mar 2013 16:41:31 +0000 (08:41 -0800)]
librustc: "APL2" -> "ASL2". rs=license-fix

11 years agoMerge remote branch 'sevrak/issue-5164' into incoming
Patrick Walton [Fri, 1 Mar 2013 16:39:02 +0000 (08:39 -0800)]
Merge remote branch 'sevrak/issue-5164' into incoming

11 years agoMerge remote-tracking branch 'remotes/origin/incoming' into incoming
Erick Tryzelaar [Fri, 1 Mar 2013 15:01:48 +0000 (07:01 -0800)]
Merge remote-tracking branch 'remotes/origin/incoming' into incoming

11 years agoauto merge of #5162 : brson/rust/fixmes, r=brson
bors [Fri, 1 Mar 2013 09:54:38 +0000 (01:54 -0800)]
auto merge of #5162 : brson/rust/fixmes, r=brson

11 years agoauto merge of #5180 : catamorphism/rust/post-snapshot, r=catamorphism
bors [Fri, 1 Mar 2013 06:45:37 +0000 (22:45 -0800)]
auto merge of #5180 : catamorphism/rust/post-snapshot, r=catamorphism

* Disallow structural records everywhere
* Remove all #[cfg(stage0)] stuff
* Remove the last deprecated modes in libcore
* Un-xfail a test

11 years agotestsuite: Re-xfail record-trailing-comma
Tim Chevalier [Fri, 1 Mar 2013 05:46:44 +0000 (21:46 -0800)]
testsuite: Re-xfail record-trailing-comma

It was xfailed before the other commits in this pull request,
so no big deal. I'll look into it later.

11 years agoauto merge of #5147 : nikomatsakis/rust/remove-legacy-trait-table, r=nikomatsakis
bors [Fri, 1 Mar 2013 05:39:39 +0000 (21:39 -0800)]
auto merge of #5147 : nikomatsakis/rust/remove-legacy-trait-table, r=nikomatsakis

r? @pcwalton

11 years agoRemove code that was awaiting a snapshot
Tim Chevalier [Fri, 1 Mar 2013 04:30:16 +0000 (20:30 -0800)]
Remove code that was awaiting a snapshot

* Disallow structural records everywhere
* Remove all #[cfg(stage0)] stuff
* Remove the last deprecated modes in libcore
* Un-xfail a test

11 years agoauto merge of #5177 : catamorphism/rust/register-snapshots, r=catamorphism
bors [Fri, 1 Mar 2013 02:36:38 +0000 (18:36 -0800)]
auto merge of #5177 : catamorphism/rust/register-snapshots, r=catamorphism

Note that this throws FreeBSD under the bus. Hopefully we'll pull it back out again soon.

11 years agoRegister snapshots
Tim Chevalier [Thu, 28 Feb 2013 22:34:35 +0000 (14:34 -0800)]
Register snapshots

11 years agoRemove legacy object creation mode, and convert remaining uses of it
Niko Matsakis [Wed, 27 Feb 2013 02:42:00 +0000 (21:42 -0500)]
Remove legacy object creation mode, and convert remaining uses of it

11 years agoauto merge of #5176 : brson/rust/unwrap_shared_mutable_state, r=nikomatsakis
bors [Fri, 1 Mar 2013 01:21:40 +0000 (17:21 -0800)]
auto merge of #5176 : brson/rust/unwrap_shared_mutable_state, r=nikomatsakis

r?

This fixes the current [random failures](http://buildbot.rust-lang.org/builders/auto-linux/builds/291/steps/test/logs/stdio) on the bots and closes #4436 by removing `unwrap_shared_mutable_state` and the code that depends on it. The result is that ARC-like things will not be unwrappable. This feature is complex and is not used outside of test cases.

Note that there is not consensus to remove it.

(second commit)

11 years agocore: Address XXX, make static constants for strings used when stringifying floats
Tim Chevalier [Fri, 1 Mar 2013 00:48:22 +0000 (16:48 -0800)]
core: Address XXX, make static constants for strings used when stringifying floats

11 years agoauto merge of #5113 : alexcrichton/rust/issue-4366, r=catamorphism
bors [Thu, 28 Feb 2013 23:21:41 +0000 (15:21 -0800)]
auto merge of #5113 : alexcrichton/rust/issue-4366, r=catamorphism

The first two commits are the actual fix going into place, and the last is just dealing with the fallout in the rest of the compiler.

The test added in the first two commits had 0 failures before this patch, and if the glob imports were changed to explicit imports then the errors showed up. Due to this behavior, I figured that the desired behavior was for glob imports to not accidentally leak a lot of non-public imports/functions/types into other modules.

There was quite a lot of fallout, and it all passes `make check` locally, but I doubt that it will pass on all platforms because there's probably some guarded off thing I missed.

I plan on making another patch soon which changes the default level of `unused_imports` to `warn` which will hopefully reduce a lot of the `use` noise throughout. In conjunction with #5104, and a few minor fixes, I think that the default level of `warn` is actually really usable.

11 years agocore: Remove unwrap_shared_mutable_state. #4436
Brian Anderson [Thu, 28 Feb 2013 23:20:40 +0000 (15:20 -0800)]
core: Remove unwrap_shared_mutable_state. #4436

11 years agoFix implicit leaks of imports throughout libraries
Alex Crichton [Mon, 25 Feb 2013 19:11:21 +0000 (14:11 -0500)]
Fix implicit leaks of imports throughout libraries

Also touch up use of 'pub' and move some tests around so the tested functions
don't have to be 'pub'

11 years agoFix leaking immediate children and types via glob imports
Alex Crichton [Tue, 26 Feb 2013 05:34:45 +0000 (00:34 -0500)]
Fix leaking immediate children and types via glob imports

11 years agoFix leaking non-public 'use' statements with glob imports
Alex Crichton [Mon, 25 Feb 2013 19:10:42 +0000 (14:10 -0500)]
Fix leaking non-public 'use' statements with glob imports

11 years agort: Comment out an assert in rust_kernel. #4711
Brian Anderson [Thu, 28 Feb 2013 22:21:39 +0000 (14:21 -0800)]
rt: Comment out an assert in rust_kernel. #4711

11 years agoauto merge of #5166 : danniel/rust/incoming, r=brson
bors [Thu, 28 Feb 2013 21:48:49 +0000 (13:48 -0800)]
auto merge of #5166 : danniel/rust/incoming, r=brson

I copied and adapted the syntax highlighting rules from Kate, to be used in GEdit and other GtkSourceView based editors.

11 years agoChange bare functions so that they are represented by a single pointer.
Niko Matsakis [Thu, 28 Feb 2013 00:28:37 +0000 (19:28 -0500)]
Change bare functions so that they are represented by a single pointer.

The basic idea is that we add a new kind of adjustment, AutoAddEnv, that pads
an extern fn into a closure by adding the extra NULL word. Then there are a few
misc changes in trans to get the LLVM types to match up.

Fixes #4808.

11 years agoauto merge of #5156 : pcwalton/rust/method-privacy, r=pcwalton
bors [Thu, 28 Feb 2013 20:45:49 +0000 (12:45 -0800)]
auto merge of #5156 : pcwalton/rust/method-privacy, r=pcwalton

r? @brson

11 years agolibrustc: Enforce cross-crate method privacy
Patrick Walton [Wed, 27 Feb 2013 21:45:37 +0000 (13:45 -0800)]
librustc: Enforce cross-crate method privacy

11 years agolibrustc: Make methods private if the impl is private
Patrick Walton [Wed, 27 Feb 2013 19:20:50 +0000 (11:20 -0800)]
librustc: Make methods private if the impl is private

11 years agolibrustc: Mark all type implementations public. rs=impl-publicity
Patrick Walton [Wed, 27 Feb 2013 01:47:41 +0000 (17:47 -0800)]
librustc: Mark all type implementations public. rs=impl-publicity

11 years agoMerge remote-tracking branch 'remotes/origin/incoming' into incoming
Erick Tryzelaar [Thu, 28 Feb 2013 15:25:49 +0000 (07:25 -0800)]
Merge remote-tracking branch 'remotes/origin/incoming' into incoming

11 years agoMerge remote-tracking branch 'remotes/origin/incoming' into incoming
Erick Tryzelaar [Thu, 28 Feb 2013 15:25:31 +0000 (07:25 -0800)]
Merge remote-tracking branch 'remotes/origin/incoming' into incoming

11 years agoFix license attribute on crates
sevrak [Thu, 28 Feb 2013 13:15:32 +0000 (13:15 +0000)]
Fix license attribute on crates

11 years agoAdd syntax highlighting support for GtkSourceView / GEdit
Daniel Ursache Dogariu [Thu, 28 Feb 2013 09:52:25 +0000 (11:52 +0200)]
Add syntax highlighting support for GtkSourceView / GEdit

11 years agoauto merge of #5159 : brson/rust/rtcall, r=brson
bors [Thu, 28 Feb 2013 09:12:38 +0000 (01:12 -0800)]
auto merge of #5159 : brson/rust/rtcall, r=brson

11 years agoauto merge of #5155 : bstrie/rust/dedrop, r=pcwalton
bors [Thu, 28 Feb 2013 07:30:40 +0000 (23:30 -0800)]
auto merge of #5155 : bstrie/rust/dedrop, r=pcwalton

This removes all but 6 uses of `drop {}` from the entire codebase. Removing any of the remaining uses causes various non-trivial bugs; I'll start reporting them once this gets merged.

11 years agoauto merge of #5152 : catamorphism/rust/issue-3601, r=catamorphism
bors [Thu, 28 Feb 2013 06:15:38 +0000 (22:15 -0800)]
auto merge of #5152 : catamorphism/rust/issue-3601, r=catamorphism

11 years agoauto merge of #5098 : pkgw/rust/pr/issue4869, r=brson
bors [Thu, 28 Feb 2013 04:39:39 +0000 (20:39 -0800)]
auto merge of #5098 : pkgw/rust/pr/issue4869, r=brson

See issue #4869. I'm not quite sure what constitutes "consensus from the core team" (cf. discussion in the issue), but this at least demonstrates that the proposed change is pretty straightforward.

After this change, there are no new test failures. I've un-ignored the `to_str` vectors test; it's not at all obvious to me why it'd be problematic, and it passes on my Linux machine.

11 years agoauto merge of #5106 : pnkfelix/rust/fix-docs, r=graydon
bors [Thu, 28 Feb 2013 03:03:41 +0000 (19:03 -0800)]
auto merge of #5106 : pnkfelix/rust/fix-docs, r=graydon

...s.  I freely admit I have not run a "make check" on this (trivial) change.

11 years agoConvert NOTEs to FIXMEs
Brian Anderson [Thu, 28 Feb 2013 02:44:35 +0000 (18:44 -0800)]
Convert NOTEs to FIXMEs

11 years agoRemove the last remnants of rtcalls
Brian Anderson [Thu, 28 Feb 2013 02:34:04 +0000 (18:34 -0800)]
Remove the last remnants of rtcalls

11 years agoauto merge of #5141 : nikomatsakis/rust/region-syntax-expl-lifetimes, r=nikomatsakis
bors [Thu, 28 Feb 2013 01:36:41 +0000 (17:36 -0800)]
auto merge of #5141 : nikomatsakis/rust/region-syntax-expl-lifetimes, r=nikomatsakis

Major changes are:
- replace ~[ty_param] with Generics structure, which includes
  both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;

cc #4846

r? @graydon

11 years agoauto merge of #5149 : brson/rust/rt, r=brson
bors [Thu, 28 Feb 2013 00:42:42 +0000 (16:42 -0800)]
auto merge of #5149 : brson/rust/rt, r=brson

Just a few minor things required for freestanding Rust.

11 years agoIntroduce lifetime declarations into the lists of type parameters.
Niko Matsakis [Fri, 15 Feb 2013 05:50:03 +0000 (21:50 -0800)]
Introduce lifetime declarations into the lists of type parameters.

Major changes are:
- replace ~[ty_param] with Generics structure, which includes
  both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;

cc #4846

11 years agoTurn old `drop` blocks into `Drop` traits
Ben Striegel [Thu, 28 Feb 2013 00:13:53 +0000 (19:13 -0500)]
Turn old `drop` blocks into `Drop` traits

11 years agoauto merge of #5140 : yjh0502/rust/issue_4458, r=catamorphism
bors [Wed, 27 Feb 2013 23:45:41 +0000 (15:45 -0800)]
auto merge of #5140 : yjh0502/rust/issue_4458, r=catamorphism

Fix is a bug fix for issue #4458.

This patch is quite straight-forward. A test for result_str() is added.

11 years agotestsuite: Update and un-xfail #3601 test
Tim Chevalier [Sat, 23 Feb 2013 06:15:11 +0000 (22:15 -0800)]
testsuite: Update and un-xfail #3601 test

11 years agoMerge remote-tracking branch 'remotes/origin/incoming' into incoming
Erick Tryzelaar [Wed, 27 Feb 2013 22:05:39 +0000 (14:05 -0800)]
Merge remote-tracking branch 'remotes/origin/incoming' into incoming

11 years agoauto merge of #5145 : Kimundi/rust/incoming, r=catamorphism
bors [Wed, 27 Feb 2013 21:27:48 +0000 (13:27 -0800)]
auto merge of #5145 : Kimundi/rust/incoming, r=catamorphism

11 years agort: Make some runtime calls work outside of task context
Brian Anderson [Wed, 27 Feb 2013 20:39:11 +0000 (12:39 -0800)]
rt: Make some runtime calls work outside of task context

11 years agoauto merge of #5070 : youknowone/rust/struct-match2, r=nikomatsakis
bors [Wed, 27 Feb 2013 20:21:49 +0000 (12:21 -0800)]
auto merge of #5070 : youknowone/rust/struct-match2, r=nikomatsakis

It is reversed that type of arm pattern and type of search pattern
in error message.

11 years agoMerge remote-tracking branch 'remotes/origin/incoming' into incoming
Erick Tryzelaar [Wed, 27 Feb 2013 19:03:21 +0000 (11:03 -0800)]
Merge remote-tracking branch 'remotes/origin/incoming' into incoming

11 years agoFix reversed current/expected type
Jeong YunWon [Sun, 24 Feb 2013 15:15:53 +0000 (00:15 +0900)]
Fix reversed current/expected type

Fix some reversed type of arm pattern and type of search pattern
in error message.

11 years agoauto merge of #5136 : pcwalton/rust/impl-publicizing, r=pcwalton
bors [Wed, 27 Feb 2013 17:42:56 +0000 (09:42 -0800)]
auto merge of #5136 : pcwalton/rust/impl-publicizing, r=pcwalton

11 years agolibrustc: Forbid `pub` or `priv` before trait implementations
Patrick Walton [Wed, 27 Feb 2013 01:12:00 +0000 (17:12 -0800)]
librustc: Forbid `pub` or `priv` before trait implementations

11 years agolibsyntax: Forbid mutable vectors. rs=demuting
Patrick Walton [Tue, 26 Feb 2013 22:50:09 +0000 (14:50 -0800)]
libsyntax: Forbid mutable vectors. rs=demuting

11 years agolibsyntax: Forbid `~mut` and `~const`. rs=demuting
Patrick Walton [Tue, 26 Feb 2013 19:32:00 +0000 (11:32 -0800)]
libsyntax: Forbid `~mut` and `~const`. rs=demuting