]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #14459 : seanmonstar/rust/select-docs, r=alexcrichton
bors [Wed, 28 May 2014 11:21:42 +0000 (04:21 -0700)]
auto merge of #14459 : seanmonstar/rust/select-docs, r=alexcrichton

10 years agoauto merge of #14455 : crabtw/rust/mips, r=alexcrichton
bors [Wed, 28 May 2014 09:41:44 +0000 (02:41 -0700)]
auto merge of #14455 : crabtw/rust/mips, r=alexcrichton

Because IPv4 address conversion doesn't consider big-endian target, I add functions to handle that.
These function names may need to be changed, but I can't come up with a good one.

10 years agoauto merge of #14454 : omasanori/rust/cfg_cxx, r=alexcrichton
bors [Wed, 28 May 2014 08:06:45 +0000 (01:06 -0700)]
auto merge of #14454 : omasanori/rust/cfg_cxx, r=alexcrichton

10 years agoauto merge of #14452 : alexcrichton/rust/issue-14438, r=huonw
bors [Wed, 28 May 2014 06:26:47 +0000 (23:26 -0700)]
auto merge of #14452 : alexcrichton/rust/issue-14438, r=huonw

This commit alters rustdoc to keep a hash set of known inlined items which is a
whitelist for generating URLs to.

Closes #14438

10 years agoauto merge of #14364 : alexcrichton/rust/libdebug, r=brson
bors [Wed, 28 May 2014 04:46:46 +0000 (21:46 -0700)]
auto merge of #14364 : alexcrichton/rust/libdebug, r=brson

This commit moves reflection (as well as the {:?} format modifier) to a new
libdebug crate, all of which is marked experimental.

This is a breaking change because it now requires the debug crate to be
explicitly linked if the :? format qualifier is used. This means that any code
using this feature will have to add `extern crate debug;` to the top of the
crate. Any code relying on reflection will also need to do this.

Closes #12019

[breaking-change]

10 years agoMove std::{reflect,repr,Poly} to a libdebug crate
Alex Crichton [Thu, 22 May 2014 18:28:01 +0000 (11:28 -0700)]
Move std::{reflect,repr,Poly} to a libdebug crate

This commit moves reflection (as well as the {:?} format modifier) to a new
libdebug crate, all of which is marked experimental.

This is a breaking change because it now requires the debug crate to be
explicitly linked if the :? format qualifier is used. This means that any code
using this feature will have to add `extern crate debug;` to the top of the
crate. Any code relying on reflection will also need to do this.

Closes #12019

[breaking-change]

10 years agorustdoc: Only link to local inlined foreign items
Alex Crichton [Tue, 27 May 2014 04:51:59 +0000 (21:51 -0700)]
rustdoc: Only link to local inlined foreign items

This commit alters rustdoc to keep a hash set of known inlined items which is a
whitelist for generating URLs to.

Closes #14438

10 years agoauto merge of #14387 : alan-andrade/rust/remove_managed_boxes_and_gc, r=brson
bors [Wed, 28 May 2014 02:31:46 +0000 (19:31 -0700)]
auto merge of #14387 : alan-andrade/rust/remove_managed_boxes_and_gc, r=brson

My main goals were:
- be clear when we talk about "references" and "pointers"
- remove Managed boxes completely and the concept of GC.

https://github.com/mozilla/rust/issues/13987

10 years agoauto merge of #14414 : richo/rust/features/nerf_unused_string_fns, r=alexcrichton
bors [Wed, 28 May 2014 00:46:48 +0000 (17:46 -0700)]
auto merge of #14414 : richo/rust/features/nerf_unused_string_fns, r=alexcrichton

This should block on #14323

10 years agoauto merge of #14447 : erickt/rust/show-treemap, r=kballard
bors [Tue, 27 May 2014 23:11:39 +0000 (16:11 -0700)]
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.

10 years agoauto merge of #14444 : huonw/rust/nice-for-errors, r=alexcrichton
bors [Tue, 27 May 2014 21:36:40 +0000 (14:36 -0700)]
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.

