Skip to content

Rollup of 15 pull requests #55371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
2747775
[ci] add qemu-system-arm in docker image
sekineh Aug 29, 2018
502023a
[ci] thumbv7m-none-eabi: build lm3s6965evb and runon QEMU
sekineh Sep 2, 2018
719a592
[ci] thumbv7m-none-eabi: add more variable.
sekineh Sep 3, 2018
a04754f
[ci] run-make/thumb-none-qemu: uses cortex-m-rt crate.
sekineh Sep 30, 2018
fdf4d6e
[ci] run-make/thumb-none-qemu: add thumbv6m-none-qemu
sekineh Sep 30, 2018
8b097c4
Don't try to promote already promoted out temporaries
oli-obk Oct 4, 2018
7d3d835
replace escape-rust-expr test with dont-show-const-contents
Munksgaard Oct 4, 2018
f97e094
Add compile flags to playground-empty test
Munksgaard Oct 4, 2018
46ccce0
Remove duplicate test line
Munksgaard Oct 5, 2018
5f8dc0d
Fix unneeded-trait-implementations-title test
Munksgaard Oct 5, 2018
a9a26de
Fix redirect.rs test
Munksgaard Oct 5, 2018
28596ad
Fix empty-section.rs test
Munksgaard Oct 5, 2018
e961d39
Add line numbers option to rustdoc
GuillaumeGomez Oct 8, 2018
5b0f486
[ci] run-make/thumb-none-qemu: transfer logic to script.sh
sekineh Oct 10, 2018
a4faa5e
[ci] run-make/thumb-none-qemu: transfer logic to script.sh (2)
sekineh Oct 10, 2018
e8bc04e
Use XPATH notation to match against flattened nodes
Munksgaard Oct 10, 2018
9dbe902
Fix issue-46767 test
Munksgaard Oct 10, 2018
df79da9
Fix typo in deprecated_impls
Munksgaard Oct 10, 2018
a9217e3
Fix typo in issue-13698.rs
Munksgaard Oct 10, 2018
8d2b2ee
[ci] run-make/thumb-none-qemu: add example crate.
sekineh Oct 16, 2018
f40fd4b
[ci] run both debug and release
sekineh Oct 16, 2018
3064e0a
[ci] fix tidy warning.
sekineh Oct 16, 2018
06d0a71
[ci] clean up potentially harmful envs
sekineh Oct 16, 2018
7cac7b6
[ci] run-make/thumb-none-qemu: use GNU LD.
sekineh Oct 17, 2018
35bbcf1
[ci] fix tidy warning.
sekineh Oct 18, 2018
9f0a352
Turn ICE for dangling pointers into error
oli-obk Oct 22, 2018
0ba1262
Reproduce the underlying issue
oli-obk Oct 22, 2018
80a6b73
Unimplement ExactSizeIterator
sinkuu Oct 22, 2018
b5336c0
Add a cheap mode for `compute_missing_ctors`.
nnethercote Oct 17, 2018
4f2624c
Fix Rustdoc ICE when checking blanket impls
Aaron1011 Oct 22, 2018
2d960a5
Update dangling-alloc-id-ice-2.rs
oli-obk Oct 23, 2018
8544db0
Add macro call span when lacking any other span in diagnostic
estebank Oct 23, 2018
ad144ac
Modify invalid macro in expression context diagnostic
estebank Oct 23, 2018
8227a93
Point at macro definition when no rules expect token
estebank Oct 24, 2018
1ab45ec
Point to macro def span instead of whole body
estebank Oct 24, 2018
c2463af
Typo
oli-obk Oct 24, 2018
569228a
Fix link to macros chapter
steveklabnik Oct 24, 2018
f8818cb
Fix incorrect semicolon suggestion
estebank Oct 24, 2018
bbc3cd4
rustbuild: fix remap-debuginfo when building a release
Keruspe Oct 25, 2018
ee26e8e
Update RELEASES.md
frewsxcv Oct 25, 2018
f7629ef
Explain a comment in more detail
oli-obk Oct 25, 2018
4dc0287
Explain why we can encounter a `Goto` terminator that we want to promote
oli-obk Oct 25, 2018
f4fe9b0
Clarify exclusion comment further
oli-obk Oct 25, 2018
2cfd790
List allowed tokens after macro fragments
estebank Oct 24, 2018
ee7f4a2
Grammar nit
oli-obk Oct 25, 2018
fd77500
Clear up nonpromotable const fn call qualification
oli-obk Oct 25, 2018
38d9277
Shrink `Statement`.
nnethercote Oct 25, 2018
5f7c8e1
Rollup merge of #53996 - sekineh:thumb-run, r=japaric
kennytm Oct 26, 2018
1960de0
Rollup merge of #54816 - oli-obk:double_promotion, r=alexreg
kennytm Oct 26, 2018
ae9f012
Rollup merge of #54824 - Munksgaard:fix-49713, r=QuietMisdreavus
kennytm Oct 26, 2018
9e6165c
Rollup merge of #54921 - GuillaumeGomez:line-numbers, r=QuietMisdreavus
kennytm Oct 26, 2018
386f6c3
Rollup merge of #55167 - nnethercote:is_missing_ctors_empty, r=varkor
kennytm Oct 26, 2018
3d436d4
Rollup merge of #55258 - Aaron1011:fix/rustdoc-blanket, r=GuillaumeGomez
kennytm Oct 26, 2018
2a7fff1
Rollup merge of #55262 - oli-obk:dangling_alloc_id_ice, r=RalfJung
kennytm Oct 26, 2018
b95d4d2
Rollup merge of #55271 - sinkuu:traversal_iter, r=matthewjasper
kennytm Oct 26, 2018
02dd239
Rollup merge of #55292 - estebank:macro-eof, r=pnkfelix
kennytm Oct 26, 2018
dadf5a5
Rollup merge of #55298 - estebank:macro-def, r=pnkfelix
kennytm Oct 26, 2018
5b2512f
Rollup merge of #55301 - estebank:macro-allowed, r=petrochenkov
kennytm Oct 26, 2018
3878d24
Remove redundant clone
sinkuu Oct 25, 2018
28c890e
Rollup merge of #55325 - rust-lang:steveklabnik-patch-1, r=frewsxcv
kennytm Oct 26, 2018
c224599
Rollup merge of #55343 - Keruspe:remap-debuginfo-release, r=alexcrichton
kennytm Oct 26, 2018
786d05f
Rollup merge of #55346 - nnethercote:shrink-StatementKind, r=nagisa
kennytm Oct 26, 2018
6fae1b1
Rollup merge of #55358 - sinkuu:redundant_clone2, r=estebank
kennytm Oct 26, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Misc
[cargo/5878]: https://github.com/rust-lang/cargo/pull/5878/
[cargo/5984]: https://github.com/rust-lang/cargo/pull/5984/
[cargo/5995]: https://github.com/rust-lang/cargo/pull/5995/
[proc-macros]: https://doc.rust-lang.org/book/2018-edition/ch19-06-macros.html
[proc-macros]: https://doc.rust-lang.org/nightly/book/2018-edition/ch19-06-macros.html

