]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRollup merge of #34298 - nrc:save-parent, r=eddyb
Manish Goregaokar [Thu, 16 Jun 2016 23:12:04 +0000 (00:12 +0100)]
Rollup merge of #34298 - nrc:save-parent, r=eddyb

save-analysis: some tweaks

8 years agoAuto merge of #34187 - luser:extern-crate-abspaths, r=michaelwoerister
bors [Thu, 16 Jun 2016 19:13:25 +0000 (12:13 -0700)]
Auto merge of #34187 - luser:extern-crate-abspaths, r=michaelwoerister

Add an abs_path member to FileMap, use it when writing debug info.

Fixes #34179.

When items are inlined from extern crates, the filename in the debug info
is taken from the FileMap that's serialized in the rlib metadata.
Currently this is just FileMap.name, which is whatever path is passed to rustc.
Since libcore and libstd are built by invoking rustc with relative paths,
they wind up with relative paths in the rlib, and when linked into a binary
the debug info uses relative paths for the names, but since the compilation
directory for the final binary, tools trying to read source filenames
will wind up with bad paths. We noticed this in Firefox with source
filenames from libcore/libstd having bad paths.

This change stores an absolute path in FileMap.abs_path, and uses that
if available for writing debug info. This is not going to magically make
debuggers able to find the source, but it will at least provide sensible
paths.

8 years agoAdd an abs_path member to FileMap, use it when writing debug info.
Ted Mielczarek [Thu, 9 Jun 2016 20:36:20 +0000 (16:36 -0400)]
Add an abs_path member to FileMap, use it when writing debug info.

When items are inlined from extern crates, the filename in the debug info
is taken from the FileMap that's serialized in the rlib metadata.
Currently this is just FileMap.name, which is whatever path is passed to rustc.
Since libcore and libstd are built by invoking rustc with relative paths,
they wind up with relative paths in the rlib, and when linked into a binary
the debug info uses relative paths for the names, but since the compilation
directory for the final binary, tools trying to read source filenames
will wind up with bad paths. We noticed this in Firefox with source
filenames from libcore/libstd having bad paths.

This change stores an absolute path in FileMap.abs_path, and uses that
if available for writing debug info. This is not going to magically make
debuggers able to find the source, but it will at least provide sensible
paths.

8 years agoAuto merge of #34296 - dsprenkels:issue-23122-tests, r=alexcrichton
bors [Thu, 16 Jun 2016 16:26:36 +0000 (09:26 -0700)]
Auto merge of #34296 - dsprenkels:issue-23122-tests, r=alexcrichton

Add regression tests for #23122

This PR adds two regression tests for #23122.

Closes #23122.

8 years agoAuto merge of #34239 - jseyfried:fix_macro_use_scope_regression, r=nrc
bors [Thu, 16 Jun 2016 13:37:18 +0000 (06:37 -0700)]
Auto merge of #34239 - jseyfried:fix_macro_use_scope_regression, r=nrc

Revert a change in the scope of macros imported from crates to fix a regression

Fixes #34212.
The regression was caused by #34032, which changed the scope of macros imported from extern crates to match the scope of macros imported from modules.
r? @nrc

8 years agoAuto merge of #34216 - jseyfried:nested_cfg_attr, r=nrc
bors [Thu, 16 Jun 2016 10:49:55 +0000 (03:49 -0700)]
Auto merge of #34216 - jseyfried:nested_cfg_attr, r=nrc

Support nested `cfg_attr` attributes

Support arbitrarily deeply nested `cfg_attr` attributes (e.g. `#[cfg_attr(foo, cfg_attr(bar, baz))]`).
This makes configuration idempotent.

Currently, the nighties do not support any `cfg_attr` nesting. Stable and beta support just one level of `cfg_attr` nesting (expect for attributes on macro-expanded nodes, where no nesting is supported).

This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m { () => {
    #[cfg_attr(all(), cfg_attr(all(), cfg(foo)))]
    fn f() {}
} }
m!();

