Skip to content

Commit 51b37b8

Browse files
committed
---
yaml --- r: 273373 b: refs/heads/beta c: 1138866 h: refs/heads/master i: 273371: fa36d0e
1 parent 5854794 commit 51b37b8

28 files changed

+242
-508
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 015d3b70929a31af48d056a8e05d113e362339e9
26+
refs/heads/beta: 1138866b1fe10127e910ce246d7c741bf51a6a04
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/bootstrap/build/native.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ pub fn llvm(build: &Build, target: &str) {
3939

4040
let _ = fs::remove_dir_all(&dst.join("build"));
4141
t!(fs::create_dir_all(&dst.join("build")));
42-
let mut assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
43-
44-
// Disable LLVM assertions on ARM compilers until #32360 is fixed
45-
if target.contains("arm") && target.contains("gnu") {
46-
assertions = "OFF";
47-
}
42+
let assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
4843

4944
// http://llvm.org/docs/CMake.html
5045
let mut cfg = cmake::Config::new(build.src.join("src/llvm"));

branches/beta/src/librustc/middle/infer/error_reporting.rs

Lines changed: 76 additions & 138 deletions
Large diffs are not rendered by default.

branches/beta/src/librustc/middle/infer/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ pub fn common_supertype<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>,
407407
match result {
408408
Ok(t) => t,
409409
Err(ref err) => {
410-
cx.report_and_explain_type_error(trace, err).emit();
410+
cx.report_and_explain_type_error(trace, err);
411411
cx.tcx.types.err
412412
}
413413
}
@@ -1396,7 +1396,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
13961396
found: actual
13971397
})
13981398
};
1399-
self.report_and_explain_type_error(trace, &err).emit();
1399+
self.report_and_explain_type_error(trace, &err);
14001400
}
14011401

14021402
pub fn report_conflicting_default_types(&self,
@@ -1411,13 +1411,11 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
14111411
})
14121412
};
14131413

1414-
self.report_and_explain_type_error(
1415-
trace,
1414+
self.report_and_explain_type_error(trace,
14161415
&TypeError::TyParamDefaultMismatch(ExpectedFound {
14171416
expected: expected,
14181417
found: actual
1419-
}))
1420-
.emit();
1418+
}));
14211419
}
14221420

14231421
pub fn replace_late_bound_regions_with_fresh_var<T>(

branches/beta/src/librustc/middle/infer/region_inference/mod.rs

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub use self::CombineMapType::*;
1717
pub use self::RegionResolutionError::*;
1818
pub use self::VarValue::*;
1919

20-
use super::{RegionVariableOrigin, SubregionOrigin, MiscVariable};
20+
use super::{RegionVariableOrigin, SubregionOrigin, TypeTrace, MiscVariable};
2121
use super::unify_key;
2222

2323
use rustc_data_structures::graph::{self, Direction, NodeIndex};
@@ -27,6 +27,7 @@ use middle::ty::{self, Ty, TyCtxt};
2727
use middle::ty::{BoundRegion, Region, RegionVid};
2828
use middle::ty::{ReEmpty, ReStatic, ReFree, ReEarlyBound};
2929
use middle::ty::{ReLateBound, ReScope, ReVar, ReSkolemized, BrFresh};
30+
use middle::ty::error::TypeError;
3031
use util::common::indenter;
3132
use util::nodemap::{FnvHashMap, FnvHashSet};
3233

@@ -151,16 +152,11 @@ pub enum RegionResolutionError<'tcx> {
151152
/// more specific errors message by suggesting to the user where they
152153
/// should put a lifetime. In those cases we process and put those errors
153154
/// into `ProcessedErrors` before we do any reporting.
154-
ProcessedErrors(Vec<ProcessedErrorOrigin<'tcx>>,
155+
ProcessedErrors(Vec<RegionVariableOrigin>,
156+
Vec<(TypeTrace<'tcx>, TypeError<'tcx>)>,
155157
Vec<SameRegions>),
156158
}
157159

158-
#[derive(Clone, Debug)]
159-
pub enum ProcessedErrorOrigin<'tcx> {
160-
ConcreteFailure(SubregionOrigin<'tcx>, Region, Region),
161-
VariableFailure(RegionVariableOrigin),
162-
}
163-
164160
/// SameRegions is used to group regions that we think are the same and would
165161
/// like to indicate so to the user.
166162
/// For example, the following function
@@ -534,14 +530,16 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> {
534530
assert!(self.values_are_none());
535531

536532
debug!("RegionVarBindings: lub_regions({:?}, {:?})", a, b);
537-
if a == ty::ReStatic || b == ty::ReStatic {
538-
ReStatic // nothing lives longer than static
539-
} else if a == b {
540-
a // LUB(a,a) = a
541-
} else {
542-
self.combine_vars(Lub, a, b, origin.clone(), |this, old_r, new_r| {
543-
this.make_subregion(origin.clone(), old_r, new_r)
544-
})
533+
match (a, b) {
534+
(ReStatic, _) | (_, ReStatic) => {
535+
ReStatic // nothing lives longer than static
536+
}
537+
538+
_ => {
539+
self.combine_vars(Lub, a, b, origin.clone(), |this, old_r, new_r| {
540+
this.make_subregion(origin.clone(), old_r, new_r)
541+
})
542+
}
545543
}
546544
}
547545

@@ -552,11 +550,8 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> {
552550
debug!("RegionVarBindings: glb_regions({:?}, {:?})", a, b);
553551
match (a, b) {
554552
(ReStatic, r) | (r, ReStatic) => {
555-
r // static lives longer than everything else
556-
}
557-
558-
_ if a == b => {
559-
a // GLB(a,a) = a
553+
// static lives longer than everything else
554+
r
560555
}
561556

562557
_ => {

branches/beta/src/librustc_resolve/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3625,7 +3625,7 @@ fn show_candidates(session: &mut DiagnosticBuilder,
36253625
if paths.len() == 1 {
36263626
session.fileline_help(
36273627
span,
3628-
&format!("you can to import it into scope: `use {};`.",
3628+
&format!("you can import it into scope: `use {};`.",
36293629
&path_strings[0]),
36303630
);
36313631
} else {

0 commit comments

Comments
 (0)