Auto merge of #55012 - kennytm:rollup, r=kennytm

Rollup of 16 pull requests

Successful merges:

 - #54755 (Documents reference equality by address (#54197))
 - #54811 (During rustc bootstrap, make default for `optimize` independent of `debug`)
 - #54825 (NLL says "borrowed content" instead of more precise "dereference of raw pointer")
 - #54860 (Add doc comments about safest way to initialize a vector of zeros)
 - #54869 (Fix mobile docs)
 - #54891 (Fix tracking issue for Once::is_completed)
 - #54913 (doc fix: it's auto traits that make for automatic implementations)
 - #54920 (Fix handling of #[must_use] on unit and uninhabited types)
 - #54932 (A handful of random string-related improvements)
 - #54936 (impl Eq+Hash for TyLayout)
 - #54950 (std: Synchronize global allocator on wasm32)
 - #54956 ("(using ..." doesn't have the matching ")")
 - #54958 (add a macro for static (compile-time) assertions)
 - #54967 (Remove incorrect span for second label inner macro invocation)
 - #54983 (Fix slice's benchmarks)
 - #54989 (Fix spelling in the documentation to htmldocck.py)

Failed merges:

r? @ghost
This commit is contained in:
bors 2018-10-12 15:00:24 +00:00
commit 945372d268
31 changed files with 294 additions and 130 deletions

View file

@ -22,13 +22,13 @@ extern crate rustdoc_nonreachable_impls;
pub use rustdoc_nonreachable_impls::hidden::Wobble;
// @has issue_31948_1/trait.Bark.html
// FIXME(33025): has - '//code' 'for Foo'
// @has - '//code' 'for Foo'
// @has - '//code' 'for Wobble'
// @!has - '//code' 'for Wibble'
pub use rustdoc_nonreachable_impls::Bark;
// @has issue_31948_1/trait.Woof.html
// FIXME(33025): has - '//code' 'for Foo'
// @has - '//code' 'for Foo'
// @has - '//code' 'for Wobble'
// @!has - '//code' 'for Wibble'
pub use rustdoc_nonreachable_impls::Woof;

View file

@ -22,7 +22,7 @@ extern crate rustdoc_nonreachable_impls;
pub use rustdoc_nonreachable_impls::hidden::Wobble;
// @has issue_31948_2/trait.Qux.html
// FIXME(33025): has - '//code' 'for Foo'
// @has - '//code' 'for Foo'
// @has - '//code' 'for Wobble'
pub use rustdoc_nonreachable_impls::hidden::Qux;

View file

@ -1,10 +1,10 @@
error[E0507]: cannot move out of borrowed content
error[E0507]: cannot move out of dereference of raw pointer
--> $DIR/borrowck-move-from-unsafe-ptr.rs:13:13
|
LL | let y = *x; //~ ERROR cannot move out of dereference of raw pointer
| ^^
| |
| cannot move out of borrowed content
| cannot move out of dereference of raw pointer
| help: consider removing the `*`: `x`
error: aborting due to previous error

View file

@ -16,22 +16,22 @@ LL | let b = unsafe { *imm_ref() };
| cannot move out of borrowed content
| help: consider removing the `*`: `imm_ref()`
error[E0507]: cannot move out of borrowed content
error[E0507]: cannot move out of dereference of raw pointer
--> $DIR/issue-20801.rs:42:22
|
LL | let c = unsafe { *mut_ptr() };
| ^^^^^^^^^^
| |
| cannot move out of borrowed content
| cannot move out of dereference of raw pointer
| help: consider removing the `*`: `mut_ptr()`
error[E0507]: cannot move out of borrowed content
error[E0507]: cannot move out of dereference of raw pointer
--> $DIR/issue-20801.rs:45:22
|
LL | let d = unsafe { *const_ptr() };
| ^^^^^^^^^^^^
| |
| cannot move out of borrowed content
| cannot move out of dereference of raw pointer
| help: consider removing the `*`: `const_ptr()`
error: aborting due to 4 previous errors

View file

@ -0,0 +1,17 @@
#![feature(never_type)]
#![deny(unused_must_use)]
#[must_use]
fn foo() {}
#[must_use]
fn bar() -> ! {
unimplemented!()
}
fn main() {
foo(); //~ unused return value of `foo`
bar(); //~ unused return value of `bar`
}

View file

@ -0,0 +1,20 @@
error: unused return value of `foo` which must be used
--> $DIR/must_use-unit.rs:14:5
|
LL | foo(); //~ unused return value of `foo`
| ^^^^^^
|
note: lint level defined here
--> $DIR/must_use-unit.rs:3:9
|
LL | #![deny(unused_must_use)]
| ^^^^^^^^^^^^^^^
error: unused return value of `bar` which must be used
--> $DIR/must_use-unit.rs:16:5
|
LL | bar(); //~ unused return value of `bar`
| ^^^^^^
error: aborting due to 2 previous errors

View file

@ -1,9 +1,6 @@
error: expected one of `crate`, `fn`, `pub`, `static`, or `type`, found `let`
--> $DIR/issue-54441.rs:5:9
|
LL | #![feature(macros_in_extern)]
| - expected one of `crate`, `fn`, `pub`, `static`, or `type` here
...
LL | let //~ ERROR expected
| ^^^ unexpected token
...