fn main() { f() } //~ ERROR unresolved name `f`
```
r? @nrc

8 years agosave-analysis: add a decl_id for methods
Nick Cameron [Thu, 16 Jun 2016 10:28:39 +0000 (11:28 +0100)]
save-analysis: add a decl_id for methods

This is non-null if the method is in a (non-inherent) impl and in that case will be the id for the method declaration in the implemented trait.

8 years agoAuto merge of #34290 - arielb1:short-ladder, r=eddyb
bors [Thu, 16 Jun 2016 08:01:26 +0000 (01:01 -0700)]
Auto merge of #34290 - arielb1:short-ladder, r=eddyb

don't generate drop ladder steps for fields that don't need dropping

cc @eddyb

This should help with #34166

8 years agoAdd regression tests for #23122
Daan Sprenkels [Thu, 16 Jun 2016 07:46:25 +0000 (09:46 +0200)]
Add regression tests for #23122

8 years agofix codegen-units fallout
Ariel Ben-Yehuda [Thu, 16 Jun 2016 06:26:44 +0000 (09:26 +0300)]
fix codegen-units fallout

8 years agoAuto merge of #34000 - estebank:missingargs, r=jseyfried
bors [Thu, 16 Jun 2016 05:12:26 +0000 (22:12 -0700)]
Auto merge of #34000 - estebank:missingargs, r=jseyfried

Show types of all args when missing args

When there're missing arguments in a function call, present a list of
all the expected types:

```rust
fn main() {
    t("");
}

fn t(a: &str, x: String) {}
```

```bash
% rustc file.rs
file.rs:3:5: 2:8 error: this function takes 2 parameters but 0
parameters were supplied [E0061]
file.rs:3     t();
              ^~~
file.rs:3:5: 2:8 help: run `rustc --explain E0061` to see a detailed explanation
file.rs:3:5: 2:8 note: the following parameter types were expected: &str, std::string::String
error: aborting due to previous error
```

Fixes #33649

8 years agoAuto merge of #34291 - Manishearth:rollup, r=Manishearth
bors [Thu, 16 Jun 2016 02:25:45 +0000 (19:25 -0700)]
Auto merge of #34291 - Manishearth:rollup, r=Manishearth

Rollup of 4 pull requests

- Successful merges: #34207, #34268, #34270, #34290
- Failed merges:

8 years agoShow types of all args when missing args
Esteban Küber [Wed, 1 Jun 2016 01:23:22 +0000 (18:23 -0700)]
Show types of all args when missing args

When there're missing arguments in a function call, present a list of
all the expected types:

```rust
fn main() {
    t("");
}

fn t(a: &str, x: String) {}
```

```bash
% rustc file.rs
file.rs:3:5: 2:8 error: this function takes 2 parameters but 0
parameters were supplied [E0061]
file.rs:3     t();
              ^~~
