Auto merge of #51969 - pietroalbini:rollup, r=pietroalbini
Rollup of 7 pull requests Successful merges: - #51511 (Stabilize Iterator::flatten in 1.29, fixes #48213.) - #51853 (Fix some doc links) - #51890 (Fix inconsequential typo in GlobalAlloc doc example) - #51920 (use literal span for concrete type suggestion) - #51921 (improve the error message when `#[panic_implementation]` is missing) - #51922 (rename the llvm-tools component to llvm-tools-preview and tweak its image) - #51961 (Fix typo in /src/librustc_resolve/lib.rs) Failed merges: r? @ghost
This commit is contained in:
commit
a7a60dc7f8
16 changed files with 89 additions and 42 deletions
18
src/test/compile-fail/panic-implementation-missing.rs
Normal file
18
src/test/compile-fail/panic-implementation-missing.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// 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.
|
||||
|
||||
// error-pattern: `#[panic_implementation]` function required, but not found
|
||||
|
||||
#![feature(lang_items)]
|
||||
#![no_main]
|
||||
#![no_std]
|
||||
|
||||
#[lang = "eh_personality"]
|
||||
fn eh() {}
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// aux-build:weak-lang-items.rs
|
||||
// error-pattern: language item required, but not found: `panic_impl`
|
||||
// error-pattern: `#[panic_implementation]` function required, but not found
|
||||
// error-pattern: language item required, but not found: `eh_personality`
|
||||
// ignore-wasm32-bare compiled with panic=abort, personality not required
|
||||
|
||||
|
|
|
|||
13
src/test/ui/issue-51874.rs
Normal file
13
src/test/ui/issue-51874.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// 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 a = (1.0).pow(1.0); //~ ERROR can't call method `pow` on ambiguous numeric type
|
||||
}
|
||||
13
src/test/ui/issue-51874.stderr
Normal file
13
src/test/ui/issue-51874.stderr
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
error[E0689]: can't call method `pow` on ambiguous numeric type `{float}`
|
||||
--> $DIR/issue-51874.rs:12:19
|
||||
|
|
||||
LL | let a = (1.0).pow(1.0); //~ ERROR can't call method `pow` on ambiguous numeric type
|
||||
| ^^^
|
||||
help: you must specify a concrete type for this numeric value, like `f32`
|
||||
|
|
||||
LL | let a = (1.0_f32).pow(1.0); //~ ERROR can't call method `pow` on ambiguous numeric type
|
||||
| ^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0689`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue