From db4a9b344639abe51a81e2813157c18f13bf318b Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Fri, 14 Oct 2016 14:53:17 -0400 Subject: [PATCH 1/8] debuginfo: Remove some outdated stuff from LLVM DIBuilder binding. --- src/librustc_llvm/ffi.rs | 11 ----------- src/librustc_trans/debuginfo/mod.rs | 2 -- src/rustllvm/RustWrapper.cpp | 21 +-------------------- 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/src/librustc_llvm/ffi.rs b/src/librustc_llvm/ffi.rs index 50c68d5e75eef..302c0ce6c5408 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 a23fd3ab8b395..813915bfd6eab 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/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 672ab117f15f3..369388caa0496 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(VarInfo), - Builder->createExpression( - llvm::ArrayRef(AddrOps, AddrOpsCount)), - DebugLoc(cast(unwrap(DL)->getMetadata())), - unwrap(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) { From e4e444a26ba1597f99e4537f2aaa389509543efc Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Fri, 14 Oct 2016 16:01:58 -0400 Subject: [PATCH 2/8] Fix make check-stage1 by conditionally activating question_mark feature for compiletest tool. --- src/tools/compiletest/src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 81478c18d7b24..e6efd45cad186 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; From a1b50ad6730f0f393847d14625811a75b4be36bf Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Sat, 15 Oct 2016 19:13:49 +0530 Subject: [PATCH 3/8] Updated the docs for Error::description --- src/libstd/error.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 398bb55ea1bf6..5702d6aefdffe 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 /// From 57583722f6aac832ee358a58a29f4da77f3ce597 Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Sat, 15 Oct 2016 21:30:09 +0530 Subject: [PATCH 4/8] Corrected broken markdown link --- src/libstd/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 5702d6aefdffe..8b953a1ea5285 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -69,7 +69,7 @@ pub trait Error: Debug + Display { /// 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]. + /// [Display](https://doc.rust-lang.org/std/fmt/trait.Display.html).s /// /// # Examples /// From 16b8957df425bbde4a3739a025a1573b13f6bd6b Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Sat, 15 Oct 2016 22:56:07 +0530 Subject: [PATCH 5/8] Fixed typo --- src/libstd/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 8b953a1ea5285..a1909b0f95789 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -69,7 +69,7 @@ pub trait Error: Debug + Display { /// 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).s + /// [Display](https://doc.rust-lang.org/std/fmt/trait.Display.html). /// /// # Examples /// From d001e8ad179b2d0b57272d1c875d93099fc347cb Mon Sep 17 00:00:00 2001 From: johnthagen Date: Sat, 15 Oct 2016 15:00:37 -0400 Subject: [PATCH 6/8] Remove un-rendered ticks from title. --- src/doc/book/const-and-static.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/book/const-and-static.md b/src/doc/book/const-and-static.md index 11aa25ac811c9..e8f17a41cbeab 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: From 06123d3afe0fe6e24863f0043d4d2e28bed482da Mon Sep 17 00:00:00 2001 From: "Zack M. Davis" Date: Sat, 15 Oct 2016 15:57:28 -0700 Subject: [PATCH 7/8] include LLVM version in `--version --verbose` This is in the matter of #28405. --- src/librustc_driver/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index f051c8692491f..6972bdac5e1bc 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()); + } } } From 187ddf30b08c8c38beae0f92b339d6b5fbd437c3 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 16 Oct 2016 14:40:56 +0200 Subject: [PATCH 8/8] Update comment in Vec::dedup_by --- src/libcollections/vec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 52fc8b9dd7049..f3d78c20a4d6b 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -822,7 +822,7 @@ impl Vec { pub fn dedup_by(&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