file.rs:3:5: 2:8 help: run `rustc --explain E0061` to see a detailed explanation
file.rs:3:5: 2:8 note: the following parameter types were expected: &str, std::string::String
error: aborting due to previous error
```

Fixes #33649

8 years agoRollup merge of #34270 - gkoz:error_file_exists, r=alexcrichton
Manish Goregaokar [Wed, 15 Jun 2016 21:59:20 +0000 (22:59 +0100)]
Rollup merge of #34270 - gkoz:error_file_exists, r=alexcrichton

Add ERROR_FILE_EXISTS to ErrorKind conversion on Windows

Bug report: https://users.rust-lang.org/t/detecting-error-kind-for-opening-file/6215
Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx#error_file_exists

8 years agoRollup merge of #34268 - zackmdavis:if_let_over_none_unit_arm, r=jseyfried
Manish Goregaokar [Wed, 15 Jun 2016 21:59:20 +0000 (22:59 +0100)]
Rollup merge of #34268 - zackmdavis:if_let_over_none_unit_arm, r=jseyfried

prefer `if let` to match with `None => ()` arm in some places

Casual grepping revealed some places in the codebase (some of which
antedated `if let`'s December 2014 stabilization in c200ae5a) where we
were using a match with a `None => ()` arm where (in the present
author's opinion) an `if let` conditional would be more readable. (Other
places where matching to the unit value did seem to better express the
intent were left alone.)

It's likely that we don't care about making such trivial,
non-functional, sheerly æsthetic changes.

But if we do, this is a patch.

8 years agoRollup merge of #34207 - petrochenkov:nohyg, r=jseyfried
Manish Goregaokar [Wed, 15 Jun 2016 21:59:20 +0000 (22:59 +0100)]
Rollup merge of #34207 - petrochenkov:nohyg, r=jseyfried

Remove last traces of identifier hygiene from HIR

https://github.com/rust-lang/rust/pull/34095/commits/e783a0a5e39d5ae2fa147508197d09a51530fae8 removed the [last](https://github.com/rust-lang/rust/pull/33654#discussion_r63415218) [use](https://github.com/rust-lang/rust/pull/33654#discussion_r63416284) of hygiene at post-resolve compilation stages, so we can avoid renaming during lowering to HIR and just keep original names.

r? @nrc

8 years agodon't generate drop ladder steps for fields that don't need dropping
Ariel Ben-Yehuda [Wed, 15 Jun 2016 21:24:31 +0000 (00:24 +0300)]
don't generate drop ladder steps for fields that don't need dropping

8 years agoAuto merge of #34220 - srinivasreddy:rf_cargotest, r=brson
bors [Wed, 15 Jun 2016 20:11:19 +0000 (13:11 -0700)]
Auto merge of #34220 - srinivasreddy:rf_cargotest, r=brson

run rustfmt on cargotest folder in src/tools/cargotest

8 years agoAuto merge of #34218 - srinivasreddy:rf_linkchecker, r=brson
bors [Wed, 15 Jun 2016 17:28:30 +0000 (10:28 -0700)]
Auto merge of #34218 - srinivasreddy:rf_linkchecker, r=brson

run rustfmt on linkchecker folderin src/tools/linkchecker

8 years agoprefer `if let` to match with `None => ()` arm in some places
Zack M. Davis [Tue, 14 Jun 2016 05:43:30 +0000 (22:43 -0700)]
prefer `if let` to match with `None => ()` arm in some places

Casual grepping revealed some places in the codebase (some of which
antedated `if let`'s December 2014 stabilization in c200ae5a) where we
were using a match with a `None => ()` arm where (in the present
author's opinion) an `if let` conditional would be more readable. (Other
places where matching to the unit value did seem to better express the
intent were left alone.)

It's likely that we don't care about making such trivial,
non-functional, sheerly æsthetic changes.

But if we do, this is a patch.

8 years agoAuto merge of #33300 - seanmonstar:map-entry-take, r=alexcrichton
bors [Wed, 15 Jun 2016 14:37:27 +0000 (07:37 -0700)]
Auto merge of #33300 - seanmonstar:map-entry-take, r=alexcrichton

Map::Entry methods to recover key and value together

See https://github.com/rust-lang/rust/issues/32281#issuecomment-213066344

8 years agoMap::Entry::take() method to recover key and value together
Sean McArthur [Tue, 14 Jun 2016 12:22:41 +0000 (05:22 -0700)]
Map::Entry::take() method to recover key and value together

8 years agoAuto merge of #34180 - durka:patch-24, r=brson
bors [Wed, 15 Jun 2016 11:48:29 +0000 (04:48 -0700)]
Auto merge of #34180 - durka:patch-24, r=brson

derive Hash (and not Copy) for ranges

Fixes #34170.

Also, `RangeInclusive` was `Copy` by mistake -- fix that, which is a [breaking-change] to that unstable type.

8 years agoFix a docs typo
Gleb Kozyrev [Tue, 14 Jun 2016 16:47:05 +0000 (19:47 +0300)]
Fix a docs typo

8 years agoTest ErrorKind::AlreadyExists for files
Gleb Kozyrev [Tue, 14 Jun 2016 16:45:42 +0000 (19:45 +0300)]
Test ErrorKind::AlreadyExists for files

8 years agoAuto merge of #34263 - ollie27:docs_ip, r=alexcrichton
bors [Wed, 15 Jun 2016 03:36:31 +0000 (20:36 -0700)]
Auto merge of #34263 - ollie27:docs_ip, r=alexcrichton

Improve IP reserved address docs

- Add links to all RFCs to make it clear these are not Rust RFCs.
- Correct RFC numbers to match the numbers in [RFC 6890](https://tools.ietf.org/html/rfc6890)
- Clean up formatting to show addresses and ranges in parentheses like (255.255.255.255)

r? @steveklabnik

8 years agoAuto merge of #34245 - ollie27:rustdoc_redirect_rename, r=alexcrichton
bors [Wed, 15 Jun 2016 00:11:05 +0000 (17:11 -0700)]
Auto merge of #34245 - ollie27:rustdoc_redirect_rename, r=alexcrichton

rustdoc: Fix redirect pages for renamed reexports

We need to use the name of the target not the name of the current item
when creating the link.

An example in `std` is [`std::sys::ext`](https://doc.rust-lang.org/nightly/std/sys/ext/index.html).

8 years agoAuto merge of #34221 - srinivasreddy:rm_redundant, r=alexcrichton
bors [Tue, 14 Jun 2016 20:42:28 +0000 (13:42 -0700)]
Auto merge of #34221 - srinivasreddy:rm_redundant, r=alexcrichton

remove redundant test case in bitvector.rs

`bitvec_iter_works_2` does exactly same as `bitvec_iter_works_1`, so i removed it.

8 years agoAuto merge of #34234 - GuillaumeGomez:bad_inlining, r=steveklabnik
bors [Tue, 14 Jun 2016 14:49:56 +0000 (07:49 -0700)]
Auto merge of #34234 - GuillaumeGomez:bad_inlining, r=steveklabnik

Fix invalid inlining

r? @steveklabnik

So to put a context. @nox found an issue on the generated doc:

![screenshot from 2016-06-11 19-53-38](https://cloud.githubusercontent.com/assets/3050060/15987898/f7341de0-303b-11e6-9cd7-f2a6df423ee7.png)

So as you can see, the two variants are on the same where they shouldn't. I found out that the issue is also on structs:

![screenshot from 2016-06-11 19-53-31](https://cloud.githubusercontent.com/assets/3050060/15987900/0f66c5de-303c-11e6-90fc-5e49d11b6903.png)

And so such is the result of the PR:

![screenshot from 2016-06-12 01-15-21](https://cloud.githubusercontent.com/assets/3050060/15987904/19d9183c-303c-11e6-91c1-7c3f1163fbb0.png)
![screenshot from 2016-06-12 01-15-24](https://cloud.githubusercontent.com/assets/3050060/15987905/1b5d2db0-303c-11e6-8f43-9a8ad2371007.png)

8 years agorustdoc: Fix redirect pages for renamed reexports
Oliver Middleton [Sun, 12 Jun 2016 17:27:17 +0000 (18:27 +0100)]
rustdoc: Fix redirect pages for renamed reexports

We need to use the name of the target not the name of the current item
when creating the link.

8 years agoAuto merge of #34232 - ollie27:rustdoc_inline, r=alexcrichton
bors [Tue, 14 Jun 2016 12:04:38 +0000 (05:04 -0700)]
Auto merge of #34232 - ollie27:rustdoc_inline, r=alexcrichton

rustdoc: Don't inline #[doc(hidden)] pub use

Currently if a `#[doc(hidden)] pub use` item is inlined the `hidden`
attribute is ignored so the item can appear in the docs. By never inlining
such imports, they can be stripped.

