]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoallow for the future addition of a close method on File
Jack O'Connor [Wed, 1 Jun 2016 14:16:45 +0000 (10:16 -0400)]
allow for the future addition of a close method on File

8 years agodocument that Files close themselves automatically
Jack O'Connor [Tue, 31 May 2016 21:12:08 +0000 (17:12 -0400)]
document that Files close themselves automatically

8 years agoAuto merge of #33960 - tbu-:pr_ref_clone_overflow, r=Aatch
bors [Tue, 31 May 2016 06:09:00 +0000 (23:09 -0700)]
Auto merge of #33960 - tbu-:pr_ref_clone_overflow, r=Aatch

Prevent the borrow counter from overflowing in `Ref::clone`

Fixes #33880.

8 years agoAuto merge of #33968 - srinivasreddy:slice.rs, r=Manishearth
bors [Mon, 30 May 2016 23:34:34 +0000 (16:34 -0700)]
Auto merge of #33968 - srinivasreddy:slice.rs, r=Manishearth

Correct grammar; and remove redundant comment

8 years agoAuto merge of #33909 - michaelwoerister:frame-pointer-fix, r=nikomatsakis
bors [Mon, 30 May 2016 18:01:55 +0000 (11:01 -0700)]
Auto merge of #33909 - michaelwoerister:frame-pointer-fix, r=nikomatsakis

Emit "no-frame-pointer-elim" attribute for closures, shims, and glue.

This will hopefully let `perf` give better backtraces.
r? @nikomatsakis

8 years agoCorrect grammar; and remove redundant comment
Srinivas Reddy Thatiparthy [Mon, 30 May 2016 17:05:41 +0000 (22:35 +0530)]
Correct grammar; and remove redundant comment

8 years agoAuto merge of #33965 - Manishearth:rollup, r=Manishearth
bors [Mon, 30 May 2016 15:13:08 +0000 (08:13 -0700)]
Auto merge of #33965 - Manishearth:rollup, r=Manishearth

Rollup of 5 pull requests

- Successful merges: #33867, #33926, #33942, #33958, #33964
- Failed merges:

8 years agoRollup merge of #33964 - Ms2ger:refcell-resolutions, r=Manishearth
Manish Goregaokar [Mon, 30 May 2016 15:05:47 +0000 (20:35 +0530)]
Rollup merge of #33964 - Ms2ger:refcell-resolutions, r=Manishearth

Move driver::Resolutions::def_map out of its RefCell.

8 years agoRollup merge of #33958 - kennytm:patch-1, r=GuillaumeGomez
Manish Goregaokar [Mon, 30 May 2016 15:05:47 +0000 (20:35 +0530)]
Rollup merge of #33958 - kennytm:patch-1, r=GuillaumeGomez

Use Path::is_dir() in fs::read_dir()'s example.

Basically reverts #25508. The `is_dir()` function has been stable since 1.5.0.

8 years agoRollup merge of #33942 - srinivasreddy:rustfmt_llvm_folder, r=nrc
Manish Goregaokar [Mon, 30 May 2016 15:05:46 +0000 (20:35 +0530)]
Rollup merge of #33942 - srinivasreddy:rustfmt_llvm_folder, r=nrc

run rustfmt on librustc_llvm folder

8 years agoRollup merge of #33926 - jseyfried:fix_derive_span, r=nrc
Manish Goregaokar [Mon, 30 May 2016 15:05:46 +0000 (20:35 +0530)]
Rollup merge of #33926 - jseyfried:fix_derive_span, r=nrc

Fix the span of generated `#[derive_*]` attributes

Fixes #33571.
r? @nrc

8 years agoRollup merge of #33867 - oli-obk:rustdoc_variant_types, r=GuillaumeGomez
Manish Goregaokar [Mon, 30 May 2016 15:05:46 +0000 (20:35 +0530)]
Rollup merge of #33867 - oli-obk:rustdoc_variant_types, r=GuillaumeGomez

print enum variant fields in docs

Right now we are repeating enum variants at the top, because the fields aren't shown with the actual docs. It's very annoying to have to scroll up and down to have both docs and field info. For struct variants we already list the fields.

enum docs look like this after this PR:

