]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoAuto merge of #21949 - japaric:index, r=nikomatsakis
bors [Sat, 7 Feb 2015 04:14:22 +0000 (04:14 +0000)]
Auto merge of #21949 - japaric:index, r=nikomatsakis

closes #21630

Overloaded indexing (`&[mut] foo[bar]`) only works when `<Self as Index>::Output` is the same as `<Self as IndexMut>::Output` (see issue above). To restrict implementations of `IndexMut` that doesn't work, this PR makes `IndexMut` a supertrait over `Index`, i.e. `trait IndexMut<I>: Index<I>`, just like in the `trait DerefMut: Deref` case.

This breaks all downstream implementations of `IndexMut`, in most cases this simply means removing the `type Output = ..` bit, which is now redundant, from `IndexMut` implementations:

``` diff
 impl Index<Foo> for Bar {
     type Output = Baz;
     ..
 }

 impl IndexMut<Foo> for Bar {
-    type Output = Baz;
     ..
 }
```

[breaking-change]

---

r? @nikomatsakis

9 years agomake `IndexMut` a super trait over `Index`
Jorge Aparicio [Wed, 4 Feb 2015 23:00:12 +0000 (18:00 -0500)]
make `IndexMut` a super trait over `Index`

closes #21630

9 years agoAuto merge of #21505 - GuillaumeGomez:interned_string, r=alexcrichton
bors [Sat, 7 Feb 2015 02:04:47 +0000 (02:04 +0000)]
Auto merge of #21505 - GuillaumeGomez:interned_string, r=alexcrichton

It's in order to make the code more homogeneous.

9 years agoAuto merge of #21997 - Manishearth:rollup, r=alexcrichton
bors [Fri, 6 Feb 2015 23:30:17 +0000 (23:30 +0000)]
Auto merge of #21997 - Manishearth:rollup, r=alexcrichton

None

9 years agolibrustdoc has been updated
GuillaumeGomez [Thu, 5 Feb 2015 14:19:23 +0000 (15:19 +0100)]
librustdoc has been updated

Fixes run build error

Fix test failure

Fix tests' errors

9 years agoAuto merge of #21926 - mzabaluev:raw-lifetime, r=alexcrichton
bors [Fri, 6 Feb 2015 19:49:31 +0000 (19:49 +0000)]
Auto merge of #21926 - mzabaluev:raw-lifetime, r=alexcrichton

New functions, `slice::from_raw_parts` and `slice::from_raw_parts_mut`,
are added to implement the lifetime convention as agreed in rust-lang/rfcs#556.
The functions `slice::from_raw_buf` and `slice::from_raw_mut_buf` are
left deprecated for the time being.

Holding back on changing the signature of `std::ffi::c_str_to_bytes` as consensus in rust-lang/rfcs#592 is building to replace it with a composition of other functions.

Contribution to #21923.

9 years agoRollup merge of #22009 - japaric:no-mov, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 19:14:31 +0000 (00:44 +0530)]
Rollup merge of #22009 - japaric:no-mov, r=alexcrichton

 If you were still using `MaybeOwnedVector`, update your code to use `CowVec`.

[breaking-change]

---

We already removed `MaybeOwned` (the string equivalent) long time ago and with a much shorter deprecation period. It's time to let go.

9 years agoRollup merge of #22005 - nagisa:obsolete-ctx, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 19:14:14 +0000 (00:44 +0530)]
Rollup merge of #22005 - nagisa:obsolete-ctx, r=alexcrichton

 The word is repeated twice in the message like:

    error: obsolete syntax: `:`, `&mut:`, or `&:` syntax

This removes the word syntax that appears in messages after the second colon (:).

9 years agoRollup merge of #21994 - iKevinY:featureck-fix, r=brson
Manish Goregaokar [Fri, 6 Feb 2015 19:13:54 +0000 (00:43 +0530)]
Rollup merge of #21994 - iKevinY:featureck-fix, r=brson

 It seems that `lang_feature_stats` was supposed to refer to `language_feature_stats` instead.

r? @brson

9 years agofix outdated docs
Alexis [Fri, 6 Feb 2015 18:57:13 +0000 (13:57 -0500)]
fix outdated docs

Conflicts:
src/libstd/collections/mod.rs

9 years agofix outdated docs
Alexis [Fri, 6 Feb 2015 18:57:13 +0000 (13:57 -0500)]
fix outdated docs

Conflicts:
src/libstd/collections/mod.rs

9 years agoMore libcollections fixes
Manish Goregaokar [Fri, 6 Feb 2015 18:06:02 +0000 (23:36 +0530)]
More libcollections fixes

9 years agoAuto merge of #21860 - mdinger:enum_rewording, r=steveklabnik
bors [Fri, 6 Feb 2015 17:45:19 +0000 (17:45 +0000)]
Auto merge of #21860 - mdinger:enum_rewording, r=steveklabnik

Second try to address https://github.com/rust-lang/rust/issues/21196 . A lot that was removed at the end basically seemed repetitive showing simple variations on the same type. It seems more effective to just show more variants at the beginning instead.

If you want to pack values into an example, better to use `i32` or some digit than `String` because you don't need the `to_string()` method.

I didn't mention `derive` because:
* I can't explain it (only use it)
* I don't have a link to a good description (maybe rustbyexample but you probably want links internal)
* Giving more detail especially stating that `==` won't work and why should help quite a bit

I didn't `make test` or check links but I will if this will be merged.

@steveklabnik

9 years agoremove the deprecated MaybeOwnedVector
Jorge Aparicio [Fri, 6 Feb 2015 13:50:17 +0000 (08:50 -0500)]
remove the deprecated MaybeOwnedVector

9 years agoRemove word syntax from obsolete syntax messages
Simonas Kazlauskas [Fri, 6 Feb 2015 14:24:13 +0000 (16:24 +0200)]
Remove word syntax from obsolete syntax messages

The word is repeated twice in the message like

    error: obsolete syntax: `:`, `&mut:`, or `&:` syntax

This removes the word syntax that appears in messages after the second colon (:).

9 years agoRollup merge of #21991 - steveklabnik:gh21915, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 10:50:11 +0000 (16:20 +0530)]
Rollup merge of #21991 - steveklabnik:gh21915, r=huonw

 Fixes #21915

9 years agorm unused feature
Manish Goregaokar [Fri, 6 Feb 2015 10:49:30 +0000 (16:19 +0530)]
rm unused feature

9 years agolibcollections: unit test fixes
Manish Goregaokar [Fri, 6 Feb 2015 02:35:52 +0000 (08:05 +0530)]
libcollections: unit test fixes

9 years agoremove int_uint feature from libcollections
Alexis [Thu, 5 Feb 2015 20:08:33 +0000 (15:08 -0500)]
remove int_uint feature from libcollections

9 years agoRollup merge of #21989 - steveklabnik:gh21491, r=Gankro
Manish Goregaokar [Fri, 6 Feb 2015 01:37:04 +0000 (07:07 +0530)]
Rollup merge of #21989 - steveklabnik:gh21491, r=Gankro

 Fixes #21491

r? @kmcallister @Gankro

9 years agoAuto merge of #21962 - vrinek:printable-book, r=steveklabnik
bors [Fri, 6 Feb 2015 13:57:11 +0000 (13:57 +0000)]
Auto merge of #21962 - vrinek:printable-book, r=steveklabnik

Tested on:

* Safari on OSX
* Firefox on OSX

9 years agoFix infinite loop error
GuillaumeGomez [Thu, 5 Feb 2015 14:11:51 +0000 (15:11 +0100)]
Fix infinite loop error

9 years agoRemove getenv warning
GuillaumeGomez [Thu, 5 Feb 2015 00:03:12 +0000 (01:03 +0100)]
Remove getenv warning

9 years agoUpdate to last version, remove "[]" as much as possible
GuillaumeGomez [Wed, 4 Feb 2015 20:48:12 +0000 (21:48 +0100)]
Update to last version, remove "[]" as much as possible

9 years agolibrustc_driver has been updated
GuillaumeGomez [Wed, 4 Feb 2015 00:07:42 +0000 (01:07 +0100)]
librustc_driver has been updated

9 years agolibrustc_trans has been updated
GuillaumeGomez [Wed, 4 Feb 2015 00:04:50 +0000 (01:04 +0100)]
librustc_trans has been updated

9 years agolibrustc_resolve has been updated
GuillaumeGomez [Tue, 3 Feb 2015 23:48:39 +0000 (00:48 +0100)]
librustc_resolve has been updated

9 years agolibrustc_typeck has been updated
GuillaumeGomez [Tue, 3 Feb 2015 23:16:02 +0000 (00:16 +0100)]
librustc_typeck has been updated

9 years agolibrustc_borrowck has been updated
GuillaumeGomez [Tue, 3 Feb 2015 23:11:53 +0000 (00:11 +0100)]
librustc_borrowck has been updated

9 years agolibrustc has been updated
GuillaumeGomez [Tue, 3 Feb 2015 23:03:39 +0000 (00:03 +0100)]
librustc has been updated

9 years agoLibsyntax has been updated
GuillaumeGomez [Tue, 3 Feb 2015 22:31:06 +0000 (23:31 +0100)]
Libsyntax has been updated

