about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-10-17 17:35:16 -0700
committerGitHub <noreply@github.com>2016-10-17 17:35:16 -0700
commit1d3dfa5301f59e86547a4034fb654c4efb47ac0e (patch)
tree263b02a1cec4bb38e915bf02672ac3496536c201
parente0111758eb4f215db4ec26f809ef3edf5dfb66f5 (diff)
parentb097790182dd0868812897d3fd1be2e6a5083a16 (diff)
downloadrust-1d3dfa5301f59e86547a4034fb654c4efb47ac0e.tar.gz
rust-1d3dfa5301f59e86547a4034fb654c4efb47ac0e.zip
Auto merge of #37237 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 6 pull requests

- Successful merges: #37172, #37177, #37189, #37194, #37200, #37215
- Failed merges:
-rw-r--r--src/doc/book/const-and-static.md2
-rw-r--r--src/libcollections/vec.rs2
-rw-r--r--src/librustc_driver/lib.rs4
-rw-r--r--src/librustc_llvm/ffi.rs11
-rw-r--r--src/librustc_trans/debuginfo/mod.rs2
-rw-r--r--src/libstd/error.rs8
-rw-r--r--src/rustllvm/RustWrapper.cpp21
-rw-r--r--src/tools/compiletest/src/main.rs2
8 files changed, 14 insertions, 38 deletions
diff --git a/src/doc/book/const-and-static.md b/src/doc/book/const-and-static.md
index 11aa25ac811..e8f17a41cbe 100644
--- a/src/doc/book/const-and-static.md
+++ b/src/doc/book/const-and-static.md
@@ -1,4 +1,4 @@
-% `const` and `static`
+% const and static
 
 Rust has a way of defining constants with the `const` keyword:
 
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 52fc8b9dd70..f3d78c20a4d 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -822,7 +822,7 @@ impl<T> Vec<T> {
     pub fn dedup_by<F>(&mut self, mut same_bucket: F) where F: FnMut(&mut T, &mut T) -> bool {
         unsafe {
             // Although we have a mutable reference to `self`, we cannot make
-            // *arbitrary* changes. The `PartialEq` comparisons could panic, so we
+            // *arbitrary* changes. The `same_bucket` calls could panic, so we
             // must ensure that the vector is in a valid state at all time.
             //
             // The way that we handle this is by using swaps; we iterate
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index f051c869249..6972bdac5e1 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -729,6 +729,10 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
         println!("commit-date: {}", unw(commit_date_str()));
         println!("host: {}", config::host_triple());
         println!("release: {}", unw(release_str()));
+        unsafe {
+            println!("LLVM version: {}.{}",
+                     llvm::LLVMRustVersionMajor(), llvm::LLVMRustVersionMinor());
+        }
     }
 }
 
diff --git a/src/librustc_llvm/ffi.rs b/src/librustc_llvm/ffi.rs
index 50c68d5e75e..302c0ce6c54 100644
--- a/src/librustc_llvm/ffi.rs
+++ b/src/librustc_llvm/ffi.rs
@@ -1817,8 +1817,6 @@ extern {
                                            Ty: DIType,
                                            AlwaysPreserve: bool,
                                            Flags: c_uint,
-                                           AddrOps: *const i64,
-                                           AddrOpsCount: c_uint,
                                            ArgNo: c_uint)
                                            -> DIVariable;
 
@@ -1855,15 +1853,6 @@ extern {
                                                InsertAtEnd: BasicBlockRef)
                                                -> ValueRef;
 
-    pub fn LLVMRustDIBuilderInsertDeclareBefore(Builder: DIBuilderRef,
-                                                Val: ValueRef,
-                                                VarInfo: DIVariable,
-                                                AddrOps: *const i64,
-                                                AddrOpsCount: c_uint,
-                                                DL: ValueRef,
-                                                InsertBefore: ValueRef)
-                                                -> ValueRef;
-
     pub fn LLVMRustDIBuilderCreateEnumerator(Builder: DIBuilderRef,
                                              Name: *const c_char,
                                              Val: u64)
diff --git a/src/librustc_trans/debuginfo/mod.rs b/src/librustc_trans/debuginfo/mod.rs
index a23fd3ab8b3..813915bfd6e 100644
--- a/src/librustc_trans/debuginfo/mod.rs
+++ b/src/librustc_trans/debuginfo/mod.rs
@@ -482,8 +482,6 @@ pub fn declare_local<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                     type_metadata,
                     cx.sess().opts.optimize != config::OptLevel::No,
                     0,
-                    address_operations.as_ptr(),
-                    address_operations.len() as c_uint,
                     argument_index)
             };
             source_loc::set_debug_location(cx, None,
diff --git a/src/libstd/error.rs b/src/libstd/error.rs
index 398bb55ea1b..a1909b0f957 100644
--- a/src/libstd/error.rs
+++ b/src/libstd/error.rs
@@ -65,9 +65,11 @@ use string;
 pub trait Error: Debug + Display {
     /// A short description of the error.
     ///
-    /// The description should not contain newlines or sentence-ending
-    /// punctuation, to facilitate embedding in larger user-facing
-    /// strings.
+    /// The description should only be used for a simple message.
+    /// It should not contain newlines or sentence-ending punctuation,
+    /// to facilitate embedding in larger user-facing strings.
+    /// For showing formatted error messages with more information see
+    /// [Display](https://doc.rust-lang.org/std/fmt/trait.Display.html).
     ///
     /// # Examples
     ///
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 672ab117f15..369388caa04 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -562,8 +562,6 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateVariable(
     LLVMRustMetadataRef Ty,
     bool AlwaysPreserve,
     unsigned Flags,
-    int64_t* AddrOps,
-    unsigned AddrOpsCount,
     unsigned ArgNo) {
 #if LLVM_VERSION_GE(3, 8)
     if (Tag == 0x100) { // DW_TAG_auto_variable
@@ -645,23 +643,6 @@ extern "C" LLVMValueRef LLVMRustDIBuilderInsertDeclareAtEnd(
         unwrap(InsertAtEnd)));
 }
 
-extern "C" LLVMValueRef LLVMRustDIBuilderInsertDeclareBefore(
-    LLVMRustDIBuilderRef Builder,
-    LLVMValueRef Val,
-    LLVMRustMetadataRef VarInfo,
-    int64_t* AddrOps,
-    unsigned AddrOpsCount,
-    LLVMValueRef DL,
-    LLVMValueRef InsertBefore) {
-    return wrap(Builder->insertDeclare(
-        unwrap(Val),
-        unwrap<DILocalVariable>(VarInfo),
-        Builder->createExpression(
-          llvm::ArrayRef<int64_t>(AddrOps, AddrOpsCount)),
-        DebugLoc(cast<MDNode>(unwrap<MetadataAsValue>(DL)->getMetadata())),
-        unwrap<Instruction>(InsertBefore)));
-}
-
 extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateEnumerator(
     LLVMRustDIBuilderRef Builder,
     const char* Name,
@@ -1302,7 +1283,7 @@ static LLVMLinkage from_rust(LLVMRustLinkage linkage) {
             return LLVMCommonLinkage;
         default:
             llvm_unreachable("Invalid LLVMRustLinkage value!");
-    } 
+    }
 }
 
 extern "C" LLVMRustLinkage LLVMRustGetLinkage(LLVMValueRef V) {
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index 81478c18d7b..e6efd45cad1 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -15,6 +15,8 @@
 #![feature(test)]
 #![feature(libc)]
 
+#![cfg_attr(stage0, feature(question_mark))]
+
 #![deny(warnings)]
 
 extern crate libc;