![screenshot from 2016-05-25 14-02-42](https://cloud.githubusercontent.com/assets/332036/15539231/84b018cc-2281-11e6-9666-1063655931f4.png)

There are degenerate cases for enum tuple variants with lots of fields:

![screenshot from 2016-05-25 14-01-00](https://cloud.githubusercontent.com/assets/332036/15539260/91e537ca-2281-11e6-8bf1-a3d6b2e78f65.png)

I was thinking that we could move the docs below the variant (slightly indented) or list the variant fields vertically instead of horizontally

r? @steveklabnik

8 years agoprint enum variant fields in docs
Oliver Schneider [Fri, 27 May 2016 10:04:56 +0000 (12:04 +0200)]
print enum variant fields in docs

8 years agoMove driver::Resolutions::def_map out of its RefCell.
Ms2ger [Mon, 30 May 2016 13:17:16 +0000 (15:17 +0200)]
Move driver::Resolutions::def_map out of its RefCell.

8 years agoAuto merge of #33959 - Manishearth:rollup, r=Manishearth
bors [Mon, 30 May 2016 09:54:00 +0000 (02:54 -0700)]
Auto merge of #33959 - Manishearth:rollup, r=Manishearth

Rollup of 8 pull requests

- Successful merges: #33793, #33893, #33912, #33913, #33914, #33917, #33937, #33938
- Failed merges:

8 years agoRollup merge of #33938 - srinivasreddy:rustfmt_libunwind, r=Manishearth
Manish Goregaokar [Mon, 30 May 2016 09:49:01 +0000 (15:19 +0530)]
Rollup merge of #33938 - srinivasreddy:rustfmt_libunwind, r=Manishearth

run rustfmt on libunwind

8 years agoRollup merge of #33937 - srinivasreddy:rustfmt_librand, r=GuillaumeGomez
Manish Goregaokar [Mon, 30 May 2016 09:49:01 +0000 (15:19 +0530)]
Rollup merge of #33937 - srinivasreddy:rustfmt_librand, r=GuillaumeGomez

run rustfmt on librand folder

8 years agoRollup merge of #33917 - srinivasreddy:rustfmt_liballoc, r=GuillaumeGomez
Manish Goregaokar [Mon, 30 May 2016 09:49:00 +0000 (15:19 +0530)]
Rollup merge of #33917 - srinivasreddy:rustfmt_liballoc, r=GuillaumeGomez

rustfmt liballoc folder

8 years agoRollup merge of #33914 - GuillaumeGomez:improve_err_expl, r=GuillaumeGomez
Manish Goregaokar [Mon, 30 May 2016 09:49:00 +0000 (15:19 +0530)]
Rollup merge of #33914 - GuillaumeGomez:improve_err_expl, r=GuillaumeGomez

Improve err expl

r? @steveklabnik

8 years agoRollup merge of #33913 - GuillaumeGomez:improve_e0133, r=GuillaumeGomez
Manish Goregaokar [Mon, 30 May 2016 09:49:00 +0000 (15:19 +0530)]
Rollup merge of #33913 - GuillaumeGomez:improve_e0133, r=GuillaumeGomez

Improve E0133 error explanation

r? @steveklabnik

8 years agoRollup merge of #33912 - GuillaumeGomez:improve_E0132, r=steveklabnik
Manish Goregaokar [Mon, 30 May 2016 09:49:00 +0000 (15:19 +0530)]
Rollup merge of #33912 - GuillaumeGomez:improve_E0132, r=steveklabnik

Improve E0132 error explanation

r? @steveklabnik

8 years agoRollup merge of #33893 - Ophirr33:docs_string_split_fix, r=GuillaumeGomez
Manish Goregaokar [Mon, 30 May 2016 09:49:00 +0000 (15:19 +0530)]
Rollup merge of #33893 - Ophirr33:docs_string_split_fix, r=GuillaumeGomez

Added examples/docs to split in str.rs

Added documentation clarifying the behavior of split when used with the empty string and contiguous separators. Addresses issue [33882](https://github.com/rust-lang/rust/issues/33882). This is my first time contributing to rust, so forgive me if I'm skipping any of the contribution steps.
Fixes #33882

8 years agoRollup merge of #33793 - GuillaumeGomez:compile_fail, r=GuillaumeGomez
Manish Goregaokar [Mon, 30 May 2016 09:48:59 +0000 (15:18 +0530)]
Rollup merge of #33793 - GuillaumeGomez:compile_fail, r=GuillaumeGomez

Fix compile_fail tag

Fixes #33780

r? @steveklabnik

8 years agoUse Path::is_dir() in fs::read_dir()'s example.
kennytm [Mon, 30 May 2016 09:12:01 +0000 (17:12 +0800)]
Use Path::is_dir() in fs::read_dir()'s example.

Basically reverts #25508. The `is_dir()` function has been stable since 1.5.0.

8 years agoPrevent the borrow counter from overflowing in `Ref::clone`
Tobias Bucher [Mon, 30 May 2016 07:53:09 +0000 (09:53 +0200)]
Prevent the borrow counter from overflowing in `Ref::clone`

Fixes #33880.

8 years agoAuto merge of #33929 - petrochenkov:pathir, r=eddyb
bors [Mon, 30 May 2016 04:28:50 +0000 (21:28 -0700)]
Auto merge of #33929 - petrochenkov:pathir, r=eddyb

Separate bindings from other patterns in HIR

Now when name resolution is done on AST, we can avoid dumping everything that looks like an identifier into `PatKind::Ident` in HIR.
`hir::PatKind::Ident` is removed, fresh bindings are now called `hir::PatKind::Binding`, everything else goes to `hir::PatKind::Path`.

I intend to do something with `PatKind::Path`/`PatKind::QPath` as well using resolution results, but it requires some audit and maybe some deeper refactoring of relevant resolution/type checking code to do it properly.
I'm submitting this part of the patch earlier to notify interested parties that I'm working on this.

cc @jseyfried
r? @eddyb

8 years agoAuto merge of #33860 - doomrobo:fix-grammar-verification, r=nagisa
bors [Sun, 29 May 2016 23:43:09 +0000 (16:43 -0700)]
Auto merge of #33860 - doomrobo:fix-grammar-verification, r=nagisa

antlr grammar verification script now compiles under latest nightly

This is kind of a moving target, since none of libsyntax is stable, but at least this compiles for the time being.

8 years agoImprove E0161 error explanation
Guillaume Gomez [Fri, 27 May 2016 20:05:10 +0000 (22:05 +0200)]
Improve E0161 error explanation

8 years agoAuto merge of #33859 - nrc:save-field-sub, r=pnkfelix
bors [Sun, 29 May 2016 18:23:00 +0000 (11:23 -0700)]
Auto merge of #33859 - nrc:save-field-sub, r=pnkfelix

save-analysis: be a bit more defensive with field sub-expressions

Prevents an ice with `(...).f` since the sub-expression is in the AST but not the HIR.

We could actually do better in this specific case, but it doesn't seem worth it.

8 years agoAuto merge of #33902 - flo-l:fix-save-temps, r=dotdash
bors [Sun, 29 May 2016 14:01:51 +0000 (07:01 -0700)]
Auto merge of #33902 - flo-l:fix-save-temps, r=dotdash

save-temps was moved under the -C switch

I stumbled across this..

8 years agoAuto merge of #33934 - Byron:libsyntex-ring-buffer-size, r=pnkfelix
bors [Sun, 29 May 2016 10:02:46 +0000 (03:02 -0700)]
Auto merge of #33934 - Byron:libsyntex-ring-buffer-size, r=pnkfelix

Prevent overflows by increasing ring buffer size

Please note that this change is just done to prevent
issues as currently seen by syntex_syntax in future.
See https://github.com/serde-rs/syntex/pull/47 for details.

As shown in https://github.com/serde-rs/syntex/issues/33,
complex code can easily overflow the ring-buffer and
cause an assertion error.

8 years agorun rustfmt on librustc_llvm folder
Srinivas Reddy Thatiparthy [Sun, 29 May 2016 09:27:34 +0000 (14:57 +0530)]
run rustfmt on librustc_llvm folder

8 years agorun rustfmt on libunwind
Srinivas Reddy Thatiparthy [Sun, 29 May 2016 03:17:51 +0000 (08:47 +0530)]
run rustfmt on libunwind

8 years agorun rustfmt on librand folder
Srinivas Reddy Thatiparthy [Sun, 29 May 2016 03:10:34 +0000 (08:40 +0530)]
run rustfmt on librand folder

8 years agoAuto merge of #33848 - alexcrichton:android-gdb-sysroot, r=michaelwoerister
bors [Sun, 29 May 2016 02:19:27 +0000 (19:19 -0700)]
Auto merge of #33848 - alexcrichton:android-gdb-sysroot, r=michaelwoerister

test: Use `set sysroot` for more NDK compatibility

Recent versions of the Android NDK no longer ship debuggers like
`arm-linux-androideabi-gdb`, but instead one prebuilt binary `gdb`. We can
symlink this into place at least to get our detection still working, but it now
needs to be told what the sysroot is so it can correctly do... something. Long
story short, tests didn't pass with this change and after this change they pass.

8 years agoAuto merge of #33825 - alexcrichton:fix-beta, r=aturon
bors [Sat, 28 May 2016 23:21:53 +0000 (16:21 -0700)]
Auto merge of #33825 - alexcrichton:fix-beta, r=aturon

mk: Fix bootstrapping cross-hosts on beta

The beta builds are currently failing, unfortunately, due to what is presumably
some odd behavior with our makefiles. The wrong bootstrap key is being used to
generate the stage1 cross-compiled libraries, which fails the build.
Interestingly enough if the targets are directly specified as part of the build
then it works just fine! Just a bare `make` fails...

Instead of trying to understand what's happening in the makefiles instead just
tweak how we configure the bootstrap key in a way that's more likely to work.

8 years agoAuto merge of #33824 - alexcrichton:rustbuild-fix-local-rust, r=nikomatsakis
bors [Sat, 28 May 2016 20:24:51 +0000 (13:24 -0700)]
Auto merge of #33824 - alexcrichton:rustbuild-fix-local-rust, r=nikomatsakis

rustbuild: Add support for --enable-local-rust

This commit adds support for the `--enable-local-rust` `./configure` switch
which uses the locally installed `rustc` to bootstrap the compiler.

8 years agoPrevent overflows by increasing ring buffer size
Sebastian Thiel [Sat, 28 May 2016 15:29:59 +0000 (17:29 +0200)]
Prevent overflows by increasing ring buffer size

Please note that this change is just done to prevent
issues as currently seen by syntex_syntax in future.
See https://github.com/serde-rs/syntex/pull/47 for details.

As shown in https://github.com/serde-rs/syntex/issues/33,
complex code can easily overflow the ring-buffer and
cause an assertion error.

8 years agoAuto merge of #33821 - sanxiyn:cfg-test, r=nikomatsakis
bors [Sat, 28 May 2016 17:24:01 +0000 (10:24 -0700)]
Auto merge of #33821 - sanxiyn:cfg-test, r=nikomatsakis

Do not inject test harness for --cfg test

Fix #33670.

8 years agoAddress review comments
Vadim Petrochenkov [Sun, 6 Mar 2016 12:54:44 +0000 (15:54 +0300)]
Address review comments

8 years agoRefactor away some functions from hir::pat_util
Vadim Petrochenkov [Sun, 6 Mar 2016 12:54:44 +0000 (15:54 +0300)]
Refactor away some functions from hir::pat_util

8 years agoAuto merge of #33927 - Manishearth:rollup, r=Manishearth
bors [Sat, 28 May 2016 14:22:51 +0000 (07:22 -0700)]
Auto merge of #33927 - Manishearth:rollup, r=Manishearth

Rollup of 15 pull requests

- Successful merges: #33820, #33821, #33822, #33824, #33825, #33831, #33832, #33848, #33849, #33852, #33854, #33856, #33859, #33860, #33861
- Failed merges:

8 years agoRollup merge of #33856 - GuillaumeGomez:fmt_error, r=alexcrichton
Manish Goregaokar [Sat, 28 May 2016 14:22:16 +0000 (19:52 +0530)]
Rollup merge of #33856 - GuillaumeGomez:fmt_error, r=alexcrichton

Implement Error trait for fmt::Error type

Fixes #33827.

r? @alexcrichton

Just one last thing: I added a feature name, but don't hesitate to ask me to change it if you think it doesn't fit well.

8 years agoRollup merge of #33854 - petrochenkov:prefvis, r=eddyb
Manish Goregaokar [Sat, 28 May 2016 14:22:16 +0000 (19:52 +0530)]
Rollup merge of #33854 - petrochenkov:prefvis, r=eddyb

Apply visit_path to import prefixes by default

Overriding `visit_path` is not enough to visit all paths, some import prefixes are not visited and `visit_path_list_item` need to be overridden as well. This PR removes this catch, it should be less error prone this way. Also, the prefix is visited once now, not repeatedly for each path list item.

r? @eddyb

8 years agoRollup merge of #33852 - arielb1:autoderef-iterator, r=eddyb
Manish Goregaokar [Sat, 28 May 2016 14:22:16 +0000 (19:52 +0530)]
Rollup merge of #33852 - arielb1:autoderef-iterator, r=eddyb

refactor autoderef to avoid prematurely registering obligations

Refactor `FnCtxt::autoderef` to use an external iterator and to not
register any obligation from the main autoderef loop, but rather to
register them after (and if) the loop successfully completes.

Fixes #24819
Fixes #25801
Fixes #27631
Fixes #31258
Fixes #31964
Fixes #32320
Fixes #33515
Fixes #33755

r? @eddyb

8 years agoRollup merge of #33849 - ranma42:escape-iters-count, r=alexcrichton
Manish Goregaokar [Sat, 28 May 2016 14:22:16 +0000 (19:52 +0530)]
Rollup merge of #33849 - ranma42:escape-iters-count, r=alexcrichton

Implement `count` for `EscapeUnicode`

and cleanup the code for `count` for `EscapeDefault` (instead of repeating the `match` for `size_hint` and `count`).

This PR marks EscapeUnicode and EscapeDefault as ExactSizeIterator. The constraints for the trait implementations held even before this PR, but I am not sure if this is something we want to guarantee/expose (I would love feedback on this, especially on what would be the appropriate way to handle stabilisation, if needed).

Part of #24214, split from #31049.

The test for `count` was added in #33103.

8 years agoRollup merge of #33832 - alexcrichton:android-memalign, r=luqmana
Manish Goregaokar [Sat, 28 May 2016 14:22:16 +0000 (19:52 +0530)]
Rollup merge of #33832 - alexcrichton:android-memalign, r=luqmana

std: Use memalign, not posix_memalign, on Android

We've gotten requests to move our Android support as far back as API level 9
where unfortunately the `posix_memalign` API wasn't implemented yet. Thankfully,
however, the `memalign` API was and it appears to be usable with `free` on the
Android platform (see comments included in commit).

This should help fix some of the last few test failures when compiling against
API level 9.

8 years agoRollup merge of #33831 - diwic:patch-1, r=aturon
Manish Goregaokar [Sat, 28 May 2016 14:22:16 +0000 (19:52 +0530)]
Rollup merge of #33831 - diwic:patch-1, r=aturon

panic.rs: fix docs (recover -> catch_unwind)

The current docs are a bit inconsistent. First, change all references of "recover" to "catch_unwind" because the function was renamed. Second, consistently use the term "unwind safe" instead of "panic safe", "exception safe" and "recover safe" (all these terms were used previously).

8 years agoRollup merge of #33822 - soltanmm:dot-vec-div-mag-square, r=nikomatsakis
Manish Goregaokar [Sat, 28 May 2016 14:22:15 +0000 (19:52 +0530)]
Rollup merge of #33822 - soltanmm:dot-vec-div-mag-square, r=nikomatsakis

Propagate obligations through projection

Up next: generating region obligations in inference.

r? @nikomatsakis

8 years agoRollup merge of #33820 - jonathandturner:format_readability_updates, r=nikomatsakis
Manish Goregaokar [Sat, 28 May 2016 14:22:15 +0000 (19:52 +0530)]
Rollup merge of #33820 - jonathandturner:format_readability_updates, r=nikomatsakis

Increase spacing in error format for readability.

Two small tweaks that seem to help readability quite a bit:
* Add spacing header<->snippet, but use the |> on the side for visual consistency
* Fix #33819
* Fix #33763
* Move format-sensitive test (issue-26480 in cfail) to ui test

r? @nikomatsakis

8 years agoUse the span of `#[derive_Eq]` for `#[structural_match]`
Jeffrey Seyfried [Sat, 28 May 2016 11:58:45 +0000 (11:58 +0000)]
Use the span of `#[derive_Eq]` for `#[structural_match]`

8 years agoAuto merge of #33818 - alexcrichton:bump, r=nikomatsakis
bors [Sat, 28 May 2016 08:59:04 +0000 (01:59 -0700)]
Auto merge of #33818 - alexcrichton:bump, r=nikomatsakis

mk: Bump version number

The 1.10 betas are now under way so we're now working on the 1.11 release.

8 years agoAdd test
Jeffrey Seyfried [Mon, 23 May 2016 10:16:49 +0000 (10:16 +0000)]
Add test

8 years agoRefactor away `set_expn_info`
Jeffrey Seyfried [Mon, 23 May 2016 08:54:37 +0000 (08:54 +0000)]
Refactor away `set_expn_info`

8 years agoFix spans of generated `#[derive_*]` attributes
Jeffrey Seyfried [Mon, 23 May 2016 06:27:43 +0000 (06:27 +0000)]
Fix spans of generated `#[derive_*]` attributes

8 years agoAuto merge of #33800 - nrc:save-fn-name, r=eddyb
bors [Sat, 28 May 2016 03:45:46 +0000 (20:45 -0700)]
Auto merge of #33800 - nrc:save-fn-name, r=eddyb

save-analysis: use a function's short name

8 years agoAuto merge of #33706 - jseyfried:refactor_cfg, r=nrc
bors [Sat, 28 May 2016 00:46:14 +0000 (17:46 -0700)]
Auto merge of #33706 - jseyfried:refactor_cfg, r=nrc

Perform `cfg` attribute processing during macro expansion and fix bugs

This PR refactors `cfg` attribute processing and fixes bugs. More specifically:
 - It merges gated feature checking for stmt/expr attributes, `cfg_attr` processing, and `cfg` processing into a single fold.
  - This allows feature gated `cfg` variables to be used in `cfg_attr` on unconfigured items. All other feature gated attributes can already be used on unconfigured items.
 - It performs `cfg` attribute processing during macro expansion instead of after expansion so that macro-expanded items are configured the same as ordinary items. In particular, to match their non-expanded counterparts,
  - macro-expanded unconfigured macro invocations are no longer expanded,
  - macro-expanded unconfigured macro definitions are no longer usable, and
  - feature gated `cfg` variables on macro-expanded macro definitions/invocations are now errors.

This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m {
    () => {
        #[cfg(attr)]
        macro_rules! foo { () => {} }
        foo!(); // This will be an error

        macro_rules! bar { () => { fn f() {} } }
        #[cfg(attr)] bar!(); // This will no longer be expanded ...
        fn g() { f(); } // ... so that `f` will be unresolved.

        #[cfg(target_thread_local)] // This will be a gated feature error
        macro_rules! baz { () => {} }
    }
}

m!();
```

r? @nrc

8 years agoComment methods in `CfgFolder`
Jeffrey Seyfried [Tue, 24 May 2016 05:15:07 +0000 (05:15 +0000)]
Comment methods in `CfgFolder`

8 years agoTest that unconfigured macro-expanded macro invocations are not expanded.
Jeffrey Seyfried [Wed, 18 May 2016 02:02:04 +0000 (02:02 +0000)]
Test that unconfigured macro-expanded macro invocations are not expanded.

8 years agoSeparate bindings from other patterns in HIR
Vadim Petrochenkov [Sun, 6 Mar 2016 12:54:44 +0000 (15:54 +0300)]
Separate bindings from other patterns in HIR

8 years agoAdded examples/docs to split in str.rs
Ty Coghlan [Thu, 26 May 2016 22:17:30 +0000 (18:17 -0400)]
Added examples/docs to split in str.rs

Added documentation clarifying the behavior of split when used with the empty string and contiguous separators.

8 years agoAuto merge of #33798 - locallycompact:lc/misleading-intentation, r=alexcrichton
bors [Fri, 27 May 2016 21:49:10 +0000 (14:49 -0700)]
Auto merge of #33798 - locallycompact:lc/misleading-intentation, r=alexcrichton

Fix misleading intentation errors on gcc 6.0

Currently building with latest gcc results in the following error:

    compile: x86_64-unknown-linux-gnu/rt/miniz.o
    /home/lc/rust/src/rt/miniz.c: In function ‘tinfl_decompress’:
    /home/lc/rust/src/rt/miniz.c:578:9: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
             for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8;
             ^~~
    /home/lc/rust/src/rt/miniz.c:578:47: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
             for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8;
                                                   ^~~
    /home/lc/rust/src/rt/miniz.c: In function ‘tdefl_find_match’:
    /home/lc/rust/src/rt/miniz.c:1396:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
         if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
         ^~
    /home/lc/rust/src/rt/miniz.c:1396:23: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
                           ^

This patch stops this.

8 years agorustfmt liballoc folder
Srinivas Reddy Thatiparthy [Fri, 27 May 2016 20:55:16 +0000 (02:25 +0530)]
rustfmt liballoc folder

8 years agoimprove E0152 error explanation
Guillaume Gomez [Fri, 27 May 2016 19:57:06 +0000 (21:57 +0200)]
improve E0152 error explanation

8 years agoImprove E0133 error explanation
Guillaume Gomez [Fri, 27 May 2016 19:36:40 +0000 (21:36 +0200)]
Improve E0133 error explanation

8 years agoImprove E0138 error explanation
Guillaume Gomez [Fri, 27 May 2016 19:47:59 +0000 (21:47 +0200)]
Improve E0138 error explanation

8 years agoImprove E0137 error explanatIon
Guillaume Gomez [Fri, 27 May 2016 19:45:15 +0000 (21:45 +0200)]
Improve E0137 error explanatIon

8 years agoImprove E0132 error explanation
Guillaume Gomez [Fri, 27 May 2016 19:16:58 +0000 (21:16 +0200)]
Improve E0132 error explanation

8 years agoAuto merge of #33795 - srinivasreddy:lib_coll_test, r=nrc
bors [Fri, 27 May 2016 18:51:53 +0000 (11:51 -0700)]
Auto merge of #33795 - srinivasreddy:lib_coll_test, r=nrc

run rustfmt on libcollections test module

8 years agoEmit "no-frame-pointer-elim" attribute for closures, shims, and glue.
Michael Woerister [Fri, 27 May 2016 17:27:56 +0000 (13:27 -0400)]
Emit "no-frame-pointer-elim" attribute for closures, shims, and glue.

8 years agoAuto merge of #33900 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Fri, 27 May 2016 10:56:19 +0000 (03:56 -0700)]
Auto merge of #33900 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 10 pull requests

- Successful merges: #33753, #33815, #33829, #33858, #33865, #33866, #33870, #33874, #33891, #33898
- Failed merges:

8 years agosave-temps was moved under the -C switch
flo-l [Fri, 27 May 2016 09:01:27 +0000 (11:01 +0200)]
save-temps was moved under the -C switch

8 years agoRollup merge of #33898 - srinivasreddy:rustfmt_liblog, r=Manishearth
Guillaume Gomez [Fri, 27 May 2016 08:50:05 +0000 (10:50 +0200)]
Rollup merge of #33898 - srinivasreddy:rustfmt_liblog, r=Manishearth

rustfmt on liblog

8 years agoRollup merge of #33891 - polachok:faster-ipv4-cmp, r=bluss
Guillaume Gomez [Fri, 27 May 2016 08:50:05 +0000 (10:50 +0200)]
Rollup merge of #33891 - polachok:faster-ipv4-cmp, r=bluss

Make Ipv4Addr cmp() faster

Closes #33885

8 years agoRollup merge of #33874 - Byron:patch-1, r=alexcrichton
Guillaume Gomez [Fri, 27 May 2016 08:50:05 +0000 (10:50 +0200)]
Rollup merge of #33874 - Byron:patch-1, r=alexcrichton

Add `make tips` as useful make target

By accident, I found the `make tips` target, which helped me to gain more insight on how to work with the system more quickly.

8 years agoRollup merge of #33870 - jseyfried:ice-issue-33569, r=pnkfelix
Guillaume Gomez [Fri, 27 May 2016 08:50:04 +0000 (10:50 +0200)]
Rollup merge of #33870 - jseyfried:ice-issue-33569, r=pnkfelix

Fix ICE on parsing a bad metavariable in a macro definition

Fixes #33569, fixes #33728.
r? @pnkfelix

8 years agoRollup merge of #33866 - GuillaumeGomez:err-codes, r=jonathandturner
Guillaume Gomez [Fri, 27 May 2016 08:50:04 +0000 (10:50 +0200)]
Rollup merge of #33866 - GuillaumeGomez:err-codes, r=jonathandturner

Add new error code tests

r? @steveklabnik

8 years agoRollup merge of #33865 - GuillaumeGomez:E0084, r=jonathandturner
Guillaume Gomez [Fri, 27 May 2016 08:50:03 +0000 (10:50 +0200)]
Rollup merge of #33865 - GuillaumeGomez:E0084, r=jonathandturner

Improve E0084 error explanation

r? @Manishearth

cc @steveklabnik

8 years agoRollup merge of #33858 - liigo:patch-7, r=GuillaumeGomez
Guillaume Gomez [Fri, 27 May 2016 08:50:03 +0000 (10:50 +0200)]
Rollup merge of #33858 - liigo:patch-7, r=GuillaumeGomez

Point out the clone operation in summary line docs of `Vec::extend_from_slice`

8 years agoRollup merge of #33829 - GuillaumeGomez:stability-css, r=steveklabnik
Guillaume Gomez [Fri, 27 May 2016 08:50:03 +0000 (10:50 +0200)]
Rollup merge of #33829 - GuillaumeGomez:stability-css, r=steveklabnik

Fix invalid background color in stability elements

r? @steveklabnik

8 years agoRollup merge of #33815 - carols10cents:trait-documentation-clarifications, r=steveklabnik
Guillaume Gomez [Fri, 27 May 2016 08:50:03 +0000 (10:50 +0200)]
Rollup merge of #33815 - carols10cents:trait-documentation-clarifications, r=steveklabnik

Trait documentation clarifications

Hi! I've felt a bit of friction lately in figuring out how to write custom implementations of the `derive`able traits, so I decided to add to the docs :)

The docs for `Copy` are already excellent-- clear, useful sections that I only reordered a bit-- they're now:

* General explanation
* When can my type be `Copy`?
* When can my type _not_ be `Copy`?
* When should my type be `Copy`?
* Derivable
* How can I implement `Copy`?

I didn't add all these sections for all the traits, but I did make sure all the derivable traits had a consistent "Derivable" section that explained what the derived implementation does and a "How can I implement" section that has an example.

Please check me for correctness-- I tried to do research to make sure I was saying accurate things but I'm still learning! ❤️ I'd also love suggestions on information to add that is still missing-- I think these traits are important and deserve to have awesome docs!

8 years agoRollup merge of #33753 - mmatyas:armtestfix, r=alexcrichton
Guillaume Gomez [Fri, 27 May 2016 08:50:02 +0000 (10:50 +0200)]
Rollup merge of #33753 - mmatyas:armtestfix, r=alexcrichton

Fix `asm-misplaced-option` on ARM/AArch64

This fixes rust-lang/rust#33737. Of course, since we don't run `make check` for ARM cross builds, you probably won't notice it.

8 years agoAuto merge of #33864 - Manishearth:breaking-batch, r=Manishearth
bors [Fri, 27 May 2016 05:46:08 +0000 (22:46 -0700)]
Auto merge of #33864 - Manishearth:breaking-batch, r=Manishearth

Batch up libsyntax breaking changes

cc https://github.com/rust-lang/rust/issues/31645

8 years agoRollup merge of #33839 - kamalmarhubi:codemape-get-filemap-option, r=nmatsakis
Manish Goregaokar [Fri, 27 May 2016 04:32:45 +0000 (10:02 +0530)]
Rollup merge of #33839 - kamalmarhubi:codemape-get-filemap-option, r=nmatsakis

 This is more idiomatic, putting the caller in charge of whether or not
to panic.

8 years agoRollup merge of #33644 - petrochenkov:selfast, r=nrc
Manish Goregaokar [Fri, 27 May 2016 04:27:11 +0000 (09:57 +0530)]
Rollup merge of #33644 - petrochenkov:selfast, r=nrc

 The AST part of https://github.com/rust-lang/rust/pull/33505.
https://github.com/rust-lang/rust/pull/33505 isn't landed yet, so this PR is based on top of it.

r? @nrc

plugin-[breaking-change] cc #31645 @Manishearth

8 years agoRollup merge of #33639 - petrochenkov:dotdot, r=nmatsakis
Manish Goregaokar [Fri, 27 May 2016 04:27:00 +0000 (09:57 +0530)]
Rollup merge of #33639 - petrochenkov:dotdot, r=nmatsakis

 cc https://github.com/rust-lang/rust/issues/33627
r? @nikomatsakis

plugin-[breaking-change] cc https://github.com/rust-lang/rust/issues/31645 @Manishearth

8 years agoRollup merge of #33351 - birkenfeld:loop-label-spans, r=pnkfelix
Manish Goregaokar [Fri, 27 May 2016 04:26:47 +0000 (09:56 +0530)]
Rollup merge of #33351 - birkenfeld:loop-label-spans, r=pnkfelix

 This makes the \"shadowing labels\" warning *not* print the entire loop as a span, but only the lifetime.

Also makes #31719 go away, but does not fix its root cause (the span of the expanded loop is still wonky, but not used anymore).

8 years agorustfmt on liblog
Srinivas Reddy Thatiparthy [Fri, 27 May 2016 02:36:17 +0000 (08:06 +0530)]
rustfmt on liblog

8 years agoRefactor `expand_expr`
Jeffrey Seyfried [Thu, 26 May 2016 23:48:45 +0000 (23:48 +0000)]
Refactor `expand_expr`

8 years agoStrip unconfigured items during macro expansion
Jeffrey Seyfried [Mon, 16 May 2016 10:09:23 +0000 (10:09 +0000)]
Strip unconfigured items during macro expansion

8 years agoUpdate spans' `expn_id` during the marking fold
Jeffrey Seyfried [Tue, 17 May 2016 21:20:09 +0000 (21:20 +0000)]
Update spans' `expn_id` during the marking fold

8 years agoTest that a feature gated cfg variable in a `cfg_attr` on an unconfigured item is...
Jeffrey Seyfried [Wed, 18 May 2016 01:50:29 +0000 (01:50 +0000)]
Test that a feature gated cfg variable in a `cfg_attr` on an unconfigured item is allowed

8 years agoProcess `cfg_attr` attributes on non-optional expressions
Jeffrey Seyfried [Thu, 26 May 2016 23:56:25 +0000 (23:56 +0000)]
Process `cfg_attr` attributes on non-optional expressions

8 years agoMove cfg_attr processing and stmt/expr attribute gated feature checking into `StripUn...
Jeffrey Seyfried [Mon, 16 May 2016 04:42:57 +0000 (04:42 +0000)]
Move cfg_attr processing and stmt/expr attribute gated feature checking into `StripUnconfigured`

8 years agoImplement `CfgFolder` directly instead of passing a closure to `strip_items`
Jeffrey Seyfried [Sun, 15 May 2016 09:22:58 +0000 (09:22 +0000)]
Implement `CfgFolder` directly instead of passing a closure to `strip_items`

8 years agoRefactor `CfgFolder::in_cfg` -> `CfgFolder::configure`
Jeffrey Seyfried [Mon, 16 May 2016 02:42:24 +0000 (02:42 +0000)]
Refactor `CfgFolder::in_cfg` -> `CfgFolder::configure`

8 years agoIntroduce `CfgFolder` trait
Jeffrey Seyfried [Sun, 15 May 2016 09:15:02 +0000 (09:15 +0000)]
Introduce `CfgFolder` trait

8 years agoRefactor the `syntax::config::fold_*` functions into methods
Jeffrey Seyfried [Sun, 15 May 2016 02:34:32 +0000 (02:34 +0000)]
Refactor the `syntax::config::fold_*` functions into methods

8 years agoAdd and use `HasAttrs` trait
Jeffrey Seyfried [Wed, 18 May 2016 07:25:44 +0000 (07:25 +0000)]
Add and use `HasAttrs` trait

8 years ago* Fix compile_fail tag (in some cases, it compiled whereas it wasn't expected to...
Guillaume Gomez [Sun, 22 May 2016 17:00:20 +0000 (19:00 +0200)]
* Fix compile_fail tag (in some cases, it compiled whereas it wasn't expected to and was still considered 'ok')
* Fix error explanations tests/tags