]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #11521 : dguenther/rust/hide_libdir_relative, r=alexcrichton
bors [Tue, 14 Jan 2014 23:11:30 +0000 (15:11 -0800)]
auto merge of #11521 : dguenther/rust/hide_libdir_relative, r=alexcrichton

Renamed `LIBDIR_RELATIVE` to `CFG_LIBDIR_RELATIVE`. It's not a configurable variable, but it looks out of place without the `CFG_` prefix.

Fixes #11420

10 years agoRenamed LIBDIR_RELATIVE to CFG_LIBDIR_RELATIVE
Derek Guenther [Tue, 14 Jan 2014 00:45:33 +0000 (18:45 -0600)]
Renamed LIBDIR_RELATIVE to CFG_LIBDIR_RELATIVE

10 years agoauto merge of #11538 : eddyb/rust/llvm-attributes, r=alexcrichton
bors [Tue, 14 Jan 2014 21:51:34 +0000 (13:51 -0800)]
auto merge of #11538 : eddyb/rust/llvm-attributes, r=alexcrichton

10 years agoauto merge of #11485 : eddyb/rust/sweep-old-rust, r=nikomatsakis
bors [Tue, 14 Jan 2014 20:32:11 +0000 (12:32 -0800)]
auto merge of #11485 : eddyb/rust/sweep-old-rust, r=nikomatsakis

10 years agoauto merge of #11539 : dotdash/rust/void_type_fixup, r=alexcrichton
bors [Tue, 14 Jan 2014 19:16:38 +0000 (11:16 -0800)]
auto merge of #11539 : dotdash/rust/void_type_fixup, r=alexcrichton

Currently, we have c_void defined to be represented as an empty struct,
but LLVM expects C's void* to be represented as i8*. That means we
currently generate code in which LLVM doesn't recognize malloc() and
free() and can't apply certain optimization that would remove calls to
those functions.

10 years agoFix the representation of C void pointers in LLVM IR
Björn Steinbrink [Tue, 14 Jan 2014 17:01:24 +0000 (18:01 +0100)]
Fix the representation of C void pointers in LLVM IR

Currently, we have c_void defined to be represented as an empty struct,
but LLVM expects C's void* to be represented as i8*. That means we
currently generate code in which LLVM doesn't recognize malloc() and
free() and can't apply certain optimization that would remove calls to
those functions.

10 years agoauto merge of #11507 : omasanori/rust/reduce-po, r=alexcrichton
bors [Tue, 14 Jan 2014 17:56:39 +0000 (09:56 -0800)]
auto merge of #11507 : omasanori/rust/reduce-po, r=alexcrichton

This work is done by execute these commands manually:

    $ po4a --copyright-holders="The Rust Project Developers" \
        --package-name="Rust" \
        --package-version="0.10-pre" \
        -M UTF-8 -L UTF-8 \
        doc/po4a.conf
    $ for f in doc/po/**/*.po; do
    >   msgattrib --untranslated $f -o $f.strip
    >   if [ -e $f.strip ]; then
    >       mv $f.strip $f
    >   else
    >       rm $f
    >   fi
    > done

It should be managed by the build system automatically to use in our
translation workflow, but I've not yet done that.

At least one mostly-translated (over 80% translation rate) document is needed to test the translation workflow, so I'll working on Japanese translation.

10 years agoAdd noalias and noreturn attributes in more cases.
Eduard Burtescu [Tue, 14 Jan 2014 17:17:38 +0000 (19:17 +0200)]
Add noalias and noreturn attributes in more cases.

10 years agoauto merge of #11438 : b1nd/rust/rust-doc, r=alexcrichton
bors [Tue, 14 Jan 2014 16:41:38 +0000 (08:41 -0800)]
auto merge of #11438 : b1nd/rust/rust-doc, r=alexcrichton

cc @cmr

Temporary change to issue #10535. Requires significant re-factoring to search completely based on the index paths. For example searching for "File::" in this fix will return no results. Still need to search completely based on path (rather than name's + types) to completely fix. Will continue to work this

