Commit Graph

54526 Commits

Author SHA1 Message Date
Manish Goregaokar
d84993b054 Rollup merge of #34207 - petrochenkov:nohyg, r=jseyfried
Remove last traces of identifier hygiene from HIR

e783a0a5e3 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
2016-06-16 01:39:43 +01:00
Oliver Middleton
195fc5a325 rustdoc: Add stability notices to impl items
Also fixes missing stability notices on methods with no docs.
2016-06-15 23:56:24 +01:00
Ariel Ben-Yehuda
2960bc8246 don't generate drop ladder steps for fields that don't need dropping 2016-06-16 00:48:02 +03:00
Alex Burka
b54afbee1f include list of characters 2016-06-15 16:42:36 -04:00
Alex Burka
523dbfc312 update reference for #29734 2016-06-15 16:35:03 -04:00
bors
bb4a79b087 Auto merge of #34220 - srinivasreddy:rf_cargotest, r=brson
run rustfmt on cargotest folder in src/tools/cargotest
2016-06-15 13:11:19 -07:00
bors
5755936a63 Auto merge of #34218 - srinivasreddy:rf_linkchecker, r=brson
run rustfmt on linkchecker folderin src/tools/linkchecker
2016-06-15 10:28:30 -07:00
Zack M. Davis
8531d58104 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.
2016-06-15 08:13:10 -07:00
bors
9b06d2ad33 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
2016-06-15 07:37:27 -07:00
Sean McArthur
217a964027 Map::Entry::take() method to recover key and value together 2016-06-15 05:45:50 -07:00
bors
a94881563c 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.
2016-06-15 04:48:29 -07:00
Gleb Kozyrev
552afd30d0 Fix a docs typo 2016-06-15 13:06:48 +03:00
Gleb Kozyrev
1db97575cc Test ErrorKind::AlreadyExists for files 2016-06-15 13:05:43 +03:00
bors
c5f3706c0d 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
2016-06-14 20:36:31 -07:00
bors
1a942f60f0 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).
2016-06-14 17:11:05 -07:00
bors
6b4511755c 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.
2016-06-14 13:42:28 -07:00
bors
be8bd82268 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)
2016-06-14 07:49:56 -07:00
Oliver Middleton
0c742d263c 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.
2016-06-14 15:24:06 +01:00
Ulrik Sverdrup
5df05c6e22 specialize zip: Use associated type for specialized zip struct data
The associated type must be 'static to avoid dropck related errors.
2016-06-14 15:51:49 +02:00
Ulrik Sverdrup
85cd49fc39 specialize zip: Add benchmarks 2016-06-14 15:51:49 +02:00
Ulrik Sverdrup
c2ef20fd38 specialize zip: Add codegen test 2016-06-14 15:51:49 +02:00
Ulrik Sverdrup
13f8f40961 specialize zip: TrustedRandomAccess for Enumerate 2016-06-14 15:51:49 +02:00
Ulrik Sverdrup
515c4d3c1e specialize zip: TrustedRandomAccess for Zip 2016-06-14 15:51:49 +02:00
Ulrik Sverdrup
a8f2e9b359 specialize zip: Specialize .zip() for TrustedRandomAccess iterators
This allows common iterator compositions like a.zip(b) where a, b
are slice::{Iter, IterMut} compile to *much* better code.
2016-06-14 15:51:49 +02:00
Ulrik Sverdrup
592eaa5bb3 specialize zip: Implement TrustedRandomAccess for slice iterators 2016-06-14 15:51:49 +02:00
Ulrik Sverdrup
f8d2fdf02b specialize zip: Introduce TrustedRandomAccess trait 2016-06-14 15:50:49 +02:00
bors
2940eb54bd 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.
2016-06-14 05:04:38 -07:00
Gleb Kozyrev
5db9424de3 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
2016-06-14 12:10:42 +03:00
Jeffrey Seyfried
0644aba0b3 Remove the type parameter from syntax::visit::Visitor 2016-06-14 07:40:32 +00:00
Jeffrey Seyfried
683e480ffe Refactor away WithAttrs trait 2016-06-14 07:40:30 +00:00
Jeffrey Seyfried
5bf7970ac7 Change fold_tt and fold_tts to take token trees by value (instead of by reference) 2016-06-14 07:40:18 +00:00
Jeffrey Seyfried
febe6a46f6 Refactor away field ctxt of ast::Mac_ 2016-06-14 07:39:33 +00:00
Jeffrey Seyfried
01a0877a73 Remove inherent method attrs() on AST nodes. attrs() is now a method of trait HasAttrs. 2016-06-14 07:39:32 +00:00
bors
1af8f3e362 Auto merge of #34266 - liigo:patch-8, r=Manishearth
reference: link to proper ffi attributes
2016-06-14 00:24:33 -07:00
bors
bf84f4e171 Auto merge of #33749 - jseyfried:fix_call_site_span, r=nrc
Fix macro call site spans

Fix macro call site spans.
r? @nrc
2016-06-13 21:07:30 -07:00
Liigo Zhuang
4dcebd2fa9 reference: link to proper ffi attributes 2016-06-14 10:50:48 +08:00
bors
6551acc8e5 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
2016-06-13 18:26:30 -07:00
Jeffrey Seyfried
2477341d05 Replace println!(""); invocations with calls to a dummy function in debuginfo test 2016-06-13 22:57:08 +00:00
Oliver Middleton
61043fd3c1 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)
2016-06-13 23:49:04 +01:00
bors
ab0b87458f 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
2016-06-13 15:44:17 -07:00
Chris Tomlinson
d991b1f624 Correct broken test 2016-06-13 22:27:13 +01:00
Daan Sprenkels
297742e3b8 Add regression test for #33293 2016-06-13 23:24:29 +02:00
Joseph Dunne
dc3d878e0f Add support for macro expansion inside trait items 2016-06-13 21:46:43 +01:00
bors
2e8156cfba Auto merge of #34259 - fbergr:master, r=GuillaumeGomez
doc: Fix typo
2016-06-13 12:51:42 -07:00
Florian Berger
4e0fd65d96 doc: Fix typo 2016-06-13 21:35:37 +03:00
bors
c0df44708e 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
2016-06-13 07:38:40 -07:00
bors
5e3136def7 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
2016-06-13 02:31:29 -07:00
bors
931424444a Auto merge of #34247 - petevine:patch-1, r=steveklabnik
Remove stray word

Another `with` is redundant here.
2016-06-12 23:37:07 -07:00
Zack M. Davis
e4c566ccef 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.
2016-06-12 21:14:30 -07:00
bors
6b40b74af5 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
2016-06-12 20:49:37 -07:00