Commit Graph

29230 Commits

Author SHA1 Message Date
bors
30bf73fd78 auto merge of #14447 : erickt/rust/show-treemap, r=kballard
This is a hodge podge of a couple small cleanup commits. It implements `Show` for `TreeMap` and `TreeSet`, and some removal of commented out code.
2014-05-27 16:11:39 -07:00
bors
1fc29ef0c8 auto merge of #14444 : huonw/rust/nice-for-errors, r=alexcrichton
Change `for` desugaring & make refutable pattern errors more precise

This changes for to desugar to the `let`-based pattern match as described in #14390, and adjusts the compiler to use this information for error messages that even mention that it's in a `for` loop.

Also, it makes the compiler record the exact positions of refutable parts of a pattern, to point to exactly them in error messages.
2014-05-27 14:36:40 -07:00
bors
1e2bb09bbb auto merge of #14435 : P1start/rust/str-docs-fix, r=sfackler
This tweaks the `std::str` docs to compensate for the recent shift from `~str` to `String`.
2014-05-27 13:01:40 -07:00
bors
5811d2bd96 auto merge of #14428 : alexcrichton/rust/issue-14422, r=pcwalton
This ensures that a public typedef to a private item is ensured to be public in
terms of linkage. This affects both the visibility of the library's symbols as
well as other lints based on privacy (dead_code for example).

Closes #14421
Closes #14422
2014-05-27 11:26:40 -07:00
Erick Tryzelaar
926504c885 collections: implement Show for Tree{Map,Set} 2014-05-27 10:38:52 -07:00
Erick Tryzelaar
e9e799f750 collections: add Show impl test for HashMap 2014-05-27 10:20:02 -07:00
Erick Tryzelaar
85d9cfb809 serialize: Remove old commented out code 2014-05-27 10:20:02 -07:00
Alex Crichton
49a65815f1 rustc: Account for typedefs in privacy
This ensures that a public typedef to a private item is ensured to be public in
terms of linkage. This affects both the visibility of the library's symbols as
well as other lints based on privacy (dead_code for example).

Closes #14421
Closes #14422
2014-05-27 09:04:08 -07:00
bors
a01bedc2cd auto merge of #14429 : sanrodari/rust/patch-1, r=sfackler 2014-05-27 02:16:32 -07:00
Huon Wilson
0df221e993 rustc: provide more precise information about refutable patterns.
The compiler now points exactly which part(s) of a pattern are
refutable, rather than just highlighting the whole pattern.
2014-05-27 09:24:37 +10:00
Huon Wilson
f2a137829e syntax: desugar a for loop to a let binding to get better error
messages when the pattern is refutable.