10 years agoNote that translation workflow is WIP now.
OGINO Masanori [Tue, 14 Jan 2014 12:30:15 +0000 (21:30 +0900)]
Note that translation workflow is WIP now.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
10 years agoAdd notes for translators.
OGINO Masanori [Mon, 13 Jan 2014 06:18:04 +0000 (15:18 +0900)]
Add notes for translators.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
10 years agoUpdate .po and strip down untranslated entries.
OGINO Masanori [Mon, 13 Jan 2014 03:18:17 +0000 (12:18 +0900)]
Update .po and strip down untranslated entries.

This work is done by execute these commands manually:

$ po4a --copyright-holder="The Rust Project Developers" \
    --package-name="Rust" \
    --package-version="0.10-pre" \
    -M UTF-8 -L UTF-8 \
    doc/po4a.conf
$ for f in doc/po/**/*.po; do
>   msgattrib --translated $f -o $f.strip
>   if [ -e $f.strip ]; then
>       mv $f.strip $f
>   else
>       rm $f
>   fi
> done

It should be managed by the build system automatically to use in our
translation workflow, but I've not yet done that.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
10 years agoCompleted patch searching for rust docs
b1nd [Fri, 10 Jan 2014 04:59:53 +0000 (15:59 +1100)]
Completed patch searching for rust docs
Made temporary changes to include multiple keywords in rustdoc search

Implemented search based on multiple keywords

Added some commenting and house cleaning

Added path searching to rustdoc

10 years agoauto merge of #11501 : alexcrichton/rust/dox, r=brson
bors [Tue, 14 Jan 2014 07:26:36 +0000 (23:26 -0800)]
auto merge of #11501 : alexcrichton/rust/dox, r=brson

The official documentation sorely needs an explanation of the rust runtime and what it is exactly, and I want this guide to provide that information.

I'm unsure of whether I've been too light on some topics while too heavy on others. I also feel like a few things are still missing. As always, feedback is appreciated, especially about things you'd like to see written about!

10 years agodox: Write a guide to the rust runtime
Alex Crichton [Sat, 11 Jan 2014 00:34:55 +0000 (16:34 -0800)]
dox: Write a guide to the rust runtime

10 years agoauto merge of #11531 : brson/rust/yetmoreandroidfixes, r=alexcrichton
bors [Tue, 14 Jan 2014 05:51:37 +0000 (21:51 -0800)]
auto merge of #11531 : brson/rust/yetmoreandroidfixes, r=alexcrichton

10 years agostd: Ignore bind error tests on android. #11530
Brian Anderson [Tue, 14 Jan 2014 03:45:08 +0000 (19:45 -0800)]
std: Ignore bind error tests on android. #11530

10 years agomk: Make TESTNAME and VERBOSE work with android. Closes #10957
Brian Anderson [Tue, 14 Jan 2014 03:44:18 +0000 (19:44 -0800)]
mk: Make TESTNAME and VERBOSE work with android. Closes #10957

10 years agoauto merge of #11525 : luqmana/rust/trait-coercions, r=pcwalton
bors [Tue, 14 Jan 2014 03:01:52 +0000 (19:01 -0800)]
auto merge of #11525 : luqmana/rust/trait-coercions, r=pcwalton

Fixes 2 annoying issues with implicit trait object coercion: #11481 & #11197.

10 years agolibrustc: Don't translate an expr twice when implicitly coercing to a trait object...
Luqman Aden [Tue, 14 Jan 2014 01:34:23 +0000 (20:34 -0500)]
librustc: Don't translate an expr twice when implicitly coercing to a trait object. Fixes #11197.

10 years agolibrustc: Don't allow use after move of implicitly coerced object. Fixes #11481.
Luqman Aden [Mon, 13 Jan 2014 00:59:47 +0000 (19:59 -0500)]
librustc: Don't allow use after move of implicitly coerced object. Fixes #11481.

10 years agoauto merge of #11305 : pcwalton/rust/at-patterns, r=pcwalton
bors [Mon, 13 Jan 2014 22:51:34 +0000 (14:51 -0800)]
auto merge of #11305 : pcwalton/rust/at-patterns, r=pcwalton

r? @nikomatsakis

10 years agolibrustc: Remove `@` pointer patterns from the language
Patrick Walton [Fri, 3 Jan 2014 23:08:48 +0000 (15:08 -0800)]
librustc: Remove `@` pointer patterns from the language

10 years agoauto merge of #11518 : brson/rust/moreandroidxfails, r=alexcrichton
bors [Mon, 13 Jan 2014 21:21:39 +0000 (13:21 -0800)]
auto merge of #11518 : brson/rust/moreandroidxfails, r=alexcrichton