10 years agoauto merge of #14435 : P1start/rust/str-docs-fix, r=sfackler
bors [Tue, 27 May 2014 20:01:40 +0000 (13:01 -0700)]
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`.

10 years agodoc: Fix link to string
Richo Healey [Tue, 27 May 2014 18:37:30 +0000 (11:37 -0700)]
doc: Fix link to string

This was missed in 553074506ecd139eb961fb91eb33ad9fd0183acb

10 years agostd: Rename strbuf operations to string
Richo Healey [Sun, 25 May 2014 10:17:19 +0000 (03:17 -0700)]
std: Rename strbuf operations to string

[breaking-change]

10 years agoauto merge of #14428 : alexcrichton/rust/issue-14422, r=pcwalton
bors [Tue, 27 May 2014 18:26:40 +0000 (11:26 -0700)]
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

10 years agostd: Remove String's to_owned
Richo Healey [Sun, 25 May 2014 10:10:11 +0000 (03:10 -0700)]
std: Remove String's to_owned

10 years agocollections: implement Show for Tree{Map,Set}
Erick Tryzelaar [Tue, 27 May 2014 17:38:52 +0000 (10:38 -0700)]
collections: implement Show for Tree{Map,Set}

10 years agocollections: add Show impl test for HashMap
Erick Tryzelaar [Mon, 26 May 2014 22:20:39 +0000 (15:20 -0700)]
collections: add Show impl test for HashMap

10 years agoserialize: Remove old commented out code
Erick Tryzelaar [Sat, 17 May 2014 15:32:55 +0000 (08:32 -0700)]
serialize: Remove old commented out code

10 years agofix MIPS target
Jyun-Yan You [Tue, 27 May 2014 09:00:50 +0000 (17:00 +0800)]
fix MIPS target

10 years agorustc: Account for typedefs in privacy
Alex Crichton [Sun, 25 May 2014 21:43:30 +0000 (14:43 -0700)]
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

10 years agostd: change select! docs from 'ports' to 'receivers'
Sean McArthur [Tue, 27 May 2014 14:20:06 +0000 (07:20 -0700)]
std: change select! docs from 'ports' to 'receivers'

10 years agoUse clang++ for CXX when --enable-clang.
OGINO Masanori [Tue, 27 May 2014 09:48:32 +0000 (18:48 +0900)]
Use clang++ for CXX when --enable-clang.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
10 years agoauto merge of #14429 : sanrodari/rust/patch-1, r=sfackler
bors [Tue, 27 May 2014 09:16:32 +0000 (02:16 -0700)]
auto merge of #14429 : sanrodari/rust/patch-1, r=sfackler

10 years agostd: Remove String::from_owned_str as it's redundant
Richo Healey [Sun, 25 May 2014 04:59:56 +0000 (21:59 -0700)]
std: Remove String::from_owned_str as it's redundant

[breaking-change]

10 years agorustc: provide more precise information about refutable patterns.
Huon Wilson [Mon, 26 May 2014 12:42:48 +0000 (22:42 +1000)]
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.

10 years agosyntax: desugar a `for` loop to a let binding to get better error
Huon Wilson [Mon, 26 May 2014 12:01:09 +0000 (22:01 +1000)]
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.

10 years agoauto merge of #14440 : Sawyer47/rust/tuple-doc, r=alexcrichton
bors [Mon, 26 May 2014 21:06:26 +0000 (14:06 -0700)]
auto merge of #14440 : Sawyer47/rust/tuple-doc, r=alexcrichton

10 years agoImprove docs for core::tuple
Piotr Jawniak [Mon, 26 May 2014 08:34:51 +0000 (10:34 +0200)]
Improve docs for core::tuple

10 years agoauto merge of #14374 : swgillespie/rust/swgillespie-tutorial, r=alexcrichton
bors [Mon, 26 May 2014 18:51:27 +0000 (11:51 -0700)]
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.

10 years agosyntax: Add a source field to `Local` for tracking if it comes from `let`s or `for`s.
Huon Wilson [Mon, 26 May 2014 12:00:08 +0000 (22:00 +1000)]
syntax: Add a source field to `Local` for tracking if it comes from `let`s or `for`s.

10 years agoauto merge of #14439 : thestinger/rust/nonnull, r=luqmana
bors [Mon, 26 May 2014 08:51:25 +0000 (01:51 -0700)]
auto merge of #14439 : thestinger/rust/nonnull, r=luqmana

10 years agohandle attributes for non-immediate types first
Daniel Micay [Mon, 26 May 2014 07:20:31 +0000 (03:20 -0400)]
handle attributes for non-immediate types first

Slices are non-immediate and were not having these attributes applied.

10 years agoauto merge of #14300 : cmr/rust/enum-size-lint, r=kballard
bors [Mon, 26 May 2014 07:16:27 +0000 (00:16 -0700)]
auto merge of #14300 : cmr/rust/enum-size-lint, r=kballard

See commits for details.

10 years agomark non-immediate by-value parameters as non-null
Daniel Micay [Mon, 26 May 2014 06:59:19 +0000 (02:59 -0400)]
mark non-immediate by-value parameters as non-null

10 years agoauto merge of #14432 : kballard/rust/nt_block, r=huonw
bors [Mon, 26 May 2014 05:36:23 +0000 (22:36 -0700)]
auto merge of #14432 : kballard/rust/nt_block, r=huonw

Fixes #13678.

10 years agoAllow $foo:block nonterminals in expression position
Kevin Ballard [Mon, 26 May 2014 01:33:52 +0000 (18:33 -0700)]
Allow $foo:block nonterminals in expression position

Fixes #13678.

10 years agoUpdate tutorial, see issue #13578
Sean Gillespie [Mon, 26 May 2014 04:54:49 +0000 (21:54 -0700)]
Update tutorial, see issue #13578

10 years agoMinor fixes to `std::str` docs
P1start [Mon, 26 May 2014 04:41:35 +0000 (16:41 +1200)]
Minor fixes to `std::str` docs

This tweaks the `std::str` docs to compensate for the recent shift from `~str`
to `String`.

10 years agoauto merge of #14430 : kballard/rust/squelch_os_warning, r=alexcrichton
bors [Mon, 26 May 2014 01:41:22 +0000 (18:41 -0700)]
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`.

