Skip to content

Commit 9d6520f

Browse files
authored
Auto merge of #35769 - eddyb:rollup, r=eddyb
Rollup of 12 pull requests - Successful merges: #35346, #35734, #35739, #35740, #35742, #35744, #35749, #35750, #35751, #35756, #35766, #35768 - Failed merges:
2 parents 169b612 + d69cd72 commit 9d6520f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+691
-79
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Read ["Installing Rust"] from [The Book].
1919
* `g++` 4.7 or later or `clang++` 3.x
2020
* `python` 2.7 (but not 3.x)
2121
* GNU `make` 3.81 or later
22-
* `cmake` 2.8.8 or later
22+
* `cmake` 3.4.3 or later
2323
* `curl`
2424
* `git`
2525

mk/cfg/mips-unknown-linux-uclibc.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# rustbuild-only target

mk/cfg/mipsel-unknown-linux-uclibc.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# rustbuild-only target

src/bootstrap/mk/Makefile.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ BOOTSTRAP := $(CFG_PYTHON) $(CFG_SRC_DIR)src/bootstrap/bootstrap.py $(BOOTSTRAP_
2222
all:
2323
$(Q)$(BOOTSTRAP)
2424

25+
# Don’t use $(Q) here, always show how to invoke the bootstrap script directly
26+
help:
27+
$(BOOTSTRAP) --help
28+
2529
clean:
2630
$(Q)$(BOOTSTRAP) --clean
2731

src/librustc/hir/map/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,13 @@ impl<'ast> Map<'ast> {
569569
}
570570
}
571571

572+
pub fn expect_impl_item(&self, id: NodeId) -> &'ast ImplItem {
573+
match self.find(id) {
574+
Some(NodeImplItem(item)) => item,
575+
_ => bug!("expected impl item, found {}", self.node_to_string(id))
576+
}
577+
}
578+
572579
pub fn expect_trait_item(&self, id: NodeId) -> &'ast TraitItem {
573580
match self.find(id) {
574581
Some(NodeTraitItem(item)) => item,

src/librustc/infer/error_reporting.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
523523
pub fn note_type_err(&self,
524524
diag: &mut DiagnosticBuilder<'tcx>,
525525
origin: TypeOrigin,
526+
secondary_span: Option<(Span, String)>,
526527
values: Option<ValuePairs<'tcx>>,
527528
terr: &TypeError<'tcx>)
528529
{
@@ -553,6 +554,9 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
553554
}
554555

555556
diag.span_label(span, &terr);
557+
if let Some((sp, msg)) = secondary_span {
558+
diag.span_label(sp, &msg);
559+
}
556560

557561
self.note_error_origin(diag, &origin);
558562
self.check_and_note_conflicting_crates(diag, terr, span);
@@ -569,7 +573,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
569573
self.tcx.sess, trace.origin.span(), E0308,
570574
"{}", trace.origin.as_failure_str()
571575
);
572-
self.note_type_err(&mut diag, trace.origin, Some(trace.values), terr);
576+
self.note_type_err(&mut diag, trace.origin, None, Some(trace.values), terr);
573577
diag
574578
}
575579

src/librustc/traits/error_reporting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
161161
self.tcx.sess, origin.span(), E0271,
162162
"type mismatch resolving `{}`", predicate
163163
);
164-
self.note_type_err(&mut diag, origin, values, err);
164+
self.note_type_err(&mut diag, origin, None, values, err);
165165
self.note_obligation_cause(&mut diag, obligation);
166166
diag.emit();
167167
});
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use target::{Target, TargetOptions, TargetResult};
12+
13+
pub fn target() -> TargetResult {
14+
Ok(Target {
15+
llvm_target: "mips-unknown-linux-uclibc".to_string(),
16+
target_endian: "big".to_string(),
17+
target_pointer_width: "32".to_string(),
18+
data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
19+
arch: "mips".to_string(),
20+
target_os: "linux".to_string(),
21+
target_env: "uclibc".to_string(),
22+
target_vendor: "unknown".to_string(),
23+
options: TargetOptions {
24+
cpu: "mips32r2".to_string(),
25+
features: "+mips32r2,+soft-float".to_string(),
26+
max_atomic_width: 32,
27+
..super::linux_base::opts()
28+
},
29+
})
30+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use target::{Target, TargetOptions, TargetResult};
12+
13+
pub fn target() -> TargetResult {
14+
Ok(Target {
15+
llvm_target: "mipsel-unknown-linux-uclibc".to_string(),
16+
target_endian: "little".to_string(),
17+
target_pointer_width: "32".to_string(),
18+
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(),
19+
arch: "mips".to_string(),
20+
target_os: "linux".to_string(),
21+
target_env: "uclibc".to_string(),
22+
target_vendor: "unknown".to_string(),
23+
24+
options: TargetOptions {
25+
cpu: "mips32".to_string(),
26+
features: "+mips32,+soft-float".to_string(),
27+
max_atomic_width: 32,
28+
..super::linux_base::opts()
29+
},
30+
})
31+
}

src/librustc_back/target/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ supported_targets! {
143143
("i686-unknown-linux-musl", i686_unknown_linux_musl),
144144
("mips-unknown-linux-musl", mips_unknown_linux_musl),
145145
("mipsel-unknown-linux-musl", mipsel_unknown_linux_musl),
146+
("mips-unknown-linux-uclibc", mips_unknown_linux_uclibc),
147+
("mipsel-unknown-linux-uclibc", mipsel_unknown_linux_uclibc),
146148

147149
("i686-linux-android", i686_linux_android),
148150
("arm-linux-androideabi", arm_linux_androideabi),

0 commit comments

Comments
 (0)