An example in `std` is [`__OsLocalKeyInner`](https://doc.rust-lang.org/nightly/std/thread/struct.__OsLocalKeyInner.html) which clearly should not be documented.

8 years agoAdd ERROR_FILE_EXISTS to ErrorKind conversion on Windows
Gleb Kozyrev [Tue, 14 Jun 2016 09:04:24 +0000 (12:04 +0300)]
Add ERROR_FILE_EXISTS to ErrorKind conversion on Windows

Bug report:
https://users.rust-lang.org/t/detecting-error-kind-for-opening-file/6215
Reference:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx#error_file_exists

8 years agoAuto merge of #34266 - liigo:patch-8, r=Manishearth
bors [Tue, 14 Jun 2016 07:24:33 +0000 (00:24 -0700)]
Auto merge of #34266 - liigo:patch-8, r=Manishearth

reference: link to proper ffi attributes

8 years agoAuto merge of #33749 - jseyfried:fix_call_site_span, r=nrc
bors [Tue, 14 Jun 2016 04:07:30 +0000 (21:07 -0700)]
Auto merge of #33749 - jseyfried:fix_call_site_span, r=nrc

Fix macro call site spans

Fix macro call site spans.
r? @nrc

8 years agoreference: link to proper ffi attributes
Liigo Zhuang [Tue, 14 Jun 2016 02:50:48 +0000 (10:50 +0800)]
reference: link to proper ffi attributes

8 years agoAuto merge of #34262 - dsprenkels:enum_pattern_resolve_ice, r=eddyb
bors [Tue, 14 Jun 2016 01:26:30 +0000 (18:26 -0700)]
Auto merge of #34262 - dsprenkels:enum_pattern_resolve_ice, r=eddyb

Add regression test for #33293

This PR adds a regression test for #33293.

Closes #33293.
r? @eddyb

8 years agoReplace `println!("");` invocations with calls to a dummy function in debuginfo test
Jeffrey Seyfried [Sat, 28 May 2016 08:30:08 +0000 (01:30 -0700)]
Replace `println!("");` invocations with calls to a dummy function in debuginfo test

8 years agoImprove IP reserved address docs
Oliver Middleton [Mon, 13 Jun 2016 22:49:04 +0000 (23:49 +0100)]
Improve IP reserved address docs

- Add links to all RFCs to make it clear these are not Rust RFCs.
- Correct RFC numbers to match the numbers in [RFC 6890](https://tools.ietf.org/html/rfc6890)
- Clean up formatting to show addresses and ranges in parentheses like (255.255.255.255)

8 years agoAuto merge of #34243 - c3st7n:add_test_issue_issue_23477, r=nagisa
bors [Mon, 13 Jun 2016 22:44:17 +0000 (15:44 -0700)]
Auto merge of #34243 - c3st7n:add_test_issue_issue_23477, r=nagisa

Add test case for issue #23477

My first pull request, any feedback welcome.

Fixes #23477

8 years agoCorrect broken test
Chris Tomlinson [Mon, 13 Jun 2016 21:27:13 +0000 (22:27 +0100)]
Correct broken test

8 years agoAdd regression test for #33293
Daan Sprenkels [Mon, 13 Jun 2016 20:59:36 +0000 (22:59 +0200)]
Add regression test for #33293

8 years agoAuto merge of #34259 - fbergr:master, r=GuillaumeGomez
bors [Mon, 13 Jun 2016 19:51:42 +0000 (12:51 -0700)]
Auto merge of #34259 - fbergr:master, r=GuillaumeGomez

doc: Fix typo

8 years agodoc: Fix typo
Florian Berger [Mon, 13 Jun 2016 18:35:37 +0000 (21:35 +0300)]
doc: Fix typo

8 years agoAuto merge of #34242 - zackmdavis:explain_E0453, r=GuillaumeGomez
bors [Mon, 13 Jun 2016 14:38:40 +0000 (07:38 -0700)]
Auto merge of #34242 - zackmdavis:explain_E0453, r=GuillaumeGomez

add long explanation for E0453, lint attribute overruled by outer forbid

This is a subtask of #32777.

-----

r? @GuillaumeGomez

8 years agoAuto merge of #34252 - dsprenkels:issue-32364-test, r=eddyb
bors [Mon, 13 Jun 2016 09:31:29 +0000 (02:31 -0700)]
Auto merge of #34252 - dsprenkels:issue-32364-test, r=eddyb

Add regression test for #32364

This PR adds a regression test for #32364.

r? @eddyb

8 years agoAuto merge of #34247 - petevine:patch-1, r=steveklabnik
bors [Mon, 13 Jun 2016 06:37:07 +0000 (23:37 -0700)]
Auto merge of #34247 - petevine:patch-1, r=steveklabnik

Remove stray word

Another `with` is redundant here.

8 years agoedit E0453 long explanation for style, clarity, and citizenship
Zack M. Davis [Mon, 13 Jun 2016 03:55:36 +0000 (20:55 -0700)]
edit E0453 long explanation for style, clarity, and citizenship

It turns out that the subsequent lines of the error message comment
should be aligned like this.

The "turns the corresponding compiler warning" language may not be
strictly the most accurate—a lint check isn't the same as a compiler
warning; it emits a compiler warning if it's set to the `warn` level—
but it may be worth glossing over such distinctions in favor of simple,
familar phrasings for the sake of pedagogy; thanks to Guillaume Gomez
for the wording suggestion.

Let's also fix up the introductory clauses of the sentences about how to
fix the error to put a little more emphasis on the fact that the
`forbid` setting was probably there for a reason.

8 years agoAuto merge of #34226 - srinivasreddy:tuple_slice_cleanup, r=alexcrichton
bors [Mon, 13 Jun 2016 03:49:37 +0000 (20:49 -0700)]
Auto merge of #34226 - srinivasreddy:tuple_slice_cleanup, r=alexcrichton

Add additional test cases to test all arities of tuple; And remove type suffix - i32 on integers

8 years agoRemove stray word
petevine [Sun, 12 Jun 2016 23:05:32 +0000 (01:05 +0200)]
Remove stray word

8 years agoAdd regression test for #32364
Daan Sprenkels [Sun, 12 Jun 2016 18:59:49 +0000 (20:59 +0200)]
Add regression test for #32364

8 years agoAuto merge of #34133 - m-decoster:master, r=GuillaumeGomez
bors [Sun, 12 Jun 2016 22:35:32 +0000 (15:35 -0700)]
Auto merge of #34133 - m-decoster:master, r=GuillaumeGomez

Add explanations for E0503 and E0508.

(cannot use `..` because it was mutably borrowed, cannot move out of type `..`, a non-copy fixed-size array)

Part of #32777.

8 years agoAdd test case for issue 23477
Chris Tomlinson [Sun, 12 Jun 2016 20:45:48 +0000 (21:45 +0100)]
Add test case for issue 23477

8 years agoadd long explanation for E0453, lint attribute overruled by outer forbid
Zack M. Davis [Sun, 12 Jun 2016 19:57:05 +0000 (12:57 -0700)]
add long explanation for E0453, lint attribute overruled by outer forbid

This is a subtask of #32777.

8 years agoAuto merge of #34241 - dsprenkels:issue-32031-test, r=eddyb
bors [Sun, 12 Jun 2016 19:48:57 +0000 (12:48 -0700)]
Auto merge of #34241 - dsprenkels:issue-32031-test, r=eddyb

add a test case for issue #32031

I propose a test case to finish the fix for issue #32031. Please review this commit thoroughly, as I have never written a codegen test before.

r? @eddyb

8 years agoadd a test case for issue #32031
Daan Sprenkels [Sun, 12 Jun 2016 15:34:35 +0000 (17:34 +0200)]
add a test case for issue #32031

8 years agoAuto merge of #34045 - ollie27:rustdoc_stripped, r=brson
bors [Sun, 12 Jun 2016 13:05:55 +0000 (06:05 -0700)]
Auto merge of #34045 - ollie27:rustdoc_stripped, r=brson

rustdoc: Don't generate empty files for stripped items

We need to traverse stripped modules to generate redirect pages, but we shouldn't generate
anything else for them.

This now renders the file contents to a Vec before writing it to a file in one go. I think
that's probably a better strategy anyway.

Fixes: #34025
8 years agoAuto merge of #34161 - kennytm:fix-E0277-format, r=GuillaumeGomez
bors [Sun, 12 Jun 2016 10:11:36 +0000 (03:11 -0700)]
Auto merge of #34161 - kennytm:fix-E0277-format, r=GuillaumeGomez

Fix markdown formatting error of E0277, E0310 and E0502.

Fix bad format we see in https://doc.rust-lang.org/nightly/error-index.html#E0277.

8 years agoAdd explanation for E0503
Mathieu De Coster [Sun, 12 Jun 2016 08:32:55 +0000 (10:32 +0200)]
Add explanation for E0503

8 years agoAdd explanation for E0508
Mathieu De Coster [Sun, 12 Jun 2016 08:31:54 +0000 (10:31 +0200)]
Add explanation for E0508

8 years agoFix markdown formatting error of E0277, E0284, E0310, E0502.
kennytm [Sun, 12 Jun 2016 08:09:07 +0000 (16:09 +0800)]
Fix markdown formatting error of E0277, E0284, E0310, E0502.

8 years agoAuto merge of #34238 - jpreiss:master, r=steveklabnik
bors [Sun, 12 Jun 2016 07:05:47 +0000 (00:05 -0700)]
Auto merge of #34238 - jpreiss:master, r=steveklabnik

fix typo in primitive-types section on slices

8 years agoAdd regression test
Jeffrey Seyfried [Sun, 12 Jun 2016 04:24:51 +0000 (04:24 +0000)]
Add regression test

8 years agoLoad macros from `#[macro_use]` crates earlier in expansion
Jeffrey Seyfried [Sun, 12 Jun 2016 01:50:52 +0000 (01:50 +0000)]
Load macros from `#[macro_use]` crates earlier in expansion

8 years agoImplement `Into<Vec<T>>` for `SmallVector<T>`
Jeffrey Seyfried [Sun, 12 Jun 2016 01:49:58 +0000 (01:49 +0000)]
Implement `Into<Vec<T>>` for `SmallVector<T>`

8 years agoAdd method `visit_with` to `MacroGenerable`
Jeffrey Seyfried [Sat, 11 Jun 2016 22:59:33 +0000 (22:59 +0000)]
Add method `visit_with` to `MacroGenerable`

8 years agotypo fix in loops.md
James Alan Preiss [Sun, 12 Jun 2016 03:46:23 +0000 (20:46 -0700)]
typo fix in loops.md

8 years agofix typo in primitive-types section on slices
James Alan Preiss [Sun, 12 Jun 2016 03:31:01 +0000 (20:31 -0700)]
fix typo in primitive-types section on slices

8 years agoAuto merge of #34132 - AtheMathmo:no-stdlib, r=steveklabnik
bors [Sun, 12 Jun 2016 02:57:47 +0000 (19:57 -0700)]
Auto merge of #34132 - AtheMathmo:no-stdlib, r=steveklabnik

Note warning of default features on libc

The default features of libc include libstd. This should be noted on this page.

8 years agoFix invalid inlining
Guillaume Gomez [Sat, 11 Jun 2016 23:15:33 +0000 (01:15 +0200)]
Fix invalid inlining

8 years agorustdoc: Don't inline #[doc(hidden)] pub use
Oliver Middleton [Tue, 7 Jun 2016 00:20:12 +0000 (01:20 +0100)]
rustdoc: Don't inline #[doc(hidden)] pub use

Currently if a `#[doc(hidden)] pub use` item is inlined the `hidden`
attribute is ignored so the item can appear in the docs. By never inlining
such imports, they can be stripped.

8 years agoAuto merge of #34201 - sanxiyn:check-error-index, r=nagisa
bors [Sat, 11 Jun 2016 20:17:44 +0000 (13:17 -0700)]
Auto merge of #34201 - sanxiyn:check-error-index, r=nagisa

Check error index in `make check`

This was checked in rustbuild but not in `make check`, causing passed-Travis-but-failed-Buildbot.

8 years agoadd fixme about duplicated errors
Alex Burka [Sat, 11 Jun 2016 19:51:04 +0000 (15:51 -0400)]
add fixme about duplicated errors

8 years agoAdd additional test cases to test all arities of tuple; And remove type suffix -...
Srinivas Reddy Thatiparthy [Sat, 11 Jun 2016 16:58:17 +0000 (22:28 +0530)]
Add additional test cases to test all arities of tuple; And remove type suffix - i32 on integers

8 years agoAuto merge of #34153 - apasel422:btree, r=alexcrichton
bors [Sat, 11 Jun 2016 15:52:22 +0000 (08:52 -0700)]
Auto merge of #34153 - apasel422:btree, r=alexcrichton

Update tracking issue for `{BTreeMap, BTreeSet}::{append, split_off}`

r? @alexcrichton

8 years agoremove redundant test case
Srinivas Reddy Thatiparthy [Sat, 11 Jun 2016 15:29:58 +0000 (20:59 +0530)]
remove redundant test case

8 years agorun rustfmt on cargotest folder in src/tools/cargotest
Srinivas Reddy Thatiparthy [Sat, 11 Jun 2016 13:35:31 +0000 (19:05 +0530)]
run rustfmt on cargotest folder in src/tools/cargotest

8 years agorun rustfmt on linkchecker folderin src/tools/linkchecker
Srinivas Reddy Thatiparthy [Sat, 11 Jun 2016 13:34:28 +0000 (19:04 +0530)]
run rustfmt on linkchecker folderin src/tools/linkchecker

8 years agoAuto merge of #34211 - srinivasreddy:rf_libstd_coll, r=brson
bors [Sat, 11 Jun 2016 11:23:49 +0000 (04:23 -0700)]
Auto merge of #34211 - srinivasreddy:rf_libstd_coll, r=brson

run rustfmt on libstd/collections/hash folder

8 years agosave-analysis: some refinements to JSON data
Nick Cameron [Sat, 11 Jun 2016 10:23:57 +0000 (12:23 +0200)]
save-analysis: some refinements to JSON data

Split variable and function kinds to give more information. Give children for methods, structs, enums, and traits.

8 years agoAuto merge of #34208 - shepmaster:llvm-3.7-linking-intrinsics, r=alexcrichton
bors [Sat, 11 Jun 2016 08:32:44 +0000 (01:32 -0700)]
Auto merge of #34208 - shepmaster:llvm-3.7-linking-intrinsics, r=alexcrichton

Remove linking and intrinsics code made dead by only supporting LLVM 3.7 and up

This is mostly based on Alex's throwaway comment:

> probably reject those that LLVM just doesn't support...

So I'm more than happy to adjust the PR based on how you thought this should look. Also happy to split it into two PRs, one for linking and one for intrinsics.

r? @alexcrichton

/cc @nagisa @brson

8 years agoAuto merge of #34002 - jseyfried:strip_tests_in_cfg, r=nrc
bors [Sat, 11 Jun 2016 05:41:24 +0000 (22:41 -0700)]
Auto merge of #34002 - jseyfried:strip_tests_in_cfg, r=nrc

Treat `#[test]` like `#[cfg(test)]` in non-test builds

This PR treats `#[test]` like `#[cfg(test)]` in non-test builds. In particular, like `#[cfg(test)]`,
 - `#[test]` nodes are stripped during `cfg` processing, and
 - `#[test]` is disallowed on non-optional expressions.

Closes #33946.
r? @nrc

8 years agoSupport nested `cfg_attr` attributes
Jeffrey Seyfried [Sat, 11 Jun 2016 04:58:15 +0000 (04:58 +0000)]
Support nested `cfg_attr` attributes

8 years agoRefactor away the `CfgFolder` trait.
Jeffrey Seyfried [Wed, 1 Jun 2016 02:13:45 +0000 (02:13 +0000)]
Refactor away the `CfgFolder` trait.

8 years agoForbid `#[test]` attributes on non-optional expressions.
Jeffrey Seyfried [Wed, 1 Jun 2016 02:13:11 +0000 (02:13 +0000)]
Forbid `#[test]` attributes on non-optional expressions.

8 years agoStrip `#[test]` nodes during `cfg` processing on non-test builds.
Jeffrey Seyfried [Wed, 1 Jun 2016 01:27:12 +0000 (01:27 +0000)]
Strip `#[test]` nodes during `cfg` processing on non-test builds.

8 years agoAuto merge of #34174 - shepmaster:16-bit-mir, r=Aatch
bors [Sat, 11 Jun 2016 02:50:42 +0000 (19:50 -0700)]
Auto merge of #34174 - shepmaster:16-bit-mir, r=Aatch

Support 16-bit pointers in MIR

8 years agoAuto merge of #34172 - jseyfried:avoid_configuring_interpolated_ast, r=alexcrichton
bors [Fri, 10 Jun 2016 23:55:30 +0000 (16:55 -0700)]
Auto merge of #34172 - jseyfried:avoid_configuring_interpolated_ast, r=alexcrichton

Fix ICE regression caused by configuring interpolated AST

Fixes #34171.
r? @nrc

8 years agorun rustfmt on libstd/collections/hash folder
Srinivas Reddy Thatiparthy [Fri, 10 Jun 2016 23:42:14 +0000 (05:12 +0530)]
run rustfmt on libstd/collections/hash folder

8 years agoAll intrinsics are available in all supported LLVM versions
Jake Goulding [Fri, 10 Jun 2016 21:37:46 +0000 (17:37 -0400)]
All intrinsics are available in all supported LLVM versions

8 years agoRemove linking with AR
Jake Goulding [Fri, 10 Jun 2016 21:27:19 +0000 (17:27 -0400)]
Remove linking with AR

Since we only support LLVM 3.7 and above, we will never need to use the
AR linker. Remove the possibility of calling it and all the now-dead
code.

8 years agoUpdate tracking issue for `{BTreeMap, BTreeSet}::{append, split_off}`
Andrew Paseltiner [Tue, 7 Jun 2016 21:36:04 +0000 (17:36 -0400)]
Update tracking issue for `{BTreeMap, BTreeSet}::{append, split_off}`

8 years agoRemove last traces of identifier hygiene from HIR
Vadim Petrochenkov [Fri, 10 Jun 2016 21:12:39 +0000 (00:12 +0300)]
Remove last traces of identifier hygiene from HIR

8 years agoAuto merge of #34199 - jseyfried:visit_all_attrs, r=nrc
bors [Fri, 10 Jun 2016 17:37:35 +0000 (10:37 -0700)]
Auto merge of #34199 - jseyfried:visit_all_attrs, r=nrc

Visit statement and expression attributes in the AST visitor

Currently, these attributes are not visited, so they are not gated feature checked in the post expansion visitor. This only affects crates using `#![feature(stmt_expr_attributes)]`.
r? @nrc

8 years agoAllow truncating constants to 16-bit u/isize
Jake Goulding [Thu, 9 Jun 2016 21:01:05 +0000 (17:01 -0400)]
Allow truncating constants to 16-bit u/isize

8 years agoAuto merge of #34200 - sanxiyn:rollup, r=sanxiyn
bors [Fri, 10 Jun 2016 14:43:52 +0000 (07:43 -0700)]
Auto merge of #34200 - sanxiyn:rollup, r=sanxiyn

Rollup of 12 pull requests

- Successful merges: #34088, #34129, #34136, #34145, #34146, #34148, #34159, #34160, #34165, #34175, #34184, #34185
- Failed merges:

8 years agoCheck error index in `make check`
Seo Sanghyeon [Fri, 10 Jun 2016 13:06:40 +0000 (22:06 +0900)]
Check error index in `make check`

8 years agoRollup merge of #34185 - tshepang:shorten-paragraph, r=steveklabnik
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:46 +0000 (21:16 +0900)]
Rollup merge of #34185 - tshepang:shorten-paragraph, r=steveklabnik

doc: intro should be 1 sentence

Also, do not repeat name of type

8 years agoRollup merge of #34184 - euclio:patch-1, r=steveklabnik
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:46 +0000 (21:16 +0900)]
Rollup merge of #34184 - euclio:patch-1, r=steveklabnik

fix indentation in README

8 years agoRollup merge of #34175 - rwz:patch-2, r=alexcrichton
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:46 +0000 (21:16 +0900)]
Rollup merge of #34175 - rwz:patch-2, r=alexcrichton

Fix BTreeMap example typo

The whole example is made around movies reviews, but that one line says "review some books".

8 years agoRollup merge of #34165 - ollie27:docs_char_case, r=steveklabnik
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:46 +0000 (21:16 +0900)]
Rollup merge of #34165 - ollie27:docs_char_case, r=steveklabnik

docs: Improve char::to_{lower,upper}case examples

Collect the results to a String to make it clear that it will not always
return only one char and add examples showing that.

r? @steveklabnik