10 years agoFix to tutorial
Santiago Rodriguez [Mon, 26 May 2014 00:00:03 +0000 (19:00 -0500)]
Fix to tutorial

10 years agoauto merge of #14423 : Kimundi/rust/static_regex, r=alexcrichton
bors [Sun, 25 May 2014 23:46:20 +0000 (16:46 -0700)]
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.

10 years agoDe-realstd os::args
Kevin Ballard [Sun, 25 May 2014 23:31:46 +0000 (16:31 -0700)]
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.

10 years agolibstd: Remove unnecessary re-exports under std::std
Kevin Ballard [Sun, 25 May 2014 23:21:07 +0000 (16:21 -0700)]
libstd: Remove unnecessary re-exports under std::std

10 years agoauto merge of #14391 : alexcrichton/rust/more-rustdoc-inline, r=huonw
bors [Sun, 25 May 2014 20:56:21 +0000 (13:56 -0700)]
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

10 years agoChange regex! macro to expand to a constexpr, allowing to put it in a static
Marvin Löbel [Thu, 15 May 2014 11:23:46 +0000 (13:23 +0200)]
Change regex! macro to expand to a constexpr, allowing to put it in a static

10 years agorustdoc: Move inlining to its own module
Alex Crichton [Sat, 24 May 2014 18:56:38 +0000 (11:56 -0700)]
rustdoc: Move inlining to its own module

10 years agoauto merge of #14426 : catharsis/rust/master, r=alexcrichton
bors [Sun, 25 May 2014 19:21:21 +0000 (12:21 -0700)]
auto merge of #14426 : catharsis/rust/master, r=alexcrichton

Just a tiny fix, sorry about the noise :-)

10 years agoguide-runtime.md: Fix a typo
Anton Löfgren [Sun, 25 May 2014 19:11:54 +0000 (21:11 +0200)]
guide-runtime.md: Fix a typo

10 years agoauto merge of #14417 : Sawyer47/rust/dlist-fixme, r=huonw
bors [Sun, 25 May 2014 12:01:18 +0000 (05:01 -0700)]
auto merge of #14417 : Sawyer47/rust/dlist-fixme, r=huonw

Issue #3511 was closed, but dlist.rs contained a FIXME for it.

10 years agoauto merge of #14370 : cmr/rust/design-faq, r=brson
bors [Sun, 25 May 2014 10:01:20 +0000 (03:01 -0700)]
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.

10 years agodoc: add a new language design faq
Corey Richardson [Fri, 23 May 2014 05:01:44 +0000 (22:01 -0700)]
doc: add a new language design faq

This indends to help quell frequently answered questions about the language
design in a single, authoritative place.

10 years agoFix FIXME #3511 in Dlist code
Piotr Jawniak [Sun, 25 May 2014 09:41:20 +0000 (11:41 +0200)]
Fix FIXME #3511 in Dlist code

Issue #3511 was closed, but dlist.rs contained a FIXME for it.

10 years agodoc: Document the new #[doc(no_inline)] attribute
Alex Crichton [Sat, 24 May 2014 18:56:16 +0000 (11:56 -0700)]
doc: Document the new #[doc(no_inline)] attribute

10 years agorustdoc: Get [src] links working for inlined dox
Alex Crichton [Sat, 24 May 2014 03:17:27 +0000 (20:17 -0700)]
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.

10 years agorustdoc: Fix rendering of the 'static bound
Alex Crichton [Sat, 24 May 2014 02:42:26 +0000 (19:42 -0700)]
rustdoc: Fix rendering of the 'static bound

10 years agorustdoc: Link to local reexportations of items
Alex Crichton [Sat, 24 May 2014 02:41:24 +0000 (19:41 -0700)]
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.

10 years agorustdoc: Prevent a segfault when using markdown
Alex Crichton [Sat, 24 May 2014 02:32:18 +0000 (19:32 -0700)]
rustdoc: Prevent a segfault when using markdown

The field passed from markdown could sometimes be null, and it wasn't properly
handled.

10 years agorustc: Encode module attributes
Alex Crichton [Sat, 24 May 2014 02:32:00 +0000 (19:32 -0700)]
rustc: Encode module attributes

This will allow for rustdoc to pick up the documentation on the other end.

10 years agorustdoc: Use csearch for impl loading
Alex Crichton [Sat, 24 May 2014 02:31:13 +0000 (19:31 -0700)]
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.

10 years agorustdoc: Inline reexported modules
Alex Crichton [Sat, 24 May 2014 02:01:33 +0000 (19:01 -0700)]
rustdoc: Inline reexported modules

10 years agorustdoc: Inline names of function arguments
Alex Crichton [Sat, 24 May 2014 01:47:01 +0000 (18:47 -0700)]
rustdoc: Inline names of function arguments

10 years agorustdoc: Inline argument names of foreign methods
Alex Crichton [Sat, 24 May 2014 00:13:44 +0000 (17:13 -0700)]
rustdoc: Inline argument names of foreign methods

10 years agorustdoc: Don't show reexported enum variants
Alex Crichton [Fri, 23 May 2014 23:16:35 +0000 (16:16 -0700)]
rustdoc: Don't show reexported enum variants

For now just assume that the enum type itself is reexported.

10 years agorustdoc: Inline enums across crates
Alex Crichton [Fri, 23 May 2014 23:14:54 +0000 (16:14 -0700)]
rustdoc: Inline enums across crates

10 years agorustdoc: Start inlining structs across crates
Alex Crichton [Fri, 23 May 2014 07:42:33 +0000 (00:42 -0700)]
rustdoc: Start inlining structs across crates

10 years agostd: Add doc(noinline) to the prelude reexports
Alex Crichton [Fri, 23 May 2014 05:02:34 +0000 (22:02 -0700)]
std: Add doc(noinline) to the prelude reexports

10 years agorustdoc: Inline documentation of `pub use`
Alex Crichton [Fri, 23 May 2014 05:00:18 +0000 (22:00 -0700)]
rustdoc: Inline documentation of `pub use`

This commit teaches rustdoc to inline the documentation for the destination of a
`pub use` statement across crate boundaries. This is intended for the standard
library's facade to show the fact that the facade is just an implementation
detail rather than the api of the standard library itself.

