Skip to content

Commit 1d3dfa5

Browse files
authored
Auto merge of #37237 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 6 pull requests - Successful merges: #37172, #37177, #37189, #37194, #37200, #37215 - Failed merges:
2 parents e011175 + b097790 commit 1d3dfa5

File tree

8 files changed

+14
-38
lines changed

8 files changed

+14
-38
lines changed

src/doc/book/const-and-static.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% `const` and `static`
1+
% const and static
22

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

src/libcollections/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ impl<T> Vec<T> {
822822
pub fn dedup_by<F>(&mut self, mut same_bucket: F) where F: FnMut(&mut T, &mut T) -> bool {
823823
unsafe {
824824
// Although we have a mutable reference to `self`, we cannot make
825-
// *arbitrary* changes. The `PartialEq` comparisons could panic, so we
825+
// *arbitrary* changes. The `same_bucket` calls could panic, so we
826826
// must ensure that the vector is in a valid state at all time.
827827
//
828828
// The way that we handle this is by using swaps; we iterate

src/librustc_driver/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,10 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
729729
println!("commit-date: {}", unw(commit_date_str()));
730730
println!("host: {}", config::host_triple());
731731
println!("release: {}", unw(release_str()));
732+
unsafe {
733+
println!("LLVM version: {}.{}",
734+
llvm::LLVMRustVersionMajor(), llvm::LLVMRustVersionMinor());
735+
}
732736
}
733737
}
734738

src/librustc_llvm/ffi.rs

-11
Original file line numberDiff line numberDiff line change
@@ -1817,8 +1817,6 @@ extern {
18171817
Ty: DIType,
18181818
AlwaysPreserve: bool,
18191819
Flags: c_uint,
1820-
AddrOps: *const i64,
1821-
AddrOpsCount: c_uint,
18221820
ArgNo: c_uint)
18231821
-> DIVariable;
18241822

@@ -1855,15 +1853,6 @@ extern {
18551853
InsertAtEnd: BasicBlockRef)
18561854
-> ValueRef;
18571855

1858-
pub fn LLVMRustDIBuilderInsertDeclareBefore(Builder: DIBuilderRef,
1859-
Val: ValueRef,
1860-
VarInfo: DIVariable,
1861-
AddrOps: *const i64,
1862-
AddrOpsCount: c_uint,
1863-
DL: ValueRef,
1864-
InsertBefore: ValueRef)
1865-
-> ValueRef;
1866-
18671856
pub fn LLVMRustDIBuilderCreateEnumerator(Builder: DIBuilderRef,
18681857
Name: *const c_char,
18691858
Val: u64)

src/librustc_trans/debuginfo/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,6 @@ pub fn declare_local<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
482482
type_metadata,
483483
cx.sess().opts.optimize != config::OptLevel::No,
484484
0,
485-
address_operations.as_ptr(),
486-
address_operations.len() as c_uint,
487485
argument_index)
488486
};
489487
source_loc::set_debug_location(cx, None,

src/libstd/error.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ use string;
6565
pub trait Error: Debug + Display {
6666
/// A short description of the error.
6767
///
68-
/// The description should not contain newlines or sentence-ending
69-
/// punctuation, to facilitate embedding in larger user-facing
70-
/// strings.
68+
/// The description should only be used for a simple message.
69+
/// It should not contain newlines or sentence-ending punctuation,
70+
/// to facilitate embedding in larger user-facing strings.
71+
/// For showing formatted error messages with more information see
72+
/// [Display](https://doc.rust-lang.org/std/fmt/trait.Display.html).
7173
///
7274
/// # Examples
7375
///

src/rustllvm/RustWrapper.cpp

+1-20
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,6 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateVariable(
562562
LLVMRustMetadataRef Ty,
563563
bool AlwaysPreserve,
564564
unsigned Flags,
565-
int64_t* AddrOps,
566-
unsigned AddrOpsCount,
567565
unsigned ArgNo) {
568566
#if LLVM_VERSION_GE(3, 8)
569567
if (Tag == 0x100) { // DW_TAG_auto_variable
@@ -645,23 +643,6 @@ extern "C" LLVMValueRef LLVMRustDIBuilderInsertDeclareAtEnd(
645643
unwrap(InsertAtEnd)));
646644
}
647645

648-
extern "C" LLVMValueRef LLVMRustDIBuilderInsertDeclareBefore(
649-
LLVMRustDIBuilderRef Builder,
650-
LLVMValueRef Val,
651-
LLVMRustMetadataRef VarInfo,
652-
int64_t* AddrOps,
653-
unsigned AddrOpsCount,
654-
LLVMValueRef DL,
655-
LLVMValueRef InsertBefore) {
656-
return wrap(Builder->insertDeclare(
657-
unwrap(Val),
658-
unwrap<DILocalVariable>(VarInfo),
659-
Builder->createExpression(
660-
llvm::ArrayRef<int64_t>(AddrOps, AddrOpsCount)),
661-
DebugLoc(cast<MDNode>(unwrap<MetadataAsValue>(DL)->getMetadata())),
662-
unwrap<Instruction>(InsertBefore)));
663-
}
664-
665646
extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateEnumerator(
666647
LLVMRustDIBuilderRef Builder,
667648
const char* Name,
@@ -1302,7 +1283,7 @@ static LLVMLinkage from_rust(LLVMRustLinkage linkage) {
13021283
return LLVMCommonLinkage;
13031284
default:
13041285
llvm_unreachable("Invalid LLVMRustLinkage value!");
1305-
}
1286+
}
13061287
}
13071288

13081289
extern "C" LLVMRustLinkage LLVMRustGetLinkage(LLVMValueRef V) {

src/tools/compiletest/src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#![feature(test)]
1616
#![feature(libc)]
1717

18+
#![cfg_attr(stage0, feature(question_mark))]
19+
1820
#![deny(warnings)]
1921

2022
extern crate libc;

0 commit comments

Comments
 (0)