10 years agoxfail another native test on android (#11419)
Brian Anderson [Mon, 13 Jan 2014 21:14:32 +0000 (13:14 -0800)]
xfail another native test on android (#11419)

10 years agolibsyntax: Make managed box `@` patterns obsolete
Patrick Walton [Fri, 3 Jan 2014 22:15:08 +0000 (14:15 -0800)]
libsyntax: Make managed box `@` patterns obsolete

10 years agoauto merge of #11482 : fhahn/rust/issue-8005-better-error-msg-semi-last-stmt, r=alexc...
bors [Mon, 13 Jan 2014 19:06:41 +0000 (11:06 -0800)]
auto merge of #11482 : fhahn/rust/issue-8005-better-error-msg-semi-last-stmt, r=alexcrichton

This is a patch for #8005, thanks @lfairy for the hint.

It seems like `block.expr` is None, if the last line of a function has a semi colon (= it ends with a statement).

@kmcallister does this error message cover the intended use cases?
I'm not sure about the message, the wording and the span could probably be improved.

10 years agoBetter error message for semicolon on the last line of a function
Florian Hahn [Sat, 11 Jan 2014 21:29:46 +0000 (22:29 +0100)]
Better error message for semicolon on the last line of a function

closes #8005

10 years agoauto merge of #11513 : huonw/rust/generic-errs, r=alexcrichton
bors [Mon, 13 Jan 2014 17:21:41 +0000 (09:21 -0800)]
auto merge of #11513 : huonw/rust/generic-errs, r=alexcrichton

Unsuffixed literals like 1 and 1.1, and free type parameters sometimes
have to be printed in error messages, which ended up with \<V0>, \<VI0>
and \<VF0>. This change puts the words "generic" and "integer"/"float"
into the message so it's not a completely black box.

10 years agorustc: make error messages containing generic more self-explanatory.
Huon Wilson [Mon, 13 Jan 2014 11:08:28 +0000 (22:08 +1100)]
rustc: make error messages containing generic more self-explanatory.

Unsuffixed literals like 1 and 1.1, and free type parameters sometimes
have to be printed in error messages, which ended up with <V0>, <VI0>
and <VF0>. This change puts the words "generic" and "integer"/"float"
into the message so it's not a completely black box.

10 years agoauto merge of #11510 : wycats/rust/clone-treeset, r=huonw
bors [Mon, 13 Jan 2014 10:31:51 +0000 (02:31 -0800)]
auto merge of #11510 : wycats/rust/clone-treeset, r=huonw

10 years agoAdd Clone to TreeSet
Yehuda Katz [Mon, 13 Jan 2014 08:25:30 +0000 (00:25 -0800)]
Add Clone to TreeSet

10 years agoauto merge of #11506 : brson/rust/androidfixes, r=cmr
bors [Mon, 13 Jan 2014 03:36:37 +0000 (19:36 -0800)]
auto merge of #11506 : brson/rust/androidfixes, r=cmr

10 years agoxfail two tests that hang on Android (#11419)
Brian Anderson [Mon, 13 Jan 2014 03:31:26 +0000 (19:31 -0800)]
xfail two tests that hang on Android (#11419)

10 years agoauto merge of #11442 : brson/rust/0.10-pre, r=alexcrichton
bors [Mon, 13 Jan 2014 01:51:33 +0000 (17:51 -0800)]
auto merge of #11442 : brson/rust/0.10-pre, r=alexcrichton

10 years agoBump version to 0.10-pre
Brian Anderson [Fri, 10 Jan 2014 06:47:26 +0000 (22:47 -0800)]
Bump version to 0.10-pre

10 years agoauto merge of #11504 : bjz/rust/std-num-cleanups, r=brson
bors [Mon, 13 Jan 2014 00:16:34 +0000 (16:16 -0800)]
auto merge of #11504 : bjz/rust/std-num-cleanups, r=brson

The gamma and bessel functions are of little utility outside a small specialized subset of use cases, and so they don't really make sense for inclusion in the standard library. The only reason they were included in the first place was to mirror libm, which is not a very good justification. If people need them for their own projects then they can make their own bindings to libm (which isn't too hard).

10 years agoClean up std::num::cmath and remove stale comments
Brendan Zabarauskas [Sun, 12 Jan 2014 23:33:54 +0000 (10:33 +1100)]
Clean up std::num::cmath and remove stale comments

10 years agoRemove RealExt
Brendan Zabarauskas [Sun, 12 Jan 2014 23:32:50 +0000 (10:32 +1100)]
Remove RealExt

These functions are of little utility outside a small subset of use cases. If people need them for their own projects then they can use their own bindings for libm (which aren't hard to make).

10 years agoauto merge of #11502 : jhasse/rust/crate_type, r=alexcrichton
bors [Sun, 12 Jan 2014 20:31:49 +0000 (12:31 -0800)]
auto merge of #11502 : jhasse/rust/crate_type, r=alexcrichton

This is unnecessary and also leads to a bug: When the user specifies

```
#[crate_type = "rlib"];
```

rustpkg still creates a dylib.

Also it's good not to duplicate functionality. `build_session_options` handles this just fine.

10 years agoauto merge of #11471 : ktt3ja/rust/issue-11380, r=alexcrichton
bors [Sun, 12 Jan 2014 19:16:32 +0000 (11:16 -0800)]
auto merge of #11471 : ktt3ja/rust/issue-11380, r=alexcrichton

Dead code pass now explicitly checks for `#[allow(dead_code)]` and
`#[lang=".."]` attributes on items and marks them as live if they have
those attributes. The former is done so that if we want to suppress
warnings for a group of dead functions, we only have to annotate the
"root" of the call chain.

Close #11380 and #11440.

10 years agoMark allowed dead code and lang items as live
Kiet Tran [Sat, 11 Jan 2014 08:21:53 +0000 (03:21 -0500)]
Mark allowed dead code and lang items as live

Dead code pass now explicitly checks for `#[allow(dead_code)]` and
`#[lang=".."]` attributes on items and marks them as live if they have
those attributes. The former is done so that if we want to suppress
warnings for a group of dead functions, we only have to annotate the
"root" of the call chain.

10 years agoDon't overwrite the options.output value from build_session_options
Jan Niklas Hasse [Sun, 12 Jan 2014 18:10:43 +0000 (19:10 +0100)]
Don't overwrite the options.output value from build_session_options

10 years agoauto merge of #11495 : kud1ing/rust/backticks, r=huonw
bors [Sun, 12 Jan 2014 10:56:28 +0000 (02:56 -0800)]
auto merge of #11495 : kud1ing/rust/backticks, r=huonw

10 years agomore backticks
kud1ing [Sun, 12 Jan 2014 09:35:10 +0000 (10:35 +0100)]
more backticks

10 years agoauto merge of #11491 : wting/rust/wting_7959_document_inline_attributes, r=alexcrichton
bors [Sun, 12 Jan 2014 07:16:27 +0000 (23:16 -0800)]
auto merge of #11491 : wting/rust/wting_7959_document_inline_attributes, r=alexcrichton

Closes #7959.

10 years agoauto merge of #11488 : kballard/rust/librustpkg-docs, r=brson
bors [Sun, 12 Jan 2014 05:26:26 +0000 (21:26 -0800)]
auto merge of #11488 : kballard/rust/librustpkg-docs, r=brson

10 years agoAdd inline attributes documentation.
William Ting [Sun, 12 Jan 2014 04:01:55 +0000 (22:01 -0600)]
Add inline attributes documentation.

Closes #7959.

10 years agoAdd librustuv to doc/index.md
Kevin Ballard [Sun, 12 Jan 2014 03:16:25 +0000 (19:16 -0800)]
Add librustuv to doc/index.md

10 years agoRestore missing line breaks in doc/index.html
Kevin Ballard [Sun, 12 Jan 2014 03:15:05 +0000 (19:15 -0800)]
Restore missing line breaks in doc/index.html

a30d61b05a removed all of the trailing whitespace in doc/index.md.
Unfortunately, that trailing whitespace was actually markdown syntax for
line breaks.

10 years agodoc: build the docs for librustpkg
Kevin Ballard [Sun, 12 Jan 2014 01:23:55 +0000 (17:23 -0800)]
doc: build the docs for librustpkg

10 years agoauto merge of #11483 : kballard/rust/gitignore-doc-rustuv, r=alexcrichton
bors [Sun, 12 Jan 2014 01:37:08 +0000 (17:37 -0800)]
auto merge of #11483 : kballard/rust/gitignore-doc-rustuv, r=alexcrichton

10 years agoRemoved remnants of `@mut` and `~mut` from comments and the type system.
Eduard Burtescu [Sun, 12 Jan 2014 00:25:51 +0000 (02:25 +0200)]
Removed remnants of `@mut` and `~mut` from comments and the type system.

10 years agoauto merge of #11480 : SiegeLord/rust/float_base, r=cmr
bors [Sun, 12 Jan 2014 00:21:24 +0000 (16:21 -0800)]
auto merge of #11480 : SiegeLord/rust/float_base, r=cmr

This fixes the incorrect lexing of things like:

~~~rust
let b = 0o2f32;
let d = 0o4e6;
let f = 0o6e6f32;
~~~

and brings the float literal lexer in line with the description of the float literals in the manual.

10 years agoauto merge of #11477 : adridu59/rust/bug-report, r=cmr
bors [Sat, 11 Jan 2014 23:01:32 +0000 (15:01 -0800)]
auto merge of #11477 : adridu59/rust/bug-report, r=cmr

Mostly cleanups for doc and READMEs. Fixes the bug reporting link.

10 years agoAdd /doc/rustuv to .gitignore
Kevin Ballard [Sat, 11 Jan 2014 22:43:58 +0000 (14:43 -0800)]
Add /doc/rustuv to .gitignore

10 years agoauto merge of #11338 : jhasse/rust/patch-rustpkgtarget, r=alexcrichton
bors [Sat, 11 Jan 2014 21:06:27 +0000 (13:06 -0800)]
auto merge of #11338 : jhasse/rust/patch-rustpkgtarget, r=alexcrichton

#11243

10 years agoUse target libraries instead of host libraries. Fixes #11243
Jan Niklas Hasse [Sat, 11 Jan 2014 19:44:39 +0000 (20:44 +0100)]
Use target libraries instead of host libraries. Fixes #11243

10 years agoTighten up float literal lexing.
SiegeLord [Sat, 11 Jan 2014 18:53:06 +0000 (13:53 -0500)]
Tighten up float literal lexing.

Specifically, dissallow setting the number base for every type of float
literal, not only those that contain the decimal point. This is in line with
the description in the manual.

10 years agoTrim src/ README, bring back version_info everywhere
Adrien Tétar [Sat, 11 Jan 2014 14:29:17 +0000 (15:29 +0100)]
Trim src/ README, bring back version_info everywhere

10 years agoVarious READMEs and docs cleanup
Adrien Tétar [Sat, 11 Jan 2014 14:19:38 +0000 (15:19 +0100)]
Various READMEs and docs cleanup

Noticeably closes #11428.

10 years agoauto merge of #11470 : eminence/rust/rustpkg_help_test, r=alexcrichton
bors [Sat, 11 Jan 2014 18:21:22 +0000 (10:21 -0800)]
auto merge of #11470 : eminence/rust/rustpkg_help_test, r=alexcrichton

In general, you can run "rustpkg help <cmd>" to see some specific usage information for <cmd>.  However, this was handled in a very ad-hoc and buggy manner.  For example, running "rustpkg help prefer" would actually show you the usage information for the "uninstall" cmd.  Or "rustpkg help test" would show you the usage information for the "build" command.  Or "rustpkg help list" would just run the "list" command (and not show you anything usage information)

This commit attempts to fix this by making a new HelpCmd (and handling it explicitly)

10 years ago"rustpkg prefer" should print the help for '"prefer" not "uninstall"
Andrew Chin [Sat, 11 Jan 2014 16:48:54 +0000 (11:48 -0500)]
"rustpkg prefer" should print the help for '"prefer" not "uninstall"

10 years agoauto merge of #11472 : kud1ing/rust/iOS, r=alexcrichton
bors [Sat, 11 Jan 2014 16:46:20 +0000 (08:46 -0800)]
auto merge of #11472 : kud1ing/rust/iOS, r=alexcrichton

This fixes #11336

I guess the type sizes are correct for both OS X and iOS, but i am not certain.
In any case, i'd rather have any iOS build at all, so that we have something to improve upon.

10 years agoauto merge of #11252 : eddyb/rust/ty-cleanup, r=pcwalton
bors [Sat, 11 Jan 2014 15:31:40 +0000 (07:31 -0800)]
auto merge of #11252 : eddyb/rust/ty-cleanup, r=pcwalton

10 years agoUse the right type for self in methods and remove obsoleted items.
Eduard Burtescu [Sat, 11 Jan 2014 14:39:32 +0000 (16:39 +0200)]
Use the right type for self in methods and remove obsoleted items.
Fixes #7411, #10615.

10 years agoRemoved free_glue from tydesc (the code is still generated, but inlined in drop_glue).
Eduard Burtescu [Wed, 1 Jan 2014 12:45:31 +0000 (14:45 +0200)]
Removed free_glue from tydesc (the code is still generated, but inlined in drop_glue).

10 years agoRemoved obsolete 'e' prefix on ty_evec and ty_estr.
Eduard Burtescu [Wed, 1 Jan 2014 02:09:50 +0000 (04:09 +0200)]
Removed obsolete 'e' prefix on ty_evec and ty_estr.

10 years agoauto merge of #11463 : brson/rust/envcaps, r=huonw
bors [Sat, 11 Jan 2014 14:11:22 +0000 (06:11 -0800)]
auto merge of #11463 : brson/rust/envcaps, r=huonw

Death to caps.

10 years agoauto merge of #11468 : klutzy/rust/workcache-cleanup, r=alexcrichton
bors [Sat, 11 Jan 2014 12:46:21 +0000 (04:46 -0800)]
auto merge of #11468 : klutzy/rust/workcache-cleanup, r=alexcrichton

10 years agoauto merge of #11461 : alexcrichton/rust/rustdoc-fixes, r=brson
bors [Sat, 11 Jan 2014 10:41:23 +0000 (02:41 -0800)]
auto merge of #11461 : alexcrichton/rust/rustdoc-fixes, r=brson

See the commits.

10 years agorustdoc: Don't show a fields header if there are none
Alex Crichton [Fri, 10 Jan 2014 23:10:52 +0000 (15:10 -0800)]
rustdoc: Don't show a fields header if there are none

10 years agoauto merge of #11466 : eminence/rust/fix_rustpkg_help, r=brson
bors [Sat, 11 Jan 2014 09:21:49 +0000 (01:21 -0800)]
auto merge of #11466 : eminence/rust/fix_rustpkg_help, r=brson

It appears --help got lost in aa50ebd03ed1d1f698d0d275f9570ef53e720831

Fixes #11423

10 years agodefine arch for iOS/ARM
kud1ing [Sat, 11 Jan 2014 09:21:24 +0000 (10:21 +0100)]
define arch for iOS/ARM

10 years agoauto merge of #11465 : pcwalton/rust/borrow-check-bug, r=pcwalton
bors [Sat, 11 Jan 2014 08:01:31 +0000 (00:01 -0800)]
auto merge of #11465 : pcwalton/rust/borrow-check-bug, r=pcwalton

it. r=nikomatsakis

10 years agoextra::workcache: Remove unused Logger
klutzy [Tue, 7 Jan 2014 07:30:15 +0000 (16:30 +0900)]
extra::workcache: Remove unused Logger

10 years agoauto merge of #11459 : tedhorst/rust/uninstall_rustlib, r=alexcrichton
bors [Sat, 11 Jan 2014 05:36:25 +0000 (21:36 -0800)]
auto merge of #11459 : tedhorst/rust/uninstall_rustlib, r=alexcrichton

Update the uninstall target with the configurable rust lib directory name.

cc @jhasse

10 years agoFix `rustpkg help` handling
Andrew Chin [Sat, 11 Jan 2014 05:34:09 +0000 (00:34 -0500)]
Fix `rustpkg help` handling

In general, you could run "rustpkg help <cmd>" to see some specific
usage information for <cmd>.  However, this was handled in a very ad-hoc
and buggy manner.  For example, running "rustpkg help prefer" would
actually show you the usage information for the "uninstall" cmd.

This commit attempts to fix this by making Help a real Command, and
making the handing of it explicit.

10 years agoRe-implement --help in rustpkg
Andrew Chin [Sat, 11 Jan 2014 03:10:43 +0000 (22:10 -0500)]
Re-implement --help in rustpkg

Fixes #11423

10 years agolibrustc: Check restrictions on all subcomponents of a path when moving
Patrick Walton [Sat, 11 Jan 2014 02:30:06 +0000 (18:30 -0800)]
librustc: Check restrictions on all subcomponents of a path when moving
it. r=nikomatsakis

10 years agoauto merge of #11416 : bjz/rust/remove-print-fns, r=alexcrichton
bors [Sat, 11 Jan 2014 02:21:21 +0000 (18:21 -0800)]
auto merge of #11416 : bjz/rust/remove-print-fns, r=alexcrichton

The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.

10 years agosyntax: Fix capitalization in macro_parser errors
Brian Anderson [Sat, 11 Jan 2014 02:06:23 +0000 (18:06 -0800)]
syntax: Fix capitalization in macro_parser errors

10 years agorustc: Fix formatting of env! error message
Brian Anderson [Sat, 11 Jan 2014 01:55:53 +0000 (17:55 -0800)]
rustc: Fix formatting of env! error message

Death to caps.

10 years agoauto merge of #11415 : nick29581/rust/visit_trait_option, r=alexcrichton
bors [Sat, 11 Jan 2014 01:06:27 +0000 (17:06 -0800)]
auto merge of #11415 : nick29581/rust/visit_trait_option, r=alexcrichton

...Therefore, we should not iterate over it.

10 years agoRemove re-exports of std::io::stdio::{print, println} in the prelude.
Brendan Zabarauskas [Thu, 9 Jan 2014 10:06:55 +0000 (21:06 +1100)]
Remove re-exports of std::io::stdio::{print, println} in the prelude.

The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.

10 years agorustdoc: Don't show private modules
Alex Crichton [Fri, 10 Jan 2014 22:54:11 +0000 (14:54 -0800)]
rustdoc: Don't show private modules

10 years agorustdoc: Get --version working
Alex Crichton [Fri, 10 Jan 2014 18:05:26 +0000 (10:05 -0800)]
rustdoc: Get --version working

Closes #11421

10 years agodoc: build the docs for librustuv
Alex Crichton [Fri, 10 Jan 2014 07:27:35 +0000 (23:27 -0800)]
doc: build the docs for librustuv

Closes #11444

10 years agorustdoc: Don't strip empty modules with documentation
Alex Crichton [Fri, 10 Jan 2014 07:23:10 +0000 (23:23 -0800)]
rustdoc: Don't strip empty modules with documentation

Closes #11443

10 years agoauto merge of #11448 : c-a/rust/u64_from_be_bytes, r=alexcrichton
bors [Fri, 10 Jan 2014 22:01:34 +0000 (14:01 -0800)]
auto merge of #11448 : c-a/rust/u64_from_be_bytes, r=alexcrichton

Instead of reading a byte at a time in a loop we hardcode how to read each size.
We also try to do as few reads as possible by reading as big primitive types as
possible. For example if size is eight we do a single read of a u64 value and
if size is seven we read it as [u32|u16|u8].

Timings on a Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz

-- Before --
running 7 tests
test io::extensions::test::test_u64_from_be_bytes ... ok
test io::extensions::bench::u64_from_be_bytes_4_aligned         ... bench:       386 ns/iter (+/- 5)
test io::extensions::bench::u64_from_be_bytes_4_unaligned       ... bench:       387 ns/iter (+/- 2)
test io::extensions::bench::u64_from_be_bytes_7_aligned         ... bench:       628 ns/iter (+/- 1)
test io::extensions::bench::u64_from_be_bytes_7_unaligned       ... bench:       637 ns/iter (+/- 3)
test io::extensions::bench::u64_from_be_bytes_8_aligned         ... bench:       727 ns/iter (+/- 18)
test io::extensions::bench::u64_from_be_bytes_8_unaligned       ... bench:       723 ns/iter (+/- 22)

callgrind rustc -S  rust/src/test/bench/sudoku.rs
    u64_from_be_bytes self: 4.37%

-- After --
running 7 tests
test io::extensions::test::test_u64_from_be_bytes ... ok
test io::extensions::bench::u64_from_be_bytes_4_aligned         ... bench:       162 ns/iter (+/- 7)
test io::extensions::bench::u64_from_be_bytes_4_unaligned       ... bench:       164 ns/iter (+/- 7)
test io::extensions::bench::u64_from_be_bytes_7_aligned         ... bench:       201 ns/iter (+/- 7)
test io::extensions::bench::u64_from_be_bytes_7_unaligned       ... bench:       210 ns/iter (+/- 9)
test io::extensions::bench::u64_from_be_bytes_8_aligned         ... bench:       163 ns/iter (+/- 7)
test io::extensions::bench::u64_from_be_bytes_8_unaligned       ... bench:       163 ns/iter (+/- 10)

callgrind rustc -S  rust/src/test/bench/sudoku.rs
    u64_from_be_bytes self: 1.78%

10 years agoauto merge of #11449 : rcatolino/rust/assign-binop-handling, r=alexcrichton
bors [Fri, 10 Jan 2014 19:51:21 +0000 (11:51 -0800)]
auto merge of #11449 : rcatolino/rust/assign-binop-handling, r=alexcrichton

So far the following code
```
struct Foo;

fn main() {
  let mut t = Foo;
  let ref b = Foo;
  a += *b;
}
```
errors with
```
test.rs:15:3: 13:11 error: binary operation + cannot be applied to type `Foo`
test.rs:15   *a += *b;
```
Since assignment-operators are no longer expanded to ```left = left OP right``` but are independents operators it should be
```
test.rs:15:3: 13:11 error: binary operation += cannot be applied to type `Foo`
test.rs:15   *a += *b;
```
to make it clear that implementing Add for Foo is not gonna work. (cf issues #11143, #11344)

Besides that, we also need to typecheck the rhs expression even if the operator has no implementation, or we end up with unknown types for the nodes of the rhs and an ICE later on while resolving types. (once again cf #11143 and #11344).

This probably would get fixed with #5992, but in the meantime it's a confusing error to stumble upon.
@pcwalton, you wrote the original code, what do you think?
(closes #11143 and #11344)

10 years agoImprove invalid operator assignment handling.
Raphael Catolino [Fri, 10 Jan 2014 19:46:20 +0000 (20:46 +0100)]
Improve invalid operator assignment handling.

10 years agofix uninstall target with configurable rustlib directory
Ted Horst [Fri, 10 Jan 2014 19:45:41 +0000 (13:45 -0600)]
fix uninstall target with configurable rustlib directory

10 years agostd::io: Optimize u64_from_be_bytes()
Carl-Anton Ingmarsson [Thu, 9 Jan 2014 09:35:36 +0000 (10:35 +0100)]
std::io: Optimize u64_from_be_bytes()

Instead of reading a byte at a time in a loop we copy the relevant bytes into
a temporary vector of size eight. We can then read the value from the temporary
vector using a single u64 read. LLVM seems to be able to optimize this
almost scarily good.

10 years agoauto merge of #11452 : derekchiang/rust/fix-11421, r=cmr
bors [Fri, 10 Jan 2014 16:26:24 +0000 (08:26 -0800)]
auto merge of #11452 : derekchiang/rust/fix-11421, r=cmr

Closes #11421.  A pretty trivial fix.

10 years agoauto merge of #11451 : kud1ing/rust/patch-1, r=cmr
bors [Fri, 10 Jan 2014 15:06:32 +0000 (07:06 -0800)]
auto merge of #11451 : kud1ing/rust/patch-1, r=cmr

10 years agoFix #11421
Derek Chiang [Fri, 10 Jan 2014 14:05:54 +0000 (22:05 +0800)]
Fix #11421

10 years ago"As long an iterator" => "As long as an iterator"
kud1ing [Fri, 10 Jan 2014 14:05:54 +0000 (15:05 +0100)]
"As long an iterator" => "As long as an iterator"

10 years agostd::io: Add tests and benchmarks for u64_from_be_bytes()
Carl-Anton Ingmarsson [Wed, 8 Jan 2014 23:20:14 +0000 (00:20 +0100)]
std::io: Add tests and benchmarks for u64_from_be_bytes()

10 years agoauto merge of #11441 : jld/rust/enum-nullable-const-null-with-fields, r=alexcrichton
bors [Fri, 10 Jan 2014 11:11:17 +0000 (03:11 -0800)]
auto merge of #11441 : jld/rust/enum-nullable-const-null-with-fields, r=alexcrichton

That is, if you have an enum type that is subject to the nullable
pointer optimization, but the null variant has a nonzero number of
fields, and you declare a static whose value is of that variant, then
that used to be an ICE but this change fixes it.