This starts out by inlining traits and functions, but more items will come soon.
The current drawback of this system is that hyperlinks across crates sill go to
the original item's definition rather than the reexported location.

10 years agoauto merge of #14415 : Sawyer47/rust/ascii-fixme, r=huonw
bors [Sun, 25 May 2014 08:11:19 +0000 (01:11 -0700)]
auto merge of #14415 : Sawyer47/rust/ascii-fixme, r=huonw

Issue #5475 was closed some time ago, but ascii.rs still contained
a FIXME for it.

10 years agoFix FIXME #5475 in std::ascii
Piotr Jawniak [Sun, 25 May 2014 06:56:50 +0000 (08:56 +0200)]
Fix FIXME #5475 in std::ascii

Issue #5475 was closed some time ago, but ascii.rs still contained
a FIXME for it.

10 years agoauto merge of #14323 : richo/rust/features/strbuf_to_string, r=huonw
bors [Sun, 25 May 2014 04:51:18 +0000 (21:51 -0700)]
auto merge of #14323 : richo/rust/features/strbuf_to_string, r=huonw

Converts `StrBuf` to `String` throughout rustc and the standard library.

Tests all pass locally, but usual caveats about platforms that aren't OSX apply since I don't have a test environment handy.

@alexcritchon mentioned that @pcwalton may have a patch incoming that should block this?

closes #14312

10 years agocore: rename strbuf::StrBuf to string::String
Richo Healey [Thu, 22 May 2014 23:57:53 +0000 (16:57 -0700)]
core: rename strbuf::StrBuf to string::String

[breaking-change]

10 years agoauto merge of #14402 : huonw/rust/arc-field-rename, r=alexcrichton
bors [Sun, 25 May 2014 01:56:19 +0000 (18:56 -0700)]
auto merge of #14402 : huonw/rust/arc-field-rename, r=alexcrichton

Paper over privacy issues with Deref by changing field names.

Types that implement Deref can cause weird error messages due to their
private fields conflicting with a field of the type they deref to, e.g.,
previously

    struct Foo { x: int }

    let a: Arc<Foo> = ...;
    println!("{}", a.x);

would complain the the `x` field of `Arc` was private (since Arc has a
private field called `x`) rather than just ignoring it.

This patch doesn't fix that issue, but does mean one would have to write
`a._ptr` to hit the same error message, which seems far less
common. (This patch `_`-prefixes all private fields of
`Deref`-implementing types.)

cc #12808

10 years agoPaper over privacy issues with Deref by changing field names.
Huon Wilson [Sat, 24 May 2014 11:35:53 +0000 (21:35 +1000)]
Paper over privacy issues with Deref by changing field names.

Types that implement Deref can cause weird error messages due to their
private fields conflicting with a field of the type they deref to, e.g.,
previously

    struct Foo { x: int }

    let a: Arc<Foo> = ...;
    println!("{}", a.x);

would complain the the `x` field of `Arc` was private (since Arc has a
private field called `x`) rather than just ignoring it.

This patch doesn't fix that issue, but does mean one would have to write
`a._ptr` to hit the same error message, which seems far less
common. (This patch `_`-prefixes all private fields of
`Deref`-implementing types.)

cc #12808

10 years agoauto merge of #14373 : sfackler/rust/unused-attr, r=huonw
bors [Sun, 25 May 2014 00:21:20 +0000 (17:21 -0700)]
auto merge of #14373 : sfackler/rust/unused-attr, r=huonw

The compiler now tracks which attributes were actually looked at during the compilation process and warns for those that were unused.

Some things of note:

* The tracking is done via thread locals, as it made the implementation more straightforward. Note that this shouldn't hamper any future parallelization as each task can have its own thread local state which can be merged for the lint pass. If there are serious objections to this, I can restructure things to explicitly pass the state around.
* There are a number of attributes that have to be special-cased and globally whitelisted. This happens for four reasons:
  * The `doc` and `automatically_derived` attributes are used by rustdoc, but not by the compiler.
  * The crate-level attributes `license`, `desc` and `comment` aren't currently used by anything.
  * Stability attributes as well as `must_use` are checked only when the tagged item is used, so we can't guarantee that the compiler's looked at them.
  * 12 attributes are used only in trans, which happens after the lint pass.

#14300 is adding infrastructure to track lint state through trans, which this lint should also be able to use to handle the last case. For the other attributes, the right solution would probably involve a specific pass to mark uses that occur in the correct context. For example, a `doc` attribute attached to a match arm should generate a warning, but will not currently.

RFC: 0002-attribute-usage

10 years agofix mostly grammar per PR comments
Alan Andrade [Sun, 25 May 2014 00:08:00 +0000 (17:08 -0700)]
fix mostly grammar per PR comments

10 years agoChanges from feedback
Steven Fackler [Fri, 23 May 2014 15:39:26 +0000 (08:39 -0700)]
Changes from feedback

10 years agoGet "make check" to work with unused-attribute
Steven Fackler [Fri, 23 May 2014 05:29:13 +0000 (22:29 -0700)]
Get "make check" to work with unused-attribute

There's a fair number of attributes that have to be whitelisted since
they're either looked for by rustdoc, in trans, or as needed. These can
be cleaned up in the future.

10 years agoWhitelist doc attributes
Steven Fackler [Thu, 22 May 2014 02:02:40 +0000 (19:02 -0700)]
Whitelist doc attributes

This is a bit overly permissive but should be okay for now.

10 years agoPort more stuff to mark used attributes
Steven Fackler [Wed, 21 May 2014 07:05:45 +0000 (00:05 -0700)]
Port more stuff to mark used attributes

10 years agoFirst sketch of lint pass
Steven Fackler [Wed, 21 May 2014 05:07:42 +0000 (22:07 -0700)]
First sketch of lint pass

Enough attributes are marked to cleanly compile an empty library.

10 years agoAdd AttrId to Attribute_
Steven Fackler [Tue, 20 May 2014 07:07:24 +0000 (00:07 -0700)]
Add AttrId to Attribute_

10 years agoauto merge of #14401 : aochagavia/rust/pr4, r=alexcrichton
bors [Sat, 24 May 2014 21:26:23 +0000 (14:26 -0700)]
auto merge of #14401 : aochagavia/rust/pr4, r=alexcrichton

Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait.

* Renamed `to_lower` to `to_lowercase`
* Renamed `to_upper` to `to_uppercase`
* Renamed `is_alpha` to `is_alphabetic`
* Renamed `is_alnum` to `is_alphanumeric`
* Renamed `is_lower` to `is_lowercase`
* Renamed `is_upper` to `is_uppercase`

[breaking-change]

10 years agoget over bold text madness, changes per PR, brought the "returning pointers" section...
Alan Andrade [Sat, 24 May 2014 20:15:48 +0000 (13:15 -0700)]
get over bold text madness, changes per PR, brought the "returning pointers" section back to pointers guide

10 years agoUpdate ascii functions used elsewhere
Adolfo Ochagavía [Sat, 24 May 2014 12:44:10 +0000 (14:44 +0200)]
Update ascii functions used elsewhere

10 years agoauto merge of #14378 : huonw/rust/deque-adjustments, r=alexcrichton
bors [Sat, 24 May 2014 19:51:24 +0000 (12:51 -0700)]
auto merge of #14378 : huonw/rust/deque-adjustments, r=alexcrichton

Might as well remove the duplication/`forget` call.

10 years agoauto merge of #14405 : aochagavia/rust/pr5, r=cmr
bors [Sat, 24 May 2014 17:51:25 +0000 (10:51 -0700)]
auto merge of #14405 : aochagavia/rust/pr5, r=cmr

10 years agoRemoved unnecessary macro declaration
Adolfo Ochagavía [Sat, 24 May 2014 16:10:18 +0000 (18:10 +0200)]
Removed unnecessary macro declaration

10 years agoauto merge of #14396 : vhbit/rust/opaque-mutex, r=alexcrichton
bors [Sat, 24 May 2014 11:56:25 +0000 (04:56 -0700)]
auto merge of #14396 : vhbit/rust/opaque-mutex, r=alexcrichton

On some systems (iOS for example) mutex is represented by opaque data structure which doesn't play well with simple data copy. Therefore mutex should be initialized from magic static value and filled by OS only when it landed RC.

