Commit graph

95168 commits

Author SHA1 Message Date
varkor
51b2ecf78a Tidy warn on ignored line length when lines are not too long 2019-04-23 11:42:14 +01:00
varkor
33f0a3765d Look specifically for comments containing tidy ignore directives 2019-04-23 11:42:14 +01:00
Corentin Henry
cddb838043 std::net: tests for Ipv4addr::is_shared() 2019-04-23 12:01:41 +02:00
bors
31f5d69ba4 Auto merge of #60125 - estebank:continue-evaluating, r=oli-obk
Don't stop evaluating due to errors before borrow checking

r? @oli-obk

Fix #60005. Follow up to #59903. Blocked on #53708, fixing the ICE in `src/test/ui/consts/match_ice.rs`.
2019-04-23 09:38:34 +00:00
Loo Maclin
b1c829b637
Improve miri's error reporting in check_in_alloc 2019-04-23 12:12:16 +03:00
Corentin Henry
fe718ef07f std::net: add warning in Ipv4addr::is_reserved() documentation
See @the8472 comment's on Github:
https://github.com/rust-lang/rust/pull/60145#issuecomment-485424229

> I don't think is_reserved including ranges marked for future use is
> a good idea since those future uses may be realized at at some point
> and then old software with is_reserved filters may have false
> positives. This is not a hypothetical concern, such issues have been
> encountered before when IANA assigned previously reserved /8 address
> blocks.
2019-04-23 10:41:25 +02:00
Corentin Henry
634dcd00b4 std::net: add warning in Ipv6Addr::is_unicast_site_local() doc
site-local addresses are deprecated, so we should warn users about it.
2019-04-23 10:38:26 +02:00
gnzlbg
2d401fb4dc Add f16c target_feature 2019-04-23 08:43:13 +02:00
bors
0f11354a9c Auto merge of #60172 - varkor:tidy-double-trailing-newline, r=kennytm
Disallow double trailing newlines in tidy

This wasn't done previously in https://github.com/rust-lang/rust/pull/47064#issuecomment-354533010 as it affected too many files, but I think it's best to fix it now so that the number of files with double trailing newlines doesn't keep increasing.

r? kennytm
2019-04-23 06:40:12 +00:00
bors
3bee49f42b Auto merge of #60121 - davazp:fix-sync-all-macos, r=KodrAus
Fix sync_all on macos/ios

`sync_all` should flush all metadata in macos/ios, so it should call `fcntl` with the `F_FULLFSYNC` flag as `sync_data` does.

Note that without this `sync_data` performs more flushes than `sync_all` on macos/ios.
2019-04-23 03:34:21 +00:00
bors
0550766699 Auto merge of #60140 - euclio:pulldown-cmark, r=GuillaumeGomez
upgrade rustdoc's pulldown-cmark to 0.4.1

Fixes #59194.
2019-04-23 00:44:58 +00:00
LooMaclin
fc7ffa670c Improve miri's error reporting in check_in_alloc 2019-04-23 03:15:27 +03:00
Xavier Denis
4a073dda93 Fix #58270, fix off-by-one error in error diagnostics. 2019-04-22 18:14:45 -05:00
Esteban Küber
e3fb331695 Temporarily accept [i|u][32|size] suffixes on a tuple index and warn 2019-04-22 16:02:53 -07:00
Jakub Kądziołka
7af0fccc88
Reexport IntErrorKind in std 2019-04-23 00:15:43 +02:00
Tyler Mandry
b2c0fd0876 Remove redundant code in copy_clone_conditions
This was left over from when closure copy and clone were gated behind
feature flags.
2019-04-22 14:52:38 -07:00
Aleksey Kladov
b83ea7f917 reduce visibility 2019-04-23 00:51:38 +03:00
bors
004c549a73 Auto merge of #60126 - estebank:continue-eval, r=oli-obk
Continue evaluating after item-type checking

Fix #30999.

r? @oli-obk
2019-04-22 21:46:07 +00:00
Tomas Koutsky
1dc13b5904 Remove visit_subpats from check_pat in favor of state in EllipsisInclusiveRangePatterns 2019-04-23 00:17:19 +03:00
Aleksey Kladov
28ce23fe8b simplify and avoid allocation 2019-04-23 00:05:06 +03:00
Aleksey Kladov
c29a98e40d remove obsolete and incorrect comment 2019-04-23 00:03:57 +03:00
Esteban Küber
87ef96d394 review comment: add HACK comment 2019-04-22 13:14:43 -07:00
Esteban Küber
56b1ec06ee Fix ICE related to #53708 2019-04-22 13:11:53 -07:00
Esteban Küber
6e723c24a8 Never stop due to errors before borrow checking 2019-04-22 13:11:53 -07:00
Esteban Küber
2dc5d52a04 Remove needless error in test 2019-04-22 12:19:07 -07:00
Esteban Küber
3a19df20da review comments: deduplicate tests 2019-04-22 12:11:46 -07:00
varkor
f571b9548d Update ui tests 2019-04-22 19:50:11 +01:00
Alexey Shmalko
517fb1b06f
Promote rust comments to rustdoc 2019-04-22 21:38:28 +03:00
Esteban Küber
45bbd14db4 Continue evaluating after item-type checking 2019-04-22 11:31:35 -07:00
David Wood
7ab1bfd692
Only make suggestion when type is Copy.
This commit makes the suggestion to dereference when a type implements
`Deref` only apply if the dereference would succeed (ie. the type is
`Copy`, otherwise a borrow check error would occur).
2019-04-22 19:26:24 +01:00
Matthew Jasper
d9ea132b73 Explain error when yielding a reference to a local variable 2019-04-22 18:50:26 +01:00
bors
6d599337fa Auto merge of #60168 - varkor:tidy-leading-newline, r=alexcrichton
Add a tidy check for leading newlines

This is fairly uncommon, but it can slip through when refactoring (as evidenced by the files with leading newlines here).
2019-04-22 16:30:42 +00:00
varkor
096495531c Update ui tests 2019-04-22 17:30:54 +01:00
varkor
9736d32f84 Remove leading newlines 2019-04-22 17:01:33 +01:00
varkor
8423e00714 Add a tidy check for leading trailing newlines 2019-04-22 17:01:33 +01:00
varkor
a43ccb0b9b Disallow double trailing newlines in tidy 2019-04-22 16:57:01 +01:00
varkor
7f0f0e31ec Remove double trailing newlines 2019-04-22 16:57:01 +01:00
Corentin Henry
66627777b5 std::net: tests for Ipv4addr::is_reserved()
Also add tests to IpAddr for make sure these addresses are not global
or multicast.
2019-04-22 17:54:27 +02:00
Corentin Henry
a2bead8761 std::net: tests for Ipv4addr::is_ietf_protocol_assignment()
Also add tests to IpAddr to make sure these addresses are not global.
2019-04-22 17:41:43 +02:00
Corentin Henry
9dcfd9f58c std::net: tests for Ipv4addr::is_benchmarking()
also add test to Ipaddr, making sure that these addresses are not
global.
2019-04-22 17:41:37 +02:00
Corentin Henry
40d0127a09 std::net: tests for Ipv6addr::is_unicast_link_local{_strict}() 2019-04-22 17:41:32 +02:00
Corentin Henry
99d9bb640f std::net: fix tests for site-local ipv6 addresses
Ipv6Addr::is_unicast_global() now returns `true` for unicast site
local addresses, since they are deprecated.
2019-04-22 16:03:39 +02:00
Corentin Henry
c302d2c78f std::net: fix Ipv4addr::is_global() tests
Ipv4addr::is_global() previously considered 0/8 was global, but has
now been fixed, so these tests needed to be fixed as well.
2019-04-22 16:03:39 +02:00
Corentin Henry
c34bcc658b std::net: use macros to test ip properties 2019-04-22 16:03:39 +02:00
Corentin Henry
8106320009 std::net: fix documentation markdown 2019-04-22 16:03:39 +02:00
Corentin Henry
9f6a747b32 std::net: fix Ipv4Addr::is_global()
As per @therealbstern's comment[0]:

The implementation of Ipv4::is_global is not complete, according to the
IANA IPv4 Special-Purpose Address Registry.

        - It compares the address to 0.0.0.0, but anything in 0.0.0.0/8
          should not be considered global.
                - 0/8 is not global and is currently forbidden because
                  some systems used to treat it as the local network.
                - The implementation of Ipv4::is_unspecified is correct.
                  0.0.0.0 is the unspecified address.
        - It does not examine 100.64.0.0/10, which is "Shared Address
          Space" and not global.
        - Ditto 192.0.0.0/24 (IETF Protocol Assignments), except for
          192.0.0.9/32 and 192.0.0.10/32, which are carved out as
          globally reachable.
        - 198.18.0.0/15 is for "Benchmarking" and should not be globally
          reachable.
        - 240.0.0.0/4 is reserved and not currently reachable
2019-04-22 16:03:39 +02:00
Corentin Henry
67291cc971 std::net: add Ipv4Addr::is_shared() 2019-04-22 16:03:39 +02:00
Corentin Henry
f87b96773b std::net: add Ipv4Addr::is_ietf_protocol_assignment() 2019-04-22 16:03:39 +02:00
Corentin Henry
de3cf0d5eb std::net: add Ipv4Addr::is_benchmarking() 2019-04-22 16:03:39 +02:00
Corentin Henry
8f679977e0 std::net: add Ipv4Addr::is_reserved() 2019-04-22 16:03:32 +02:00