This means the compiler points directly to the pattern and said that the
problem is the pattern being refutable (rather than just saying that
some value isn't covered in the `match` as it did previously).

Fixes #14390.
2014-05-27 09:24:37 +10:00
bors
746d086f93 auto merge of #14440 : Sawyer47/rust/tuple-doc, r=alexcrichton 2014-05-26 14:06:26 -07:00
Piotr Jawniak
9051f9bc61 Improve docs for core::tuple 2014-05-26 21:07:29 +02:00
bors
ca287ebc64 auto merge of #14374 : swgillespie/rust/swgillespie-tutorial, r=alexcrichton
The current tutorial says that the only way to get master is to build from source, which isn't true anymore - nightly binaries and an installer for Mac OS X are now available at the install page: http://www.rust-lang.org/install.html . Feedback very much welcome! Addresses issue #13578.
2014-05-26 11:51:27 -07:00
Huon Wilson
6ddd40d436 syntax: Add a source field to Local for tracking if it comes from lets or fors. 2014-05-26 22:44:38 +10:00
bors
6fad19e16b auto merge of #14439 : thestinger/rust/nonnull, r=luqmana 2014-05-26 01:51:25 -07:00
Daniel Micay
22ab5303ff handle attributes for non-immediate types first
Slices are non-immediate and were not having these attributes applied.
2014-05-26 03:26:02 -04:00
bors
ba77c60270 auto merge of #14300 : cmr/rust/enum-size-lint, r=kballard
See commits for details.
2014-05-26 00:16:27 -07:00
Daniel Micay
0c51149ac9 mark non-immediate by-value parameters as non-null 2014-05-26 02:59:19 -04:00
bors
a7ab73344d auto merge of #14432 : kballard/rust/nt_block, r=huonw
Fixes #13678.
2014-05-25 22:36:23 -07:00
Kevin Ballard
ff0f9b62f6 Allow $foo:block nonterminals in expression position
Fixes #13678.
2014-05-25 22:33:12 -07:00
Sean Gillespie
b3fb258406 Update tutorial, see issue #13578 2014-05-25 21:54:49 -07:00
P1start
c1fd3459fa Minor fixes to std::str docs
This tweaks the `std::str` docs to compensate for the recent shift from `~str`
to `String`.
2014-05-26 16:52:12 +12:00
bors
20a41519fd auto merge of #14430 : kballard/rust/squelch_os_warning, r=alexcrichton
Clean up the re-exports of various modules in `std::std`, and remove the
`realstd` stuff from `std::rt::args`.
2014-05-25 18:41:22 -07:00
Santiago Rodriguez
68455a12db Fix to tutorial 2014-05-25 19:00:03 -05:00
bors
db2ddb1bba auto merge of #14423 : Kimundi/rust/static_regex, r=alexcrichton
This patch changes the internals of `Regex` and `regex!()` such that

```rust
static RE: Regex = regex!(...);
```

is valid. It doesn't change anything about the actual regex implementation, it just changes the type to something that can be constructed as a const expression.
2014-05-25 16:46:20 -07:00
Kevin Ballard
009d898a94 De-realstd os::args
With the test runner using ::std::os::args(), and std::std::os now being
a re-export of realstd::os, there's no more need for realstd stuff
mucking up rt::args.

Remove the one test of os::args(), as it's not very useful and it won't
work anymore now that rt::args doesn't use realstd.
2014-05-25 16:37:19 -07:00
Kevin Ballard
69070ac85f libstd: Remove unnecessary re-exports under std::std 2014-05-25 16:21:07 -07:00
bors
0fca6c6a02 auto merge of #14391 : alexcrichton/rust/more-rustdoc-inline, r=huonw
As part of the libstd facade (cc #13851), rustdoc is taught to inline documentation across crate boundaries through the usage of a `pub use` statement. This is done to allow libstd to maintain the facade that it is a standalone library with a defined public interface (allowing us to shuffle around what's underneath it).

A preview is available at http://people.mozilla.org/~acrichton/doc/std/index.html
2014-05-25 13:56:21 -07:00
Marvin Löbel
b997de529a Change regex! macro to expand to a constexpr, allowing to put it in a static 2014-05-25 22:30:50 +02:00
Alex Crichton
3100bc5b82 rustdoc: Move inlining to its own module 2014-05-25 13:26:46 -07:00
bors
1cf1527b91 auto merge of #14426 : catharsis/rust/master, r=alexcrichton
Just a tiny fix, sorry about the noise :-)
2014-05-25 12:21:21 -07:00
Anton Löfgren
5ca437078b guide-runtime.md: Fix a typo 2014-05-25 21:11:54 +02:00
bors
759517c180 auto merge of #14417 : Sawyer47/rust/dlist-fixme, r=huonw
Issue #3511 was closed, but dlist.rs contained a FIXME for it.
2014-05-25 05:01:18 -07:00
bors
489f470886 auto merge of #14370 : cmr/rust/design-faq, r=brson
This indends to help quell frequently answered questions about the language
design in a single, authoritative place.
2014-05-25 03:01:20 -07:00
Corey Richardson
11c0f77107 doc: add a new language design faq
This indends to help quell frequently answered questions about the language
design in a single, authoritative place.
2014-05-25 02:53:53 -07:00
Piotr Jawniak
9b5bdfc2e2 Fix FIXME #3511 in Dlist code
Issue #3511 was closed, but dlist.rs contained a FIXME for it.
2014-05-25 11:41:20 +02:00
Alex Crichton
bd339ced36 doc: Document the new #[doc(no_inline)] attribute 2014-05-25 01:18:37 -07:00
Alex Crichton
8dad7f579e rustdoc: Get [src] links working for inlined dox
These links work by hyperlinking back to the actual documentation page with a
query parameter which will be recognized and then auto-click the appropriate
[src] link.
2014-05-25 01:18:37 -07:00
Alex Crichton
9f13db2cb2 rustdoc: Fix rendering of the 'static bound 2014-05-25 01:18:11 -07:00
Alex Crichton
837d4d8f35 rustdoc: Link to local reexportations of items
Within the documentation for a crate, all hyperlinks to reexported items don't
go across crates, but rather to the items in the crate itself. This will allow
references to Option in the standard library to link to the standard library's
Option, instead of libcore's.

This does mean that other crate's links for Option will still link to libcore's
Option.
2014-05-25 01:18:11 -07:00
Alex Crichton
a96067077a rustdoc: Prevent a segfault when using markdown
The field passed from markdown could sometimes be null, and it wasn't properly
handled.
2014-05-25 01:18:11 -07:00
Alex Crichton
316ef79dc2 rustc: Encode module attributes
This will allow for rustdoc to pick up the documentation on the other end.
2014-05-25 01:18:11 -07:00
Alex Crichton
781e898348 rustdoc: Use csearch for impl loading
The normal analysis passes aren't guaranteed to have loaded all impls, so use
the csearch methods directly to load impls.
2014-05-25 01:18:10 -07:00
Alex Crichton
5ee3d0e1ff rustdoc: Inline reexported modules 2014-05-25 01:18:10 -07:00
Alex Crichton
9181c35ee9 rustdoc: Inline names of function arguments 2014-05-25 01:18:10 -07:00
Alex Crichton
6ee9109c8b rustdoc: Inline argument names of foreign methods 2014-05-25 01:18:10 -07:00
Alex Crichton
ec4f79ff6c rustdoc: Don't show reexported enum variants
For now just assume that the enum type itself is reexported.
2014-05-25 01:17:57 -07:00
Alex Crichton
622c8f7b57 rustdoc: Inline enums across crates 2014-05-25 01:17:57 -07:00
Alex Crichton
c81b511bfd rustdoc: Start inlining structs across crates 2014-05-25 01:17:57 -07:00