Initially written for iOS but since landing iOS support might require quite a lot of time I think it is better to split parts which aren't directly related to iOS and merge them in

10 years agostd: minor simplification to sync::deque.
Huon Wilson [Fri, 23 May 2014 15:07:05 +0000 (01:07 +1000)]
std: minor simplification to sync::deque.

10 years agoRename functions in Ascii
Adolfo Ochagavía [Sat, 24 May 2014 10:24:50 +0000 (12:24 +0200)]
Rename functions in Ascii

Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait.

* Renamed `to_lower` to `to_lowercase`
* Renamed `to_upper` to `to_uppercase`
* Renamed `is_alpha` to `is_alphabetic`
* Renamed `is_alnum` to `is_alphanumeric`
* Renamed `is_lower` to `is_lowercase`
* Renamed `is_upper` to `is_uppercase`

[breaking-change]

10 years agoauto merge of #14392 : alexcrichton/rust/mem-updates, r=sfackler
bors [Sat, 24 May 2014 10:21:24 +0000 (03:21 -0700)]
auto merge of #14392 : alexcrichton/rust/mem-updates, r=sfackler

* All of the *_val functions have gone from #[unstable] to #[stable]
* The overwrite and zeroed functions have gone from #[unstable] to #[stable]
* The uninit function is now deprecated, replaced by its stable counterpart,
  uninitialized

[breaking-change]

10 years agoauto merge of #14389 : Ryman/rust/14303, r=alexcrichton
bors [Sat, 24 May 2014 08:41:25 +0000 (01:41 -0700)]
auto merge of #14389 : Ryman/rust/14303, r=alexcrichton

Closes #14303.

10 years agoauto merge of #14388 : kballard/rust/nonfatal_lexer_errors, r=alexcrichton
bors [Sat, 24 May 2014 07:01:25 +0000 (00:01 -0700)]
auto merge of #14388 : kballard/rust/nonfatal_lexer_errors, r=alexcrichton

Most errors that arise in the lexer can be recovered from. This allows
for more than one syntax error to be reported at a time.

10 years agoauto merge of #14384 : luqmana/rust/mca, r=alexcrichton
bors [Sat, 24 May 2014 05:06:23 +0000 (22:06 -0700)]
auto merge of #14384 : luqmana/rust/mca, r=alexcrichton

Only add `-Qunused-arguments` for clang.

10 years agoFixes problems on systems with opaque mutex
Valerii Hiora [Sat, 24 May 2014 05:01:23 +0000 (08:01 +0300)]
Fixes problems on systems with opaque mutex

On some systems (iOS for example) mutex is represented by
opaque data structure which doesn't play well with simple
data copy. Therefore mutex should be initialized from
magic static value and filled by OS only when it landed RC.

10 years agocore: Finish stabilizing the `mem` module.
Alex Crichton [Sat, 24 May 2014 03:53:56 +0000 (20:53 -0700)]
core: Finish stabilizing the `mem` module.

* All of the *_val functions have gone from #[unstable] to #[stable]
* The overwrite and zeroed functions have gone from #[unstable] to #[stable]
* The uninit function is now deprecated, replaced by its stable counterpart,
  uninitialized

[breaking-change]

10 years agoauto merge of #14306 : luqmana/rust/up-llvm, r=alexcrichton
bors [Sat, 24 May 2014 02:51:20 +0000 (19:51 -0700)]
auto merge of #14306 : luqmana/rust/up-llvm, r=alexcrichton

We can now mark arguments and returns as `nonnull` in LLVM. It's still somewhat limited by the fact that LLVM loses this information after inlining but it might help in certain cases.

10 years agoMake most lexer errors non-fatal
Kevin Ballard [Fri, 23 May 2014 22:20:46 +0000 (15:20 -0700)]
Make most lexer errors non-fatal

Most errors that arise in the lexer can be recovered from. This allows
for more than one syntax error to be reported at a time.

10 years agolibrustc: Consolidate the attribute handling for tagging function arguments and returns.
Luqman Aden [Wed, 21 May 2014 19:07:48 +0000 (15:07 -0400)]
librustc: Consolidate the attribute handling for tagging function arguments and returns.