9 years agoUpdate HEAD:master
GuillaumeGomez [Tue, 3 Feb 2015 18:59:29 +0000 (19:59 +0100)]
Update HEAD:master

9 years agoReplace the get method by the deref one on InternedString
GuillaumeGomez [Mon, 2 Feb 2015 23:23:08 +0000 (00:23 +0100)]
Replace the get method by the deref one on InternedString

9 years agoAdd Str trait to InternedString, set get method deprecated
GuillaumeGomez [Thu, 22 Jan 2015 11:28:44 +0000 (12:28 +0100)]
Add Str trait to InternedString, set get method deprecated

9 years agoRollup merge of #21968 - nikomatsakis:issue-21965-duplicate-preds-in-env, r=pnkfelix
Manish Goregaokar [Fri, 6 Feb 2015 00:11:55 +0000 (05:41 +0530)]
Rollup merge of #21968 - nikomatsakis:issue-21965-duplicate-preds-in-env, r=pnkfelix

 We were already building a hashset to check for duplicates, but we assumed that the initial vector had no duplicates. Fixes #21965.

r? @pnkfelix

9 years agoRollup merge of #21966 - scialex:fix-extern, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:11:38 +0000 (05:41 +0530)]
Rollup merge of #21966 - scialex:fix-extern, r=alexcrichton

 Also added test for it.

Fixes #21928

9 years agoRollup merge of #21958 - brson:stable-features, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:11:13 +0000 (05:41 +0530)]
Rollup merge of #21958 - brson:stable-features, r=alexcrichton

 ....

The 'stable_features' lint helps people progress from unstable to
stable Rust by telling them when they no longer need a `feature`
attribute because upstream Rust has declared it stable.

This compares to the existing 'unstable_features' lint, which is used
to implement feature staging, and triggers on *any* use
of `#[feature]`.

9 years agoRollup merge of #21926 - mzabaluev:raw-lifetime, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:10:52 +0000 (05:40 +0530)]
Rollup merge of #21926 - mzabaluev:raw-lifetime, r=alexcrichton

 New functions, `slice::from_raw_parts` and `slice::from_raw_parts_mut`,
are added to implement the lifetime convention as agreed in rust-lang/rfcs#556.
The functions `slice::from_raw_buf` and `slice::from_raw_mut_buf` are
left deprecated for the time being.

Holding back on changing the signature of `std::ffi::c_str_to_bytes` as consensus in rust-lang/rfcs#592 is building to replace it with a composition of other functions.

Contribution to #21923.

9 years agoRollup merge of #21969 - Gankro:collections-cleanup, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:10:28 +0000 (05:40 +0530)]
Rollup merge of #21969 - Gankro:collections-cleanup, r=alexcrichton

 This is 99% burning ints to the ground, but I also got rid of useless annotations or made code more \"idiomatic\" as I went along. Mostly changes in tests.

9 years agoRollup merge of #21924 - steveklabnik:fix_try_docs, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 00:08:37 +0000 (05:38 +0530)]
Rollup merge of #21924 - steveklabnik:fix_try_docs, r=huonw

 This is now a Result, not an Option.

9 years agoRollup merge of #21925 - sfackler:allow-missing-copy, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:08:08 +0000 (05:38 +0530)]
Rollup merge of #21925 - sfackler:allow-missing-copy, r=alexcrichton

 This was particularly helpful in the time just after OIBIT's
implementation to make sure things that were supposed to be Copy
continued to be, but it's now creates a lot of noise for types that
intentionally don't want to be Copy.

r? @alexcrichton

9 years agoRollup merge of #21941 - dotdash:with_cond_false, r=Aatch
Manish Goregaokar [Fri, 6 Feb 2015 00:07:49 +0000 (05:37 +0530)]
Rollup merge of #21941 - dotdash:with_cond_false, r=Aatch

 Currently \"k / 2\" generates one (k: uint) or two (k: int) \"br false,
...\" instructions and the corresponding basic blocks, producing quite
some noise and making the code unnecessarily hard to read.

Additionally we can skip translation if the code would end up
unreachable anyway.

9 years agoRollup merge of #21951 - Gankro:entry, r=aturon
Manish Goregaokar [Fri, 6 Feb 2015 00:07:32 +0000 (05:37 +0530)]
Rollup merge of #21951 - Gankro:entry, r=aturon

 This also removes two erroneous re-exports of the Entry variants, and so is incidentally a [breaking-change], though presumably no one should have been using those.

r? @aturon

9 years agoRollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnik
Manish Goregaokar [Fri, 6 Feb 2015 00:07:17 +0000 (05:37 +0530)]
Rollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnik

 The spelling corrections were made in both documentation comments and
regular comments.

9 years agoRollup merge of #21955 - jbcrail:fix-test-comments, r=steveklabnik
Manish Goregaokar [Fri, 6 Feb 2015 00:06:59 +0000 (05:36 +0530)]
Rollup merge of #21955 - jbcrail:fix-test-comments, r=steveklabnik

 Just spelling corrections.

9 years agoRollup merge of #21964 - semarie:openbsd-env, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:06:48 +0000 (05:36 +0530)]
Rollup merge of #21964 - semarie:openbsd-env, r=alexcrichton

 - add `_SC_GETPW_R_SIZE_MAX` constant
- declare `struct passwd`
- convert `load_self` to `current_exe`

Note: OpenBSD don't provide system function to return a valuable Path
for `env::current_exe`. The implementation is currently based on the
value of `argv[0]`, which couldn't be used when executable is called via
PATH.

9 years agoRollup merge of #21976 - mzabaluev:fix-copy-mut-lifetime, r=alexcrichton
Manish Goregaokar [Fri, 6 Feb 2015 00:06:32 +0000 (05:36 +0530)]
Rollup merge of #21976 - mzabaluev:fix-copy-mut-lifetime, r=alexcrichton

 Part of #21923

9 years agoRollup merge of #21980 - pnkfelix:more-robust-span-to-snippet, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 00:06:15 +0000 (05:36 +0530)]
Rollup merge of #21980 - pnkfelix:more-robust-span-to-snippet, r=huonw

 This can be considered partial work on #8256.

The main observable change: macro expansion sometimes results in spans where `lo > hi`; so for now, when we have such a span, do not attempt to return a snippet result.

(Longer term, we might think about whether we could still present a snippet for the cases where this arises, e.g. perhaps by showing the whole macro as the snippet, assuming that is the sole cause of such spans; or by somehow looking up the closest AST node that holds both `lo` and `hi`, and showing that.)

As a drive-by, revised the API to return a `Result` rather than an `Option`, with better information-packed error value that should help us (and maybe also our users) identify the causes of such problems in the future.  Ideally the call-sites that really want an actual snippet would be updated to catch the newly added `Err` case and print something meaningful about it, but that is not part of this PR.

9 years agoRollup merge of #21981 - pnkfelix:improve-compile-test-malformed-option-handling...
Manish Goregaokar [Fri, 6 Feb 2015 00:05:43 +0000 (05:35 +0530)]
Rollup merge of #21981 - pnkfelix:improve-compile-test-malformed-option-handling, r=huonw

 improve `compiletest` error message when path option missing.

I often run `compiletest` by hand by cut-and-pasting from what `make` runs, (which I observe via `remake --trace`), but then I need to tweak it (cut out options) and its useful to be told when I have removed an option that is actually required, such as `--android-cross-path=path`.)

9 years agoRollup merge of #21983 - pnkfelix:eschew-untyped-arena-in-regions-mock-tcx, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 00:05:28 +0000 (05:35 +0530)]
Rollup merge of #21983 - pnkfelix:eschew-untyped-arena-in-regions-mock-tcx, r=huonw

 Ported regions-mock-tcx to use TypedArena rather than Arena since it holds cyclic structure (which the Arena API updated for the Drop-Check-Rule cannot handle).

Plus, the use of `arena::Arena` here really is not justified; the allocated values are all the same type anyway.

9 years agoRollup merge of #21986 - LeoTestard:identical-statics, r=eddyb
Manish Goregaokar [Fri, 6 Feb 2015 00:05:13 +0000 (05:35 +0530)]
Rollup merge of #21986 - LeoTestard:identical-statics, r=eddyb

 Creating two identical static expressions involving casts of pointers to arrays
caused an assertion failure in librustc_trans.

cc @eddyb

9 years agoRollup merge of #21987 - pnkfelix:eschew-arena-in-variance-analysis, r=huonw
Manish Goregaokar [Fri, 6 Feb 2015 00:04:51 +0000 (05:34 +0530)]
Rollup merge of #21987 - pnkfelix:eschew-arena-in-variance-analysis, r=huonw

 Use a TypedArena rather than an Arena for the backing storage of variance analysis.

(The code was not using the main feature of Arena in the first place, since all of the `alloc` calls were on the same type.)

9 years agoAuto merge of #21609 - GarrettHeel:master, r=steveklabnik
bors [Fri, 6 Feb 2015 05:52:20 +0000 (05:52 +0000)]
Auto merge of #21609 - GarrettHeel:master, r=steveklabnik

Now that it's no longer feature gated, add docs for wildcard syntax.

9 years agoFix name of variable referenced in featureck.py
Kevin Yap [Fri, 6 Feb 2015 04:13:08 +0000 (20:13 -0800)]
Fix name of variable referenced in featureck.py

9 years agoAuto merge of #21947 - bluss:full-range-syntax, r=brson
bors [Fri, 6 Feb 2015 03:11:34 +0000 (03:11 +0000)]
Auto merge of #21947 - bluss:full-range-syntax, r=brson

Implement step 1 of rust-lang/rfcs#702

Allows the expression `..` (without either endpoint) in general, can be
used in slicing syntax `&expr[..]` where we previously wrote `&expr[]`.

The old syntax &expr[] is not yet removed or warned for.

9 years agoMention the queueueue-ness of mpsc.
Steve Klabnik [Fri, 6 Feb 2015 03:07:47 +0000 (22:07 -0500)]
Mention the queueueue-ness of mpsc.

Fixes #21915

9 years agoImprove ptr::read docs
Steve Klabnik [Fri, 6 Feb 2015 00:57:28 +0000 (19:57 -0500)]
Improve ptr::read docs

Fixes #21491

9 years agoFix an ICE when translating some static expressions.
Leo Testard [Thu, 5 Feb 2015 23:07:05 +0000 (00:07 +0100)]
Fix an ICE when translating some static expressions.
Creating two identical static expressions involving casts of pointers to arrays
caused an assertion failure in librustc_trans.

9 years agoremove int_uint feature from libcollections
Alexis [Thu, 5 Feb 2015 20:08:33 +0000 (15:08 -0500)]
remove int_uint feature from libcollections

9 years agoremove unecessary lifetimes from a bunch of collections code
Alexis [Thu, 5 Feb 2015 18:48:20 +0000 (13:48 -0500)]
remove unecessary lifetimes from a bunch of collections code

9 years agomisc collections code cleanup
Alexis [Thu, 5 Feb 2015 02:17:19 +0000 (21:17 -0500)]
misc collections code cleanup

9 years agoAuto merge of #21619 - brson:featureck-tidy, r=alexcrichton
bors [Thu, 5 Feb 2015 23:14:28 +0000 (23:14 +0000)]
Auto merge of #21619 - brson:featureck-tidy, r=alexcrichton

Builds on my [feature staging PR](https://github.com/rust-lang/rust/pull/21248) to clean up the tidy scripts a bit, and make them much faster (6s vs ~40s).

Adds make rules 'tidy-basic', 'tidy-binaries', 'tidy-errors' and 'tidy-features'.

This is the output of `make tidy` here:

```
cfg: version 1.0.0-dev (a8c878d41 2015-01-25 01:49:14 -0800)
cfg: build triple x86_64-unknown-linux-gnu
cfg: host triples x86_64-unknown-linux-gnu
cfg: target triples x86_64-unknown-linux-gnu
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu
cfg: good valgrind for x86_64-unknown-linux-gnu is 1
cfg: using CC=gcc (CFG_CC)
cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS)
cfg: valgrind-rpass command set to "/usr/bin/valgrind" --error-exitcode=100 --soname-synonyms=somalloc=NONE --quiet --suppressions=/home/brian/dev/rust3/src/etc/x86.supp  --tool=memcheck --leak-check=full
cfg: no lualatex found, deferring to xelatex
cfg: no xelatex found, deferring to pdflatex
cfg: no pdflatex found, disabling LaTeX docs
cfg: no pandoc found, omitting PDF and EPUB docs
cfg: including test rules
cfg: javac not available, skipping lexer test...
check: formatting

* linted .rs files: 4948
* linted .py files: 27
* linted .js files: 2
* linted .sh files: 5
* linted .pl files: 0
* linted .c files: 28
* linted .h files: 3
* other linted files: 0
* total lines of code: 481217
* total non-blank lines of code: 423682

check: binaries
check: extended errors

* 249 error codes
* highest error code: E0315

check: feature sanity

* advanced_slice_patterns         lang    unstable    None
* alloc                           lib     unstable    None
* asm                             lang    unstable    None
* associated_types                lang    stable      1.0.0
* box_syntax                      lang    unstable    None
* collections                     lib     unstable    None
* concat_idents                   lang    unstable    None
* core                            lib     unstable    None
* default_type_params             lang    stable      1.0.0
* globs                           lang    stable      1.0.0
* hash                            lib     unstable    None
* if_let                          lang    stable      1.0.0
* import_shadowing                lang    unstable    None
* int_uint                        lang    unstable    None
* intrinsics                      lang    unstable    None
* io                              lib     unstable    None
* issue_5723_bootstrap            lang    stable      1.0.0
* lang_items                      lang    unstable    None
* link_args                       lang    unstable    None
* link_llvm_intrinsics            lang    unstable    None
* linkage                         lang    unstable    None
* log_syntax                      lang    unstable    None
* macro_rules                     lang    stable      1.0.0
* main                            lang    unstable    None
* managed_boxes                   lang    unstable    None
* non_ascii_idents                lang    unstable    None
* old_impl_check                  lang    unstable    None
* old_orphan_check                lang    unstable    None
* on_unimplemented                lang    unstable    None
* opt_out_copy                    lang    unstable    None
* optin_builtin_traits            lang    unstable    None
* os                              lib     unstable    None
* path                            lib     unstable    None
* phase                           lang    unstable    None
* plugin                          lang    unstable    None
* plugin_registrar                lang    unstable    None
* quad_precision_float            lang    unstable    None
* quote                           lang    unstable    None
* rand                            lib     unstable    None
* rust1                           lib     stable      1.0.0
* rustc_diagnostic_macros         lang    unstable    None
* rustc_private                   lib     unstable    None
* rustdoc                         lib     unstable    None
* simd                            lang    unstable    None
* simd_ffi                        lang    unstable    None
* slicing_syntax                  lang    unstable    None
* staged_api                      lang    unstable    None
* start                           lang    unstable    None
* std_misc                        lib     unstable    None
* struct_inherit                  lang    unstable    None
* struct_variant                  lang    stable      1.0.0
* test                            lib     unstable    None
* test_accepted_feature           lang    stable      1.0.0
* test_removed_feature            lang    unstable    None
* thread_local                    lang    unstable    None
* trace_macros                    lang    unstable    None
* tuple_indexing                  lang    stable      1.0.0
* unboxed_closures                lang    unstable    None
* unicode                         lib     unstable    None
* unsafe_destructor               lang    unstable    None
* visible_private_types           lang    unstable    None
* while_let                       lang    stable      1.0.0
```

There's a lot of informational output now, which comes after things like 'NOTE's.

9 years agoUse a TypedArena rather than an Arena for the backing storage of variance analysis.
Felix S. Klock II [Mon, 2 Feb 2015 00:04:59 +0000 (01:04 +0100)]
Use a TypedArena rather than an Arena for the backing storage of variance analysis.

(The code was not using the main feature of Arena in the first place,
since all of the `alloc` calls were on the same type.

9 years agoPorted regions-mock-tcx to use TypedArena rather than Arena since it holds
Felix S. Klock II [Mon, 2 Feb 2015 12:26:54 +0000 (13:26 +0100)]
Ported regions-mock-tcx to use TypedArena rather than Arena since it holds
cyclic structure (which the Arena API updated for dropck cannot handle).

9 years agoimprove `compiletest` error message when path option missing.
Felix S. Klock II [Mon, 22 Dec 2014 18:02:11 +0000 (19:02 +0100)]
improve `compiletest` error message when path option missing.

(I often run `compiletest` by hand by cut-and-pasting from what `make`
runs, but then I need to tweak it (cut out options) and its useful to
be told when I have removed an option that is actually required, such
as `--android-cross-path=path`.)

9 years agomake codemap more robust in face of ill-formed spans.
Felix S. Klock II [Thu, 5 Feb 2015 15:02:22 +0000 (16:02 +0100)]
make codemap more robust in face of ill-formed spans.

This can be considered partial work on #8256.

The main observable change: macro expansion sometimes results in spans
where `lo > hi`; so for now, when we have such a span, do not attempt
to return a snippet result.

(Longer term, we might think about whether we could still present a
snippet for the cases where this arises, e.g. perhaps by showing the
whole macro as the snippet, assuming that is the sole cause of such
spans; or by somehow looking up the closest AST node that holds both
`lo` and `hi`, and showing that.)

As a drive-by, revised the API to return a `Result` rather than an
`Option`, with better information-packed error value that should help
us (and maybe also our users) identify the causes of such problems in
the future.  Ideally the call-sites that really want an actual snippet
would be updated to catch the newly added `Err` case and print
something meaningful about it, but that is not part of this PR.

9 years agoTidy fixes
Brian Anderson [Thu, 5 Feb 2015 22:38:56 +0000 (14:38 -0800)]
Tidy fixes

9 years agoAddress review feedback
Brian Anderson [Fri, 30 Jan 2015 23:08:46 +0000 (15:08 -0800)]
Address review feedback

9 years agomk: Print test summary after tidy when running 'make check'
Brian Anderson [Fri, 30 Jan 2015 22:58:02 +0000 (14:58 -0800)]
mk: Print test summary after tidy when running 'make check'

9 years agotestparser has long lines
Brian Anderson [Fri, 30 Jan 2015 22:57:21 +0000 (14:57 -0800)]
testparser has long lines

9 years agomk: Add version number to output. Useful for logs
Brian Anderson [Sun, 25 Jan 2015 09:48:38 +0000 (01:48 -0800)]
mk: Add version number to output. Useful for logs

9 years agomk: Add tidy commands to 'make tips'
Brian Anderson [Sun, 25 Jan 2015 09:42:02 +0000 (01:42 -0800)]
mk: Add tidy commands to 'make tips'

9 years agomk: Remove redundant valgrind notices in build
Brian Anderson [Sat, 24 Jan 2015 23:53:11 +0000 (15:53 -0800)]
mk: Remove redundant valgrind notices in build

9 years agoClean up tidy scripts, coverage, performance
Brian Anderson [Sat, 24 Jan 2015 23:18:19 +0000 (15:18 -0800)]
Clean up tidy scripts, coverage, performance

This restructures tidy.py to walk the tree itself,
and improves performance considerably by not loading entire
files into buffers for licenseck.

Splits build rules into 'tidy', 'tidy-basic', 'tidy-binaries',
'tidy-errors', 'tidy-features'.

9 years agoPolish errorck and featureck UI
Brian Anderson [Sat, 24 Jan 2015 20:23:06 +0000 (12:23 -0800)]
Polish errorck and featureck UI

9 years agomk: Split tidy into multiple tidy rules
Brian Anderson [Sat, 24 Jan 2015 20:16:06 +0000 (12:16 -0800)]
mk: Split tidy into multiple tidy rules

* tidy - runs all tidy scripts
* tidy-basic - tidy.rs
* tidy-binaries - check-binaries.py
* tidy-errors - errorck.py
* tidy-features - featureck.py

9 years agoFix license
Niko Matsakis [Thu, 5 Feb 2015 22:01:11 +0000 (17:01 -0500)]
Fix license

9 years agoNow that the elaboration mechanism is suppressing defaults, we can remove this overea...
Niko Matsakis [Thu, 5 Feb 2015 21:24:12 +0000 (16:24 -0500)]
Now that the elaboration mechanism is suppressing defaults, we can remove this overeager code that was pruning out ambig where-clause matches in trait selection. cc #21974.

9 years agoAuto merge of #21894 - dotdash:assume_rc, r=alexcrichton
bors [Thu, 5 Feb 2015 21:08:03 +0000 (21:08 +0000)]
Auto merge of #21894 - dotdash:assume_rc, r=alexcrichton

This is half of what @Aatch implemented in #21418. The non-null assumption is later canonicalized to !nonnull metadata and doesn't cause any slowdowns (in fact the build is slightly faster with this change). I left out the other half of #21418 because that still causes a ~16% increase in compile times (30m -> 35m).

9 years agoExtend the solution to encompass HRTB
Niko Matsakis [Thu, 5 Feb 2015 20:50:34 +0000 (15:50 -0500)]
Extend the solution to encompass HRTB

9 years agoMake the lifetime anchor immutable on std::mem::copy_mut_lifetime
Mikhail Zabaluev [Thu, 5 Feb 2015 20:19:11 +0000 (22:19 +0200)]
Make the lifetime anchor immutable on std::mem::copy_mut_lifetime

Only the second reference's mutability is relevant to the mutability
of the returned reference.

9 years agoAuto merge of #21916 - japaric:no-as-slice, r=alexcrichton
bors [Thu, 5 Feb 2015 19:00:13 +0000 (19:00 +0000)]
Auto merge of #21916 - japaric:no-as-slice, r=alexcrichton

r? @alexcrichton
cc @eddyb

9 years agocleanup: replace `as[_mut]_slice()` calls with deref coercions
Jorge Aparicio [Mon, 2 Feb 2015 02:53:25 +0000 (21:53 -0500)]
cleanup: replace `as[_mut]_slice()` calls with deref coercions

9 years agocomplete openbsd support for `std::env`
Sébastien Marie [Thu, 5 Feb 2015 17:56:10 +0000 (18:56 +0100)]
complete openbsd support for `std::env`

- add `std::env:consts`
- deprecating `std::os::consts`
- refactoring errno_location()

9 years agoImplement pretty-printing of `..` and update tests.
Ulrik Sverdrup [Thu, 5 Feb 2015 16:58:30 +0000 (17:58 +0100)]
Implement pretty-printing of `..` and update tests.

Update tests to change all `&expr[]` to `&expr[..]` to make sure pretty printing
passes.

9 years agoWhen elaborating predicates, purge duplicates from the initial vector.
Niko Matsakis [Thu, 5 Feb 2015 16:48:20 +0000 (11:48 -0500)]
When elaborating predicates, purge duplicates from the initial vector.

Fixes #21965.

9 years agoMade external_crates feature work again.
Alexander Light [Thu, 5 Feb 2015 15:51:17 +0000 (10:51 -0500)]
Made external_crates feature work again.

Also added test for it.

Fixes #21928

9 years agounbreak tree for openbsd after #21787
Sébastien Marie [Thu, 5 Feb 2015 14:24:17 +0000 (15:24 +0100)]
unbreak tree for openbsd after #21787

- add `_SC_GETPW_R_SIZE_MAX` constant
- declare `struct passwd`
- convert `load_self` to `current_exe`

Note: OpenBSD don't provide system function to return a valuable Path
for `env::current_exe`. The implementation is currently based on the
value of `argv[0]`, which couldn't be used when executable is called via
PATH.

9 years agoAuto merge of #21843 - japaric:kindless, r=alexcrichton
bors [Thu, 5 Feb 2015 15:22:48 +0000 (15:22 +0000)]
Auto merge of #21843 - japaric:kindless, r=alexcrichton

This needs a snapshot that includes #21805 before it can be merged.

There are some places where type inference regressed after I removed the annotations (see `FIXME`s). cc @nikomatsakis.

r? @eddyb or anyone
(I'll remove the `FIXME`s before merging, as they are only intended to point out regressions)

9 years agoReplace one more slice::from_raw_mut_buf added with new io
Mikhail Zabaluev [Thu, 5 Feb 2015 11:53:32 +0000 (13:53 +0200)]
Replace one more slice::from_raw_mut_buf added with new io

9 years agoReplace usage of slice::from_raw_buf with slice::from_raw_parts
Mikhail Zabaluev [Tue, 3 Feb 2015 23:00:38 +0000 (01:00 +0200)]
Replace usage of slice::from_raw_buf with slice::from_raw_parts

New functions, slice::from_raw_parts and slice::from_raw_parts_mut,
are added to implement the lifetime convention as agreed in RFC PR #556.
The functions slice::from_raw_buf and slice::from_raw_mut_buf are
left deprecated for the time being.

9 years agoRemove unused src/doc/trpl/rust-book.css
Kostas Karachalios [Thu, 5 Feb 2015 10:57:06 +0000 (11:57 +0100)]
Remove unused src/doc/trpl/rust-book.css

9 years agoMake the book chapters printable
Kostas Karachalios [Thu, 5 Feb 2015 09:21:06 +0000 (10:21 +0100)]
Make the book chapters printable

Tested on:
* Safari on OSX
* Firefox on OSX

9 years agoAuto merge of #21944 - alexcrichton:lframework, r=eddyb
bors [Thu, 5 Feb 2015 08:47:48 +0000 (08:47 +0000)]
Auto merge of #21944 - alexcrichton:lframework, r=eddyb

On OSX the linker has a separate framework lookup path which is specified via
the `-F` flag. This adds a new kind of `-L` path recognized by the compiler for
frameworks to be passed through to the linker.

Closes #20259

9 years agoAdd a lint for writing `#[feature]` for stable features, warn by default.
Brian Anderson [Tue, 3 Feb 2015 04:25:42 +0000 (20:25 -0800)]
Add a lint for writing `#[feature]` for stable features, warn by default.

The 'stable_features' lint helps people progress from unstable to
stable Rust by telling them when they no longer need a `feature`
attribute because upstream Rust has declared it stable.

This compares to the existing 'unstable_features', which is used
to implement feature staging, and triggers on *any* use
of `#[feature]`.

9 years agoFix for misspelled comments in tests.
Joseph Crail [Thu, 5 Feb 2015 04:04:10 +0000 (23:04 -0500)]
Fix for misspelled comments in tests.

Just spelling corrections.

9 years agoFix for misspelled comments.
Joseph Crail [Thu, 5 Feb 2015 04:00:02 +0000 (23:00 -0500)]
Fix for misspelled comments.

The spelling corrections were made in both documentation comments and
regular comments.

9 years agoAuto merge of #21152 - steveklabnik:tasks, r=huonw
bors [Thu, 5 Feb 2015 03:11:57 +0000 (03:11 +0000)]
Auto merge of #21152 - steveklabnik:tasks, r=huonw

This moves the "Tasks" chapter to a "Concurrency" one, as it's about threads, but also about how to deal with concurrency issues.

r? @aturon

9 years agoA concurrency chapter to replace the tasks chapter.
Steve Klabnik [Wed, 14 Jan 2015 03:06:52 +0000 (22:06 -0500)]
A concurrency chapter to replace the tasks chapter.

Fixes #18936
Fixes #18938
Fixes #20038
Fixes #8395
Fixes #2080
Fixes #21194

9 years agoregister snapshots
Jorge Aparicio [Wed, 4 Feb 2015 23:22:19 +0000 (18:22 -0500)]
register snapshots