Commit graph

39207 commits

Author SHA1 Message Date
Manish Goregaokar fb92e312d9 Rollup merge of #22788 - vadimcn:fix-precise_time_ns, r=pnkfelix
which starts happening after ~2 hours of machine uptime.
Closes #17845
2015-02-27 22:07:02 +05:30
Manish Goregaokar 08c25f37df Rollup merge of #22748 - jxcl:string-backslash, r=steveklabnik
r? @steveklabnik

Closes #22698

I wasn't sure that this was appropriate for the book, but I've added this to the reference. I also noticed that one of the U+ symbols in the character literals section was missing the graves.
2015-02-27 20:37:39 +05:30
Manish Goregaokar c46fe78c32 Rollup merge of #22732 - jxcl:cargo-new, r=steveklabnik
r? @steveklabnik
2015-02-27 20:37:39 +05:30
Manish Goregaokar 487ee79e3f Rollup merge of #22846 - dhuseby:bitrig-cleanup, r=alexcrichton
This patch contains a couple time fixes to make Rust compile on Bitrig again.  This does not affect OpenBSD.
2015-02-27 20:37:39 +05:30
Manish Goregaokar d9704bdfdb Rollup merge of #22843 - vhbit:no-jemalloc-fix, r=alexcrichton
"body": null,
2015-02-27 20:37:38 +05:30
Manish Goregaokar 19ab0b9a3c Rollup merge of #22823 - kmcallister:fix-21370, r=huonw
Fixes #21370.

`unused-macro-with-follow-violation.rs` was already handled correctly. That test is just for good measure. :)

I have a more involved plan to clean this up, but it ran into difficulties such as #22814.
2015-02-27 20:37:37 +05:30
Manish Goregaokar 6a97fbab4b Rollup merge of #22818 - pnkfelix:fsk-issue-22536, r=nikomatsakis
Ensure we do not zero when \"moving\" types that are Copy.

Uses more precise `type_needs_drop` for deciding about emitting cleanup code.  Added notes about the weaknesses regarding `ty::type_contents` here.

Fix #22536
2015-02-27 20:37:37 +05:30
Manish Goregaokar 5d4e01766b Rollup merge of #22803 - huonw:field-stability, r=alexcrichton
We were recording stability attributes applied to fields in the
compiler, and even annotating it in the libs, but the compiler didn't
actually do the checks to give errors/warnings in user crates.

Details in the commit messages.
2015-02-27 20:37:36 +05:30
bors bd0d8e47e5 Auto merge of #22573 - nwin:impl-debug-rwlock-weak, r=Manishearth
Implements `Debug`  for `RwLock` and `arc::Weak` in the same way it is implemented for `rc::Weak` (basically copy & paste).

The lack of this implementation prevents the automatic implementation of `Debug` for structs containing members of these types.
2015-02-27 10:35:51 +00:00
bors bd27985457 Auto merge of #22853 - FlaPer87:snap, r=alexcrichton
r? @alexcrichton
 
cc @nikomatsakis @pnkfelix
2015-02-27 07:46:15 +00:00
bors dd077d5dec Auto merge of #22857 - alexcrichton:net-flaky, r=alexcrichton
Instead of allocating the same ports for ipv4 and ipv6 tests, instead draw all
ports from the same pool. Some tests connect to just "localhost" on a particular
port which may accidentally be interacting with other tests as the ipv-what-ness
isn't specified with the string "localhost"

Relevant logs:

* [Deadlock of the `net::tcp::tests::listen_localhost` test][mac]
* [Failure of the `fast_rebind` test][win1]
* [Failure of `multiple_connect_interleaved_lazy_schedule_ip4`][win2]

[mac]: https://gist.github.com/alexcrichton/349c7ce7c620c1adb2f2
[win1]: https://gist.github.com/alexcrichton/7e3611faae2e1edaee6f
[win2]: https://gist.github.com/alexcrichton/4f5f87749af3ad0f9851
2015-02-27 05:21:05 +00:00
Alex Crichton c2400bb269 std: Draw from the same port pool during tests
Instead of allocating the same ports for ipv4 and ipv6 tests, instead draw all
ports from the same pool. Some tests connect to just "localhost" on a particular
port which may accidentally be interacting with other tests as the ipv-what-ness
isn't specified with the string "localhost"

Relevant logs:

* [Deadlock of the `net::tcp::tests::listen_localhost` test][mac]
* [Failure of the `fast_rebind` test][win1]
* [Failure of `multiple_connect_interleaved_lazy_schedule_ip4`][win2]

