Auto merge of #52014 - pietroalbini:rollup, r=pietroalbini

Rollup of 13 pull requests

Successful merges:

 - #51548 (Initialize LLVM's AMDGPU target machine, if available.)
 - #51809 (Add read_exact_at and write_all_at methods to FileExt on unix)
 - #51914 (add outlives annotations to `BTreeMap`)
 - #51958 (Show known meta items in unknown meta items error)
 - #51973 (Make Stdio handle UnwindSafe)
 - #51977 (bootstrap: tests should use rustc from config.toml)
 - #51978 (Do not suggest changes to str literal if it isn't one)
 - #51979 (Get rid of `TyImplTraitExistential`)
 - #51980 (Emit column info in debuginfo for non msvc like targets)
 - #51982 (incr.comp.: Take names of children into account when computing the ICH of a module's HIR.)
 - #51997 (add entry for cargo-metadata feature to RELEASES)
 - #52004 (toolstate: Fixed detection of changed submodule, and other fixes.)
 - #52006 ( Change --keep-stage to apply more often)

Failed merges:

r? @ghost
This commit is contained in:
bors 2018-07-03 12:26:14 +00:00
commit 860d169474
33 changed files with 1258 additions and 920 deletions

View file

@ -0,0 +1,37 @@
// Copyright 2015 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.
// Various checks that deprecation attributes are used correctly
mod bogus_attribute_types_1 {
#[deprecated(since = "a", note = "a", reason)] //~ ERROR unknown meta item 'reason'
fn f1() { }
#[deprecated(since = "a", note)] //~ ERROR incorrect meta item
fn f2() { }
#[deprecated(since, note = "a")] //~ ERROR incorrect meta item
fn f3() { }
#[deprecated(since = "a", note(b))] //~ ERROR incorrect meta item
fn f5() { }
#[deprecated(since(b), note = "a")] //~ ERROR incorrect meta item
fn f6() { }
}
#[deprecated(since = "a", note = "b")]
#[deprecated(since = "a", note = "b")]
fn multiple1() { } //~ ERROR multiple deprecated attributes
#[deprecated(since = "a", since = "b", note = "c")] //~ ERROR multiple 'since' items
fn f1() { }
fn main() { }

View file

@ -0,0 +1,46 @@
error[E0541]: unknown meta item 'reason'
--> $DIR/deprecation-sanity.rs:14:43
|
LL | #[deprecated(since = "a", note = "a", reason)] //~ ERROR unknown meta item 'reason'
| ^^^^^^ expected one of `since`, `note`
error[E0551]: incorrect meta item
--> $DIR/deprecation-sanity.rs:17:31
|
LL | #[deprecated(since = "a", note)] //~ ERROR incorrect meta item
| ^^^^
error[E0551]: incorrect meta item
--> $DIR/deprecation-sanity.rs:20:18
|
LL | #[deprecated(since, note = "a")] //~ ERROR incorrect meta item
| ^^^^^
error[E0551]: incorrect meta item
--> $DIR/deprecation-sanity.rs:23:31
|
LL | #[deprecated(since = "a", note(b))] //~ ERROR incorrect meta item
| ^^^^^^^
error[E0551]: incorrect meta item
--> $DIR/deprecation-sanity.rs:26:18
|
LL | #[deprecated(since(b), note = "a")] //~ ERROR incorrect meta item
| ^^^^^^^^
error[E0550]: multiple deprecated attributes
--> $DIR/deprecation-sanity.rs:32:1
|
LL | fn multiple1() { } //~ ERROR multiple deprecated attributes
| ^^^^^^^^^^^^^^^^^^
error[E0538]: multiple 'since' items
--> $DIR/deprecation-sanity.rs:34:27
|
LL | #[deprecated(since = "a", since = "b", note = "c")] //~ ERROR multiple 'since' items
| ^^^^^^^^^^^
error: aborting due to 7 previous errors
Some errors occurred: E0538, E0541, E0550, E0551.
For more information about an error, try `rustc --explain E0538`.

View file

@ -0,0 +1,16 @@
// 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 foo() -> bool {
b"".starts_with(stringify!(foo))
//~^ ERROR mismatched types
}
fn main() {}

View file

@ -0,0 +1,12 @@
error[E0308]: mismatched types
--> $DIR/issue-48364.rs:12:21
|
LL | b"".starts_with(stringify!(foo))
| ^^^^^^^^^^^^^^^ expected slice, found str
|
= note: expected type `&[u8]`
found type `&'static str`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.