-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 13 pull requests #23884
Merged
Merged
Rollup of 13 pull requests #23884
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl's progress meter would otherwise interfere with sudo's password prompt. In addition, add the -f flag to make sure 4xx status codes are treated as errors.
Also tweaked a few things.
This allows quasiquoting to insert where clauses.
This commit provides a safe, but unstable interface for the `try` functionality of running a closure and determining whether it panicked or not. There are two primary reasons that this function was previously marked `unsafe`: 1. A vanilla version of this function exposes the problem of exception safety by allowing a bare try/catch in the language. It is not clear whether this concern should be directly tied to `unsafe` in Rust at the API level. At this time, however, the bounds on `ffi::try` require the closure to be both `'static` and `Send` (mirroring those of `thread::spawn`). It may be possible to relax the bounds in the future, but for now it's the level of safety that we're willing to commit to. 2. Panicking while panicking will leak resources by not running destructors. Because panicking is still controlled by the standard library, safeguards remain in place to prevent this from happening. The new API is now called `catch_panic` and is marked as `#[unstable]` for now.
This commit removes all parsing, resolve, and compiler support for the old and long-deprecated int/uint types.
Refactored code so that the drop-flag values for initialized (`DTOR_NEEDED`) versus dropped (`DTOR_DONE`) are given explicit names. Add `mem::dropped()` (which with `DTOR_DONE == 0` is semantically the same as `mem::zeroed`, but the point is that it abstracts away from the particular choice of value for `DTOR_DONE`). Filling-drop needs to use something other than `ptr::read_and_zero`, so I added such a function: `ptr::read_and_drop`. But, libraries should not use it if they can otherwise avoid it. Fixes to tests to accommodate filling-drop.
…ile-fail tests. (I.e. the idea being, lets catch errors in these basic constructs sometime *before* we start doing the doc tests.)
(Reviewed rest of code; did not see other `pub` items that needed such treatment.) Driveby: fix typo in comment in ptr.rs.
(That is, added config and debugflag a la check-overflow but for drop flag sanity-check.) Remove now-unused import of NoDebugInfo from trans::glue.
This is technically a breaking change as it deprecates and unstables some previously stable apis that were missed in the last round of deprecations. [breaking change]
Now that feature flags are only on nightly, it's good to split this stuff out.
This syntax has been deprecated for quite some time, and there were only a few remaining uses of it in the codebase anyway.
This PR allows the quote macros to unquote trait items, impl items, where clauses, and paths.
when you perform a clone() call.
Now that support has been removed, all lingering use cases are renamed.
This commit removes compiler support for the `old_impl_check` attribute which should in theory be entirely removed now. The last remaining use of it in the standard library has been updated by moving the type parameter on the `old_io::Acceptor` trait into an associated type. As a result, this is a breaking change for all current users of the deprecated `old_io::Acceptor` trait. Code can be migrated by using the `Connection` associated type instead. [breaking-change]
This functions swaps the order of arguments to a few functions that previously took (output, input) parameters, but now take (input, output) parameters (in that order). The affected functions are: * ptr::copy * ptr::copy_nonoverlapping * slice::bytes::copy_memory * intrinsics::copy * intrinsics::copy_nonoverlapping Closes rust-lang#22890 [breaking-change]
Due to a long-standing conservative approach to trait exports, all traits are considered exported. However, the missing_docs lint uses the export map to determine if something is public and ought to have documentation. This commit modifies the lint to check if traits are private before emitting the warning. Closes rust-lang#11592
Forward output from stderr when a test executable panics/fails.
To not use `old_io` and `os`, which are deprecated. Since there is no more `MemoryMap` used byte parsing instead to generate the second potential error. You can see the code working fine [here](http://is.gd/4g0wwp) on the PlayPen.
The documentation says that 'The current convention is to use the `test` module to hold your "unit-style"' but then defines the module as "tests" instead. Also in the output of the command we can see: ``` test test::it_works ... ok ``` So I think the name of the module was meant to be "test"
…lexcrichton Currently if a rustdoc test panics then the fatal error message is not forwarded to the user. This change will have the test runner prefer forwarding anything on the stderr of the test process.
Due to a long-standing conservative approach to trait exports, all traits are considered exported. However, the missing_docs lint uses the export map to determine if something is public and ought to have documentation. This commit modifies the lint to check if traits are private before emitting the warning. Closes rust-lang#11592
…akis Disallow writing through mutable pointers stored in non-mut Box. Fix rust-lang#14270 The fix works by making `cmt::freely_aliasable` result more fine-grained. Instead of encoding the aliasability (i.e. whether the cmt is uniquely writable or not) as an option, now pass back an enum indicating either: 1. freely-aliasable (thus not uniquely-writable), 2. non-aliasable (thus uniquely writable), or 3. unique but immutable (and thus not uniquely writable, according to proposal from issue rust-lang#14270.) This is all of course a giant hack that will hopefully go away with an eventually removal of special treatment of `Box<T>` (aka `ty_unique`) from the compiler.
Based on the comment from @apasel422 in rust-lang#23791 (comment). Where @apasel422 proposed ``` Moves the value out of the option if it is `Some`, or panics if it is `None`. ``` I include in this PR the version ``` Moves the value `v` out of the `Option` if it is `Some(v)`, or panics if it is `None`. ``` which - is a little bit more precise about what value is actually returned - uses `Option` over just "option" in the part `out of the [Option] r? @steveklabnik, @apasel422
…aturon This functions swaps the order of arguments to a few functions that previously took (output, input) parameters, but now take (input, output) parameters (in that order). The affected functions are: * ptr::copy * ptr::copy_nonoverlapping * slice::bytes::copy_memory * intrinsics::copy * intrinsics::copy_nonoverlapping Closes rust-lang#22890 [breaking-change]
…ern-example, r=alexcrichton This makes some use of `x` and `y`, instead of setting them to the same value.
@bors: r+ p=10 |
📌 Commit db76327 has been approved by |
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
std::error
example #23836, Fixed wrong name of test module in testing.md #23839, rustdoc: prefer output from stderr on test panic #23846, lint: handle private traits better #23852, Disallow writing through mutable pointers stored in non-mut Box. #23859, Second attempt to fix #23713 based on follow-up comments in #23791. #23862, convert: add Into<Cow> impls for &str and String #23865, std: Standardize (input, output) param orderings #23866, book: make Builder Pattern example more complete #23869, mk: build and distribute facade crates unconditionally (for now) #23874