Skip to content
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 17 pull requests #57354

Merged
merged 40 commits into from
Jan 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2149d73
Remove unnecessary borrow generation
matthewjasper Dec 1, 2018
49e52e7
Remove unused types from rustc::mir::interpret
matthewjasper Dec 29, 2018
afb7c06
Remove unused nll debug flags
matthewjasper Dec 30, 2018
794b81e
Rename and fix nolink-with-link-args test
Smibu Dec 31, 2018
f4826ab
Fix backtraces on Windows
Zoxc Dec 31, 2018
d2c91a1
Fix broken links to second edition TRPL.
frewsxcv Jan 1, 2019
0fd5003
src/jemalloc is gone, remove its mention from COPYRIGHT
SimonSapin Jan 2, 2019
3852dc8
Add Clippy to config.toml.example
mati865 Jan 2, 2019
c0662a0
Update the stdsimd submodule
alexcrichton Jan 2, 2019
a944ecf
Fix 'be be' constructs
d-e-s-o Jan 3, 2019
917985e
VaList::copy should not require a mutable ref
dlrobertson Jan 3, 2019
3fb42cf
const fn no longer comming soon on const docs
mendess Jan 3, 2019
5e3a560
Allow converting Box<T: !Sized> -> Pin<Box<T>>
Nemo157 Jan 3, 2019
d1a42ea
Add discoverable function for converting Box<T> -> Pin<Box<T>>
Nemo157 Jan 3, 2019
190d139
Fix repeated word typos
wikku Jan 3, 2019
d60fa1d
Doc rewording, use the same name `writer`
king6cong Jan 4, 2019
0b55c79
force binary filename for compiled doctests
QuietMisdreavus Jan 4, 2019
632d584
Update src/librustc/ty/fold.rs
awaitlink Jan 4, 2019
06243b1
Fix repeated word in astconv.rs
wikku Jan 4, 2019
a1189ac
Replace CrateAnalysis::access_levels with query
Xanewok Jan 4, 2019
480d0f3
Remove unused name from CrateAnalysis
Xanewok Jan 4, 2019
79ea93c
librustc_mir: Make qualify_min_const_fn module public
phansch Jan 4, 2019
2433526
use `delay_span_bug` instead of `bug!` when doing layout sanity check
mikeyhew Dec 19, 2018
aa83481
Rollup merge of #57219 - matthewjasper:mir-cleanup, r=nikomatsakis
kennytm Jan 5, 2019
6c58b84
Rollup merge of #57229 - mikeyhew:fix-56806, r=varkor
kennytm Jan 5, 2019
3d8e5d4
Rollup merge of #57233 - Smibu:rename-and-fix-nolink-test, r=alexcric…
kennytm Jan 5, 2019
dd3e273
Rollup merge of #57238 - Zoxc:bt-fix, r=alexcrichton
kennytm Jan 5, 2019
aa5fc74
Rollup merge of #57249 - frewsxcv:frewsxcv-second-edition, r=KodrAus
kennytm Jan 5, 2019
69d3c1a
Rollup merge of #57267 - rust-lang:SimonSapin-patch-1, r=varkor
kennytm Jan 5, 2019
85ddc4d
Rollup merge of #57273 - alexcrichton:update-stdsimd, r=nikomatsakis
kennytm Jan 5, 2019
f11f858
Rollup merge of #57278 - mati865:config_clippy, r=alexcrichton
kennytm Jan 5, 2019
952af5e
Rollup merge of #57295 - d-e-s-o:topic/be-be, r=zackmdavis
kennytm Jan 5, 2019
dfc1037
Rollup merge of #57311 - dlrobertson:fix_valist_copy, r=KodrAus
kennytm Jan 5, 2019
e1a1ab0
Rollup merge of #57312 - Mendess2526:master, r=Centril
kennytm Jan 5, 2019
676b0b0
Rollup merge of #57313 - Nemo157:box-to-pin, r=cramertj
kennytm Jan 5, 2019
ab55ecf
Rollup merge of #57314 - wiktorkuchta:master, r=Centril
kennytm Jan 5, 2019
a3afdd4
Rollup merge of #57326 - king6cong:doc, r=rkruppe
kennytm Jan 5, 2019
284a419
Rollup merge of #57338 - QuietMisdreavus:doctest-file-name, r=Guillau…
kennytm Jan 5, 2019
06c07f9
Rollup merge of #57342 - phansch:make_public, r=Centril
kennytm Jan 5, 2019
d9885c4
Rollup merge of #57343 - Xanewok:querify-access-levels, r=nikomatsakis
kennytm Jan 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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