Skip to content

Commit

Permalink
Auto merge of #57354 - kennytm:rollup, r=kennytm
Browse files Browse the repository at this point in the history
Rollup of 17 pull requests

Successful merges:

 - #57219 (Remove some unused code)
 - #57229 (Fix #56806 by using `delay_span_bug` in object safety layout sanity checks)
 - #57233 (Rename and fix nolink-with-link-args test)
 - #57238 (Fix backtraces for inlined functions on Windows)
 - #57249 (Fix broken links to second edition TRPL.)
 - #57267 (src/jemalloc is gone, remove its mention from COPYRIGHT)
 - #57273 (Update the stdsimd submodule)
 - #57278 (Add Clippy to config.toml.example)
 - #57295 (Fix 'be be' constructs)
 - #57311 (VaList::copy should not require a mutable ref)
 - #57312 (`const fn` is no longer coming soon (const keyword docs))
 - #57313 (Improve Box<T> -> Pin<Box<T>> conversion)
 - #57314 (Fix repeated word typos)
 - #57326 (Doc rewording, use the same name `writer`)
 - #57338 (rustdoc: force binary filename for compiled doctests)
 - #57342 (librustc_mir: Make qualify_min_const_fn module public)
 - #57343 (Calculate privacy access only via query)

Failed merges:

 - #57340 (Use correct tracking issue for c_variadic)

r? @ghost
  • Loading branch information
bors committed Jan 5, 2019
2 parents 8c2d0f4 + d9885c4 commit 68fe518
Show file tree
Hide file tree
Showing 122 changed files with 296 additions and 339 deletions.
32 changes: 0 additions & 32 deletions COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -229,35 +229,3 @@ their own copyright notices and license terms:
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE. */

* jemalloc, under src/jemalloc:

Copyright (C) 2002-2014 Jason Evans
<[email protected]>. All rights reserved.
Copyright (C) 2007-2012 Mozilla Foundation.
All rights reserved.
Copyright (C) 2009-2014 Facebook, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice(s),
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice(s),
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S)
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S)
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
2 changes: 1 addition & 1 deletion config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@

# Installs chosen set of extended tools if enables. By default builds all.
# If chosen tool failed to build the installation fails.
#tools = ["cargo", "rls", "rustfmt", "analysis", "src"]
#tools = ["cargo", "rls", "clippy", "rustfmt", "analysis", "src"]

# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose
#verbose = 0
Expand Down
26 changes: 13 additions & 13 deletions src/doc/rustc/src/lints/listing/warn-by-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ warning: attempt to add with overflow

## dead-code

This lint detects detect unused, unexported items. Some
This lint detects unused, unexported items. Some
example code that triggers this lint:

```rust
Expand All @@ -44,7 +44,7 @@ warning: function is never used: `foo`

## deprecated

This lint detects detects use of deprecated items. Some
This lint detects use of deprecated items. Some
example code that triggers this lint:

```rust
Expand Down Expand Up @@ -119,7 +119,7 @@ warning: found struct without foreign-function-safe representation annotation in

## late-bound-lifetime-arguments

This lint detects detects generic lifetime arguments in path segments with
This lint detects generic lifetime arguments in path segments with
late bound lifetime parameters. Some example code that triggers this lint:

```rust
Expand Down Expand Up @@ -381,7 +381,7 @@ extern crate macro_crate_test;

## private-in-public

This lint detects detect private items in public interfaces not caught by the old implementation. Some
This lint detects private items in public interfaces not caught by the old implementation. Some
example code that triggers this lint:

```rust,ignore
Expand Down Expand Up @@ -659,7 +659,7 @@ warning: unknown lint: `not_a_real_lint`

## unreachable-code

This lint detects detects unreachable code paths. Some example code that
This lint detects unreachable code paths. Some example code that
triggers this lint:

```rust,no_run
Expand All @@ -681,7 +681,7 @@ warning: unreachable statement

## unreachable-patterns

This lint detects detects unreachable patterns. Some
This lint detects unreachable patterns. Some
example code that triggers this lint:

```rust
Expand Down Expand Up @@ -716,11 +716,11 @@ annotations now.

## unused-allocation

This lint detects detects unnecessary allocations that can be eliminated.
This lint detects unnecessary allocations that can be eliminated.

## unused-assignments

This lint detects detect assignments that will never be read. Some
This lint detects assignments that will never be read. Some
example code that triggers this lint:

```rust
Expand All @@ -741,7 +741,7 @@ warning: value assigned to `x` is never read

## unused-attributes

This lint detects detects attributes that were not used by the compiler. Some
This lint detects attributes that were not used by the compiler. Some
example code that triggers this lint:

```rust
Expand Down Expand Up @@ -785,7 +785,7 @@ warning: comparison is useless due to type limits

## unused-doc-comment

This lint detects detects doc comments that aren't used by rustdoc. Some
This lint detects doc comments that aren't used by rustdoc. Some
example code that triggers this lint:

```rust
Expand Down Expand Up @@ -831,7 +831,7 @@ warning: unused import: `std::collections::HashMap`

## unused-macros

This lint detects detects macros that were not used. Some example code that
This lint detects macros that were not used. Some example code that
triggers this lint:

```rust
Expand Down Expand Up @@ -884,7 +884,7 @@ warning: unused `std::result::Result` that must be used

## unused-mut

This lint detects detect mut variables which don't need to be mutable. Some
This lint detects mut variables which don't need to be mutable. Some
example code that triggers this lint:

```rust
Expand Down Expand Up @@ -946,7 +946,7 @@ warning: unnecessary `unsafe` block

## unused-variables

This lint detects detect variables which are not used in any way. Some
This lint detects variables which are not used in any way. Some
example code that triggers this lint:

```rust
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustdoc/src/documentation-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ compiles, while only showing the parts that are relevant to that part of your
explanation.
The `#`-hiding of lines can be prevented by using two consecutive hashes
`##`. This only needs to be done with with the first `#` which would've
`##`. This only needs to be done with the first `#` which would've
otherwise caused hiding. If we have a string literal like the following,
which has a line that starts with a `#`:
Expand Down
20 changes: 15 additions & 5 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,19 @@ impl<T: ?Sized> Box<T> {
{
unsafe { &mut *Box::into_raw(b) }
}

/// Converts a `Box<T>` into a `Pin<Box<T>>`
///
/// This conversion does not allocate on the heap and happens in place.
///
/// This is also available via [`From`].
#[unstable(feature = "box_into_pin", issue = "0")]
pub fn into_pin(boxed: Box<T>) -> Pin<Box<T>> {
// It's not possible to move or replace the insides of a `Pin<Box<T>>`
// when `T: !Unpin`, so it's safe to pin it directly without any
// additional requirements.
unsafe { Pin::new_unchecked(boxed) }
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -451,15 +464,12 @@ impl<T> From<T> for Box<T> {
}

#[stable(feature = "pin", since = "1.33.0")]
impl<T> From<Box<T>> for Pin<Box<T>> {
impl<T: ?Sized> From<Box<T>> for Pin<Box<T>> {
/// Converts a `Box<T>` into a `Pin<Box<T>>`
///
/// This conversion does not allocate on the heap and happens in place.
fn from(boxed: Box<T>) -> Self {
// It's not possible to move or replace the insides of a `Pin<Box<T>>`
// when `T: !Unpin`, so it's safe to pin it directly without any
// additional requirements.
unsafe { Pin::new_unchecked(boxed) }
Box::into_pin(boxed)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libcore/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl<'a> VaList<'a> {
reason = "the `c_variadic` feature has not been properly tested on \
all supported platforms",
issue = "27745")]
pub unsafe fn copy<F, R>(&mut self, f: F) -> R
pub unsafe fn copy<F, R>(&self, f: F) -> R
where F: for<'copy> FnOnce(VaList<'copy>) -> R {
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
not(target_arch = "x86_64")),
Expand Down
1 change: 1 addition & 0 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
#![feature(aarch64_target_feature)]
#![feature(wasm_target_feature)]
#![feature(avx512_target_feature)]
#![cfg_attr(not(stage0), feature(cmpxchg16b_target_feature))]
#![feature(const_slice_len)]
#![feature(const_str_as_bytes)]
#![feature(const_str_len)]
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl<T: ?Sized> !Send for *mut T { }
on(parent_trait="std::path::Path", label="borrow the `Path` instead"),
message="the size for values of type `{Self}` cannot be known at compilation time",
label="doesn't have a size known at compile-time",
note="to learn more, visit <https://doc.rust-lang.org/book/second-edition/\
note="to learn more, visit <https://doc.rust-lang.org/book/\
ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>",
)]
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/ops/deref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/// [book] as well as the reference sections on [the dereference operator]
/// [ref-deref-op], [method resolution] and [type coercions].
///
/// [book]: ../../book/second-edition/ch15-02-deref.html
/// [book]: ../../book/ch15-02-deref.html
/// [`DerefMut`]: trait.DerefMut.html
/// [more]: #more-on-deref-coercion
/// [ref-deref-op]: ../../reference/expressions/operator-expr.html#the-dereference-operator
Expand Down Expand Up @@ -117,7 +117,7 @@ impl<T: ?Sized> Deref for &mut T {
/// [book] as well as the reference sections on [the dereference operator]
/// [ref-deref-op], [method resolution] and [type coercions].
///
/// [book]: ../../book/second-edition/ch15-02-deref.html
/// [book]: ../../book/ch15-02-deref.html
/// [`Deref`]: trait.Deref.html
/// [more]: #more-on-deref-coercion
/// [ref-deref-op]: ../../reference/expressions/operator-expr.html#the-dereference-operator
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/ops/drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/// Refer to [the chapter on `Drop` in *The Rust Programming Language*][book]
/// for some more elaboration.
///
/// [book]: ../../book/second-edition/ch15-03-drop.html
/// [book]: ../../book/ch15-03-drop.html
///
/// # Examples
///
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/ops/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/// `Fn(usize, bool) -> usize`). Those interested in the technical details of
/// this can refer to [the relevant section in the *Rustonomicon*][nomicon].
///
/// [book]: ../../book/second-edition/ch13-01-closures.html
/// [book]: ../../book/ch13-01-closures.html
/// [`FnMut`]: trait.FnMut.html
/// [`FnOnce`]: trait.FnOnce.html
/// [function pointers]: ../../std/primitive.fn.html
Expand Down Expand Up @@ -95,7 +95,7 @@ pub trait Fn<Args> : FnMut<Args> {
/// `Fn(usize, bool) -> usize`). Those interested in the technical details of
/// this can refer to [the relevant section in the *Rustonomicon*][nomicon].
///
/// [book]: ../../book/second-edition/ch13-01-closures.html
/// [book]: ../../book/ch13-01-closures.html
/// [`Fn`]: trait.Fn.html
/// [`FnOnce`]: trait.FnOnce.html
/// [function pointers]: ../../std/primitive.fn.html
Expand Down Expand Up @@ -173,7 +173,7 @@ pub trait FnMut<Args> : FnOnce<Args> {
/// `Fn(usize, bool) -> usize`). Those interested in the technical details of
/// this can refer to [the relevant section in the *Rustonomicon*][nomicon].
///
/// [book]: ../../book/second-edition/ch13-01-closures.html
/// [book]: ../../book/ch13-01-closures.html
/// [`Fn`]: trait.Fn.html
/// [`FnMut`]: trait.FnMut.html
/// [function pointers]: ../../std/primitive.fn.html
Expand Down
16 changes: 0 additions & 16 deletions src/librustc/ich/impls_ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,22 +477,6 @@ impl_stable_hash_for!(enum mir::interpret::InboundsCheck {
MaybeDead
});

impl_stable_hash_for!(enum mir::interpret::Lock {
NoLock,
WriteLock(dl),
ReadLock(v)
});

impl_stable_hash_for!(struct mir::interpret::DynamicLifetime {
frame,
region
});

impl_stable_hash_for!(enum mir::interpret::AccessKind {
Read,
Write
});

impl_stable_hash_for!(enum ty::Variance {
Covariant,
Invariant,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/opaque_types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub type OpaqueTypeMap<'tcx> = DefIdMap<OpaqueTypeDecl<'tcx>>;
/// appear in the return type).
#[derive(Copy, Clone, Debug)]
pub struct OpaqueTypeDecl<'tcx> {
/// The substitutions that we apply to the abstract that that this
/// The substitutions that we apply to the abstract that this
/// `impl Trait` desugars to. e.g., if:
///
/// fn foo<'a, 'b, T>() -> impl Trait<'a>
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/lint/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ impl<'a> LintLevelsBuilder<'a> {

/// Pushes a list of AST lint attributes onto this context.
///
/// This function will return a `BuilderPush` object which should be be
/// passed to `pop` when this scope for the attributes provided is exited.
/// This function will return a `BuilderPush` object which should be passed
/// to `pop` when this scope for the attributes provided is exited.
///
/// This function will perform a number of tasks:
///
Expand Down
22 changes: 0 additions & 22 deletions src/librustc/mir/interpret/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use mir;
use hir::def_id::DefId;
use ty::{self, TyCtxt, Instance};
use ty::layout::{self, Size};
use middle::region;
use std::io;
use rustc_serialize::{Encoder, Decodable, Encodable};
use rustc_data_structures::fx::FxHashMap;
Expand All @@ -40,27 +39,6 @@ use ty::codec::TyDecoder;
use std::sync::atomic::{AtomicU32, Ordering};
use std::num::NonZeroU32;

#[derive(Clone, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
pub enum Lock {
NoLock,
WriteLock(DynamicLifetime),
/// This should never be empty -- that would be a read lock held and nobody
/// there to release it...
ReadLock(Vec<DynamicLifetime>),
}

#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
pub struct DynamicLifetime {
pub frame: usize,
pub region: Option<region::Scope>, // "None" indicates "until the function ends"
}

#[derive(Copy, Clone, Debug, PartialEq, Eq, RustcEncodable, RustcDecodable)]
pub enum AccessKind {
Read,
Write,
}

/// Uniquely identifies a specific constant or static.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, RustcEncodable, RustcDecodable)]
pub struct GlobalId<'tcx> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/mir/interpret/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub enum Scalar<Tag=(), Id=AllocId> {
/// The raw bytes of a simple value.
Bits {
/// The first `size` bytes are the value.
/// Do not try to read less or more bytes that that. The remaining bytes must be 0.
/// Do not try to read less or more bytes than that. The remaining bytes must be 0.
size: u8,
bits: u128,
},
Expand Down
4 changes: 0 additions & 4 deletions src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1311,12 +1311,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
"Disable the instrumentation pre-inliner, useful for profiling / PGO."),
relro_level: Option<RelroLevel> = (None, parse_relro_level, [TRACKED],
"choose which RELRO level to use"),
nll_subminimal_causes: bool = (false, parse_bool, [UNTRACKED],
"when tracking region error causes, accept subminimal results for faster execution."),
nll_facts: bool = (false, parse_bool, [UNTRACKED],
"dump facts from NLL analysis into side files"),
disable_nll_user_type_assert: bool = (false, parse_bool, [UNTRACKED],
"disable user provided type assertion in NLL"),
nll_dont_emit_read_for_match: bool = (false, parse_bool, [UNTRACKED],
"in match codegen, do not include FakeRead statements (used by mir-borrowck)"),
dont_buffer_diagnostics: bool = (false, parse_bool, [UNTRACKED],
Expand Down
Loading

0 comments on commit 68fe518

Please sign in to comment.