Skip to content

Commit

Permalink
Auto merge of #37237 - GuillaumeGomez:rollup, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
Rollup of 6 pull requests

- Successful merges: #37172, #37177, #37189, #37194, #37200, #37215
- Failed merges:
  • Loading branch information
bors committed Oct 18, 2016
2 parents e011175 + b097790 commit 1d3dfa5
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 38 deletions.
2 changes: 1 addition & 1 deletion src/doc/book/const-and-static.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% `const` and `static`
% const and static

Rust has a way of defining constants with the `const` keyword:

Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}

Expand Down
11 changes: 0 additions & 11 deletions src/librustc_llvm/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1817,8 +1817,6 @@ extern {
Ty: DIType,
AlwaysPreserve: bool,
Flags: c_uint,
AddrOps: *const i64,
AddrOpsCount: c_uint,
ArgNo: c_uint)
-> DIVariable;

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_trans/debuginfo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 5 additions & 3 deletions src/libstd/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
21 changes: 1 addition & 20 deletions src/rustllvm/RustWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -1302,7 +1283,7 @@ static LLVMLinkage from_rust(LLVMRustLinkage linkage) {
return LLVMCommonLinkage;
default:
llvm_unreachable("Invalid LLVMRustLinkage value!");
}
}
}

extern "C" LLVMRustLinkage LLVMRustGetLinkage(LLVMValueRef V) {
Expand Down
2 changes: 2 additions & 0 deletions src/tools/compiletest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#![feature(test)]
#![feature(libc)]

#![cfg_attr(stage0, feature(question_mark))]

#![deny(warnings)]

extern crate libc;
Expand Down

0 comments on commit 1d3dfa5

Please sign in to comment.