[mac]: https://gist.github.com/alexcrichton/349c7ce7c620c1adb2f2
[win1]: https://gist.github.com/alexcrichton/7e3611faae2e1edaee6f
[win2]: https://gist.github.com/alexcrichton/4f5f87749af3ad0f9851
2015-02-26 19:04:42 -08:00
bors e5cd6534c1 Auto merge of #22765 - sanxiyn:dedup-rustdoc, r=alexcrichton
rustdoc impl item did not include default methods for local crates, but did include them for external crates. This resulted in duplicate methods. Fix so that impl item does not include default methods for external crates.

Fix #22595.
2015-02-27 02:58:15 +00:00
Huon Wilson 060661d2b4 Add some missing stability attributes on struct fields. 2015-02-27 12:52:43 +11:00
Flavio Percoco 9d0d72345d register snapshot 880fb89 2015-02-27 01:48:49 +01:00
bors b47aebe3fc Auto merge of #22825 - semarie:openbsd-pathbuf, r=alexcrichton
unbreak openbsd/bitrig build after 2d200c9c (the complete build/check on openbsd is in progress)

@dhuseby maybe this one is in your list ?
2015-02-26 23:04:03 +00:00
Dave Huseby 804c071d8b fixing a few bitrig build breakers 2015-02-26 13:03:06 -08:00
Valerii Hiora d0bb57cfc3 Fixed build with jemalloc disabled 2015-02-26 20:27:53 +02:00
bors a5214e4330 Auto merge of #22715 - edwardw:send-sync-audit, r=alexcrichton
In the process, also replaces two raw mutable pointers with `Unique` to
spell out the ownership semantics.

cc #22709
2015-02-26 15:43:38 +00:00
Seo Sanghyeon 695846331b Add a rustdoc test for default methods in external crates 2015-02-27 00:28:57 +09:00
Seo Sanghyeon 5e1d4fffff Add a way to assert the number of occurrences to htmldocck 2015-02-27 00:27:57 +09:00
Felix S. Klock II 9a6e3b900f Add doc to core::intrinsics pointing out conservativeness of needs_drop. 2015-02-26 15:12:27 +01:00
Felix S. Klock II 4e334d6141 Regression test for #22536. 2015-02-26 15:12:27 +01:00
Felix S. Klock II 5e4867eef1 Use more precise type_needs_drop for deciding about emitting cleanup code.
Fix #22536
2015-02-26 15:12:26 +01:00
Felix S. Klock II 2d0e6caeec Add push_ctxt instrumentation to all functions that might call base::zero_mem.
(Instrumentation work for Issue 22536.)
2015-02-26 15:12:26 +01:00
bors 3a96d6a981 Auto merge of #22827 - sfackler:should_panic_pt1, r=alexcrichton
This needs to make it into the snapshot before #21824 can land.

r? @alexcrichton
2015-02-26 09:23:36 +00:00
nwin 36ba96ea3c Implement Debug for RwLock, arc::Weak and Mutex 2015-02-26 10:18:13 +01:00
Edward Wang 68490068e0 Send/Sync audit for libcollections
In the process, also replaces a raw mutable pointers with Unique to
spell out the ownership semantics.

cc #22709
2015-02-26 15:43:40 +08:00
bors 41f8b1e89b Auto merge of #22810 - japaric:cow-path, r=alexcrichton
The Path/PathBuf pair already implements the required `Borrow`/`ToOwned` traits and can be used in a `Cow` pointer, so why not?

r? @alexcrichton
2015-02-26 07:01:18 +00:00
Steven Fackler c3b77ab41c Whitelist #[should_panic] 2015-02-25 22:04:00 -08:00
Edward Wang 101498cd88 Tweak VecDeque's IterMut implementation
So it is symmetric to its `Iter` implementation. Also kills an FIXME.
2015-02-26 13:48:09 +08:00
Huon Wilson eafdc7135b Record the publicity of struct fields and enum variants.
The stability check checks the `PublicItems` map when giving errors if
there is a #[stable] item with a public contents that doesn't not have
its own stability. Without recording this, struct fields and enum
variants will not get errors for e.g. stable modules with unmarked
functions internally.

This is just improving the compiler's precision to give the standard
library developers more information earlier.

E.g.

    #![staged_api]
    #![feature(staged_api)]
    #![crate_type = "lib"]

    #[stable(feature = "rust1", since = "1.0.0")]
    pub struct Foo {
        pub x: i32
    }

    #[stable(feature = "rust1", since = "1.0.0")]
    pub mod bar {
        pub fn baz() {}
    }

Without the patch it gives:

    test.rs:12:5: 12:20 error: This node does not have a stability attribute
    test.rs:12     pub fn baz() {}
                   ^~~~~~~~~~~~~~~
    error: aborting due to previous error

With the patch it gives:

    test.rs:7:9: 7:15 error: This node does not have a stability attribute
    test.rs:7     pub x: i32
                      ^~~~~~
    test.rs:12:5: 12:20 error: This node does not have a stability attribute
    test.rs:12     pub fn baz() {}
                   ^~~~~~~~~~~~~~~
    error: aborting due to 2 previous errors
2015-02-26 16:26:34 +11:00
Huon Wilson 19cb8f32d8 Check stability of struct fields.
We were recording stability attributes applied to fields in the
compiler, and even annotating it in the libs, but the compiler didn't
actually do the checks to give errors/warnings in user crates.
2015-02-26 16:26:34 +11:00
Sébastien Marie 653ceee3b3 path -> PathBuf for openbsd/bitrig 2015-02-26 06:16:41 +01:00
Alexander Bliskovsky f618e2e1ec Changed prose to assert_eq! macro. 2015-02-25 20:29:13 -05:00
Alexander Bliskovsky 65b0655230 Added documentation of backslash ending string literals.
Closes #22698
2015-02-25 20:26:24 -05:00
Keegan McAllister 65ea9110bd Always error on invalid macro fragment specifiers
Fixes #21370.

unused-macro-with-follow-violation.rs was already handled correctly. That test
is just for good measure. :)
2015-02-25 17:13:16 -08:00
bors 610d1695d1 Auto merge of #22767 - pnkfelix:issue-22265, r=nikomatsakis
Avoid `cat_expr Erred` notes when already in error state.

Also, to ensure we do not let the dropck get skipped, ICE if `cat_expr` errors when *not* in error state.

This is not known to be a breaking change (i.e. I do not know of a current case that causes the new ICE to be exercised).

Fix #22265
2015-02-25 23:08:53 +00:00
Vadim Chugunov 5dd001b2fc Fix overflow in precise_time_ns() on Windows,
which starts happening after ~2 hours of machine uptime.
2015-02-25 15:02:43 -08:00
bors 4db0b32467 Auto merge of #22796 - Manishearth:rollup, r=Manishearth 2015-02-25 20:32:58 +00:00
Jorge Aparicio 2de7a7c9ba impl IntoCow for Path[Buf] 2015-02-25 12:34:50 -05:00
Manish Goregaokar 357b41bfcf Path -> PathBuf for Windows test (fixup #22727) 2015-02-25 19:52:42 +05:30
Manish Goregaokar d54ed567e0 path -> PathBuf for osx/dragonfly (fixup #22727) 2015-02-25 15:21:58 +05:30
Manish Goregaokar 2470fa155e Assert is internal now (fixup #22739) 2015-02-25 14:11:37 +05:30
Manish Goregaokar e61a790495 Fix type inference error (fixup #22739) 2015-02-25 13:58:58 +05:30
Manish Goregaokar 9f8a1cb38d Use os::getcwd instead of env in rustbook (fixup #22727) 2015-02-25 12:48:14 +05:30
Manish Goregaokar f8e4fcb38c allow(deprecated) for TaskPool (fixup #22783) 2015-02-25 11:45:06 +05:30
Manish Goregaokar f164254392 Rollup merge of #22787 - pnkfelix:reenable-gate-for-unsafe_no_drop_flag, r=alexcrichton
Turn `unsafe_no_drop_flag` back into a gated-feature.

Fix #22173
2015-02-25 10:30:12 +05:30
Manish Goregaokar 1f2b3ebd7b Rollup merge of #22744 - alexcrichton:issue-22738, r=aturon
Currently we have a `set_mode` mutator, so this just adds the pairing of a
`mode` accessor to read the value.

Closes #22738
2015-02-25 10:30:01 +05:30
Manish Goregaokar ecaf74ab3b Rollup merge of #22742 - alexcrichton:issue-22737, r=aturon
If the filename for a path is `None` then we know that the creation of the
parent directory created the whole path so there's no need to retry the call to
`create_dir`.

Closes #22737
2015-02-25 10:29:53 +05:30