[`Ipv4Addr::BROADCAST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.BROADCAST
[`Ipv4Addr::LOCALHOST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.LOCALHOST
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,8 +1447,8 @@ impl Step for Extended {
tarballs.extend(rls_installer.clone());
tarballs.extend(clippy_installer.clone());
tarballs.extend(rustfmt_installer.clone());
tarballs.extend(llvm_tools_installer.clone());
tarballs.extend(lldb_installer.clone());
tarballs.extend(llvm_tools_installer);
tarballs.extend(lldb_installer);
tarballs.push(analysis_installer);
tarballs.push(std_installer);
if builder.config.docs {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ impl Build {

let path = match which {
GitRepo::Rustc => {
let sha = self.rust_info.sha().expect("failed to find sha");
let sha = self.rust_sha().unwrap_or(channel::CFG_RELEASE_NUM);
format!("/rustc/{}", sha)
}
GitRepo::Llvm => format!("/rustc/llvm"),
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ impl Step for Compiletest {
let hostflags = flags.clone();
cmd.arg("--host-rustcflags").arg(hostflags.join(" "));

let mut targetflags = flags.clone();
let mut targetflags = flags;
targetflags.push(format!(
"-Lnative={}",
builder.test_helpers_out(target).display()
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/dist-various-1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi
libnewlib-arm-none-eabi \
qemu-system-arm

WORKDIR /build

Expand Down
10 changes: 9 additions & 1 deletion src/librustc/infer/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ impl<'infcx, 'gcx, 'tcx> CombineFields<'infcx, 'gcx, 'tcx> {
dir: RelationDir)
-> RelateResult<'tcx, Generalization<'tcx>>
{
debug!("generalize(ty={:?}, for_vid={:?}, dir={:?}", ty, for_vid, dir);
// Determine the ambient variance within which `ty` appears.
// The surrounding equation is:
//
Expand All @@ -273,8 +274,15 @@ impl<'infcx, 'gcx, 'tcx> CombineFields<'infcx, 'gcx, 'tcx> {
root_ty: ty,
};

let ty = generalize.relate(&ty, &ty)?;
let ty = match generalize.relate(&ty, &ty) {
Ok(ty) => ty,
Err(e) => {
debug!("generalize: failure {:?}", e);
return Err(e);
}
};
let needs_wf = generalize.needs_wf;
debug!("generalize: success {{ {:?}, {:?} }}", ty, needs_wf);
Ok(Generalization { ty, needs_wf })
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/librustc/infer/equate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ impl<'combine, 'infcx, 'gcx, 'tcx> TypeRelation<'infcx, 'gcx, 'tcx>
let infcx = self.fields.infcx;
let a = infcx.type_variables.borrow_mut().replace_if_possible(a);
let b = infcx.type_variables.borrow_mut().replace_if_possible(b);

debug!("{}.tys: replacements ({:?}, {:?})", self.tag(), a, b);

match (&a.sty, &b.sty) {
(&ty::Infer(TyVar(a_id)), &ty::Infer(TyVar(b_id))) => {
infcx.type_variables.borrow_mut().equate(a_id, b_id);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/outlives/obligations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ where
);
debug!("projection_must_outlive: unique declared bound appears in trait ref");
self.delegate
.push_sub_region_constraint(origin.clone(), region, unique_bound);
.push_sub_region_constraint(origin, region, unique_bound);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/infer/region_constraints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
a // LUB(a,a) = a
}

_ => self.combine_vars(tcx, Lub, a, b, origin.clone()),
_ => self.combine_vars(tcx, Lub, a, b, origin),
}
}

Expand All @@ -771,7 +771,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
a // GLB(a,a) = a
}

_ => self.combine_vars(tcx, Glb, a, b, origin.clone()),
_ => self.combine_vars(tcx, Glb, a, b, origin),
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,10 @@ impl<'tcx> Statement<'tcx> {
/// Changes a statement to a nop. This is both faster than deleting instructions and avoids
/// invalidating statement indices in `Location`s.
pub fn make_nop(&mut self) {
// `Statement` contributes significantly to peak memory usage. Make
// sure it doesn't get bigger.
static_assert!(STATEMENT_IS_AT_MOST_56_BYTES: mem::size_of::<Statement<'_>>() <= 56);

self.kind = StatementKind::Nop
}

Expand Down Expand Up @@ -1737,7 +1741,7 @@ pub enum StatementKind<'tcx> {
/// - `Contravariant` -- requires that `T_y :> T`
/// - `Invariant` -- requires that `T_y == T`
/// - `Bivariant` -- no effect
AscribeUserType(Place<'tcx>, ty::Variance, UserTypeAnnotation<'tcx>),
AscribeUserType(Place<'tcx>, ty::Variance, Box<UserTypeAnnotation<'tcx>>),

/// No-op. Useful for deleting instructions without affecting statement indices.
Nop,
Expand Down
36 changes: 24 additions & 12 deletions src/librustc/mir/traversal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub struct Preorder<'a, 'tcx: 'a> {
mir: &'a Mir<'tcx>,
visited: BitSet<BasicBlock>,
worklist: Vec<BasicBlock>,
root_is_start_block: bool,
}

impl<'a, 'tcx> Preorder<'a, 'tcx> {
Expand All @@ -44,6 +45,7 @@ impl<'a, 'tcx> Preorder<'a, 'tcx> {
mir,
visited: BitSet::new_empty(mir.basic_blocks().len()),
worklist,
root_is_start_block: root == START_BLOCK,
}
}
}
Expand Down Expand Up @@ -75,15 +77,19 @@ impl<'a, 'tcx> Iterator for Preorder<'a, 'tcx> {

fn size_hint(&self) -> (usize, Option<usize>) {
// All the blocks, minus the number of blocks we've visited.
let remaining = self.mir.basic_blocks().len() - self.visited.count();
let upper = self.mir.basic_blocks().len() - self.visited.count();

// We will visit all remaining blocks exactly once.
(remaining, Some(remaining))
let lower = if self.root_is_start_block {
// We will visit all remaining blocks exactly once.
upper
} else {
self.worklist.len()
};

(lower, Some(upper))
}
}

impl<'a, 'tcx> ExactSizeIterator for Preorder<'a, 'tcx> {}

/// Postorder traversal of a graph.
///
/// Postorder traversal is when each node is visited after all of it's
Expand All @@ -105,15 +111,17 @@ impl<'a, 'tcx> ExactSizeIterator for Preorder<'a, 'tcx> {}
pub struct Postorder<'a, 'tcx: 'a> {
mir: &'a Mir<'tcx>,
visited: BitSet<BasicBlock>,
visit_stack: Vec<(BasicBlock, Successors<'a>)>
visit_stack: Vec<(BasicBlock, Successors<'a>)>,
root_is_start_block: bool,
}

impl<'a, 'tcx> Postorder<'a, 'tcx> {
pub fn new(mir: &'a Mir<'tcx>, root: BasicBlock) -> Postorder<'a, 'tcx> {
let mut po = Postorder {
mir,
visited: BitSet::new_empty(mir.basic_blocks().len()),
visit_stack: Vec::new()
visit_stack: Vec::new(),
root_is_start_block: root == START_BLOCK,
};


Expand Down Expand Up @@ -214,15 +222,19 @@ impl<'a, 'tcx> Iterator for Postorder<'a, 'tcx> {

fn size_hint(&self) -> (usize, Option<usize>) {
// All the blocks, minus the number of blocks we've visited.
let remaining = self.mir.basic_blocks().len() - self.visited.count();
let upper = self.mir.basic_blocks().len() - self.visited.count();

// We will visit all remaining blocks exactly once.
(remaining, Some(remaining))
let lower = if self.root_is_start_block {
// We will visit all remaining blocks exactly once.
upper
} else {
self.visit_stack.len()
};

(lower, Some(upper))
}
}

impl<'a, 'tcx> ExactSizeIterator for Postorder<'a, 'tcx> {}

/// Reverse postorder traversal of a graph
///
/// Reverse postorder is the reverse order of a postorder traversal.
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/traits/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {

let msg = format!("type mismatch resolving `{}`", predicate);
let error_id = (DiagnosticMessageId::ErrorId(271),
Some(obligation.cause.span), msg.clone());
Some(obligation.cause.span), msg);
let fresh = self.tcx.sess.one_time_diagnostics.borrow_mut().insert(error_id);
if fresh {
let mut diag = struct_span_err!(
Expand Down Expand Up @@ -379,7 +379,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
}
}
if let Some(t) = self.get_parent_trait_ref(&obligation.cause.code) {
flags.push(("parent_trait".to_owned(), Some(t.to_string())));
flags.push(("parent_trait".to_owned(), Some(t)));
}

if let Some(k) = obligation.cause.span.compiler_desugaring_kind() {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ fn opt_normalize_projection_type<'a, 'b, 'gcx, 'tcx>(

// But for now, let's classify this as an overflow:
let recursion_limit = *selcx.tcx().sess.recursion_limit.get();
let obligation = Obligation::with_depth(cause.clone(),
let obligation = Obligation::with_depth(cause,
recursion_limit,
param_env,
projection_ty);
Expand Down
35 changes: 35 additions & 0 deletions src/librustc/traits/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,33 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
.map(|v| v.get(tcx))
}

/// Determines whether can we safely cache the result
/// of selecting an obligation. This is almost always 'true',
/// except when dealing with certain ParamCandidates.
///
/// Ordinarily, a ParamCandidate will contain no inference variables,
/// since it was usually produced directly from a DefId. However,
/// certain cases (currently only librustdoc's blanket impl finder),
/// a ParamEnv may be explicitly constructed with inference types.
/// When this is the case, we do *not* want to cache the resulting selection
/// candidate. This is due to the fact that it might not always be possible
/// to equate the obligation's trait ref and the candidate's trait ref,
/// if more constraints end up getting added to an inference variable.
///
/// Because of this, we always want to re-run the full selection
/// process for our obligation the next time we see it, since
/// we might end up picking a different SelectionCandidate (or none at all)
fn can_cache_candidate(&self,
result: &SelectionResult<'tcx, SelectionCandidate<'tcx>>
) -> bool {
match result {
Ok(Some(SelectionCandidate::ParamCandidate(trait_ref))) => {
!trait_ref.skip_binder().input_types().any(|t| t.walk().any(|t_| t_.is_ty_infer()))
},
_ => true
}
}

fn insert_candidate_cache(
&mut self,
param_env: ty::ParamEnv<'tcx>,
Expand All @@ -1531,6 +1558,14 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
) {
let tcx = self.tcx();
let trait_ref = cache_fresh_trait_pred.skip_binder().trait_ref;

if !self.can_cache_candidate(&candidate) {
debug!("insert_candidate_cache(trait_ref={:?}, candidate={:?} -\
candidate is not cacheable", trait_ref, candidate);
return;

}

if self.can_use_global_caches(param_env) {
if let Err(Overflow) = candidate {
// Don't cache overflow globally; we only produce this
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
cstore,
global_arenas: &arenas.global,
global_interners: interners,
dep_graph: dep_graph.clone(),
dep_graph,
types: common_types,
trait_map,
export_map: resolutions.export_map.into_iter().map(|(k, v)| {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_borrowck/borrowck/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
let mut err = self.cannot_act_on_moved_value(use_span,
verb,
msg,
Some(nl.to_string()),
Some(nl),
Origin::Ast);
let need_note = match lp.ty.sty {
ty::Closure(id, _) => {
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_borrowck/borrowck/move_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ impl<'a, 'tcx> MoveData<'tcx> {
lp = base_lp.clone();
}

self.add_move_helper(tcx, orig_lp.clone(), id, kind);
self.add_move_helper(tcx, orig_lp, id, kind);
}

fn add_move_helper(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>,
Expand All @@ -359,7 +359,7 @@ impl<'a, 'tcx> MoveData<'tcx> {
id,
kind);

let path_index = self.move_path(tcx, lp.clone());
let path_index = self.move_path(tcx, lp);
let move_index = MoveIndex(self.moves.borrow().len());

let next_move = self.path_first_move(path_index);
Expand Down Expand Up @@ -402,7 +402,7 @@ impl<'a, 'tcx> MoveData<'tcx> {
}
}

self.add_assignment_helper(tcx, lp.clone(), assign_id, span);
self.add_assignment_helper(tcx, lp, assign_id, span);
}

fn add_assignment_helper(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ pub fn codegen_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
!tcx.sess.opts.output_types.should_codegen() {
let ongoing_codegen = write::start_async_codegen(
tcx,
time_graph.clone(),
time_graph,
metadata,
rx,
1);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_utils/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ pub fn filename_for_input(sess: &Session,
let suffix = &sess.target.target.options.exe_suffix;
let out_filename = outputs.path(OutputType::Exe);
if suffix.is_empty() {
out_filename.to_path_buf()
out_filename
} else {
out_filename.with_extension(&suffix[1..])
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
ProjectionElem::Index(..)
| ProjectionElem::ConstantIndex { .. }
| ProjectionElem::Subslice { .. } => {
self.describe_field(&proj.base, field).to_string()
self.describe_field(&proj.base, field)
}
},
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/nll/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
);
};
}
StatementKind::AscribeUserType(ref place, variance, c_ty) => {
StatementKind::AscribeUserType(ref place, variance, box c_ty) => {
let place_ty = place.ty(mir, tcx).to_ty(tcx);
if let Err(terr) = self.relate_type_and_user_type(
place_ty,
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/build/expr/as_place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
kind: StatementKind::AscribeUserType(
place.clone(),
Variance::Invariant,
user_ty,
box user_ty,
),
},
);
Expand All @@ -167,7 +167,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
kind: StatementKind::AscribeUserType(
Place::Local(temp.clone()),
Variance::Invariant,
user_ty,
box user_ty,
),
},
);
Expand Down
Loading