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

Rollup of 13 pull requests

Successful merges:

 - #51628 (use checked write in `LineWriter` example)
 - #52116 (Handle array manually in str case conversion methods)
 - #52218 (Amend option.take examples)
 - #52418 (Do not use desugared ident when suggesting adding a type)
 - #52439 (Revert some changes from #51917 to fix custom libdir)
 - #52455 (Fix doc comment: use `?` instead of `.unwrap()`)
 - #52458 (rustc: Fix a suggestion for the `proc_macro` feature)
 - #52464 (Allow clippy to be installed with make install)
 - #52472 (rustc: Enable `use_extern_macros` in 2018 edition)
 - #52477 (Clarify short-circuiting behvaior of Iterator::zip.)
 - #52480 (Cleanup #24958)
 - #52487 (Don't build twice the sanitizers on Linux)
 - #52510 (rustdoc: remove FIXME about macro redirects)

Failed merges:

r? @ghost
This commit is contained in:
bors 2018-07-19 00:56:21 +00:00
commit 629d891499
24 changed files with 153 additions and 42 deletions

View file

@ -2,7 +2,7 @@ error[E0282]: type annotations needed
--> $DIR/issue-20261.rs:14:11
|
LL | for (ref i,) in [].iter() {
| -------- consider giving `__next` a type
| --------- the element type for this iterator is not specified
LL | i.clone();
| ^^^^^ cannot infer type for `_`
|

View file

@ -0,0 +1,24 @@
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
let tiles = Default::default();
for row in &mut tiles {
for tile in row {
//~^ NOTE the element type for this iterator is not specified
*tile = 0;
//~^ ERROR type annotations needed
//~| NOTE cannot infer type for `_`
//~| NOTE type must be known at this point
}
}
let tiles: [[usize; 3]; 3] = tiles;
}

View file

@ -0,0 +1,14 @@
error[E0282]: type annotations needed
--> $DIR/issue-51116.rs:16:13
|
LL | for tile in row {
| --- the element type for this iterator is not specified
LL | //~^ NOTE the element type for this iterator is not specified
LL | *tile = 0;
| ^^^^^ cannot infer type for `_`
|
= note: type must be known at this point
error: aborting due to previous error
For more information about this error, try `rustc --explain E0282`.