Skip to content

Rollup of 7 pull requests #38325

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

Merged
merged 18 commits into from
Dec 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
8b0b2b6
Add more examples to UpdSocket
GuillaumeGomez Nov 29, 2016
bee82e8
Avoid using locally installed Source Code Pro font (fixes #24355).
sourcefrog Dec 4, 2016
78fd220
ICH: Add test case for closure expressions.
michaelwoerister Dec 6, 2016
45b89b8
ICH: Add test case sensitive to function bodies in metadata.
michaelwoerister Dec 6, 2016
277675c
ICH: Add test case for indexing expressions.
michaelwoerister Dec 6, 2016
5c3a69e
ICH: Add test case for enum constructor expressions.
michaelwoerister Dec 6, 2016
9ccd5c5
ICH: Add missing annotations for struct constructor expr test case.
michaelwoerister Dec 6, 2016
f78aa4d
Run rustfmt on librustc_mir/hair/cx
srinivasreddy Oct 9, 2016
57f998a
Improve and fix mpsc documentation
Cobrand Nov 22, 2016
c6c3a27
rustdoc: Remove broken src links from reexported items from macros
ollie27 Dec 9, 2016
b7cd840
Handle Ctrl+C in the build script
achanda Dec 11, 2016
dc1a094
Rollup merge of #37052 - srinivasreddy:hair_cx, r=pnkfelix
frewsxcv Dec 12, 2016
8c3c9c2
Rollup merge of #37941 - Cobrand:docfix-issue-37915, r=GuillaumeGomez
frewsxcv Dec 12, 2016
3bd2c80
Rollup merge of #38067 - GuillaumeGomez:udp-doc, r=frewsxcv,nagisa
frewsxcv Dec 12, 2016
5e425b7
Rollup merge of #38164 - sourcefrog:fonts, r=GuillaumeGomez
frewsxcv Dec 12, 2016
a9dcfd0
Rollup merge of #38202 - michaelwoerister:closure-ich-test, r=nikomat…
frewsxcv Dec 12, 2016
e3363f2
Rollup merge of #38264 - ollie27:rustdoc_src_macro, r=brson
frewsxcv Dec 12, 2016
cba1304
Rollup merge of #38299 - achanda:ctrl-c, r=brson
frewsxcv Dec 12, 2016
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
4 changes: 3 additions & 1 deletion src/doc/rust.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 400;
src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
/* Avoid using locally installed font because bad versions are in circulation:
* see https://github.com/rust-lang/rust/issues/24355 */
src: url("SourceCodePro-Regular.woff") format('woff');
}

*:not(body) {
Expand Down
55 changes: 30 additions & 25 deletions src/librustc_mir/hair/cx/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,47 +26,52 @@ impl<'tcx> Mirror<'tcx> for &'tcx hir::Block {
extent: cx.tcx.region_maps.node_extent(self.id),
span: self.span,
stmts: stmts,
expr: self.expr.to_ref()
expr: self.expr.to_ref(),
}
}
}

fn mirror_stmts<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>,
block_id: ast::NodeId,
stmts: &'tcx [hir::Stmt])
-> Vec<StmtRef<'tcx>>
{
-> Vec<StmtRef<'tcx>> {
let mut result = vec![];
for (index, stmt) in stmts.iter().enumerate() {
match stmt.node {
hir::StmtExpr(ref expr, id) | hir::StmtSemi(ref expr, id) =>
hir::StmtExpr(ref expr, id) |
hir::StmtSemi(ref expr, id) => {
result.push(StmtRef::Mirror(Box::new(Stmt {
span: stmt.span,
kind: StmtKind::Expr {
scope: cx.tcx.region_maps.node_extent(id),
expr: expr.to_ref()
expr: expr.to_ref(),
},
})))
}
hir::StmtDecl(ref decl, id) => {
match decl.node {
hir::DeclItem(..) => {
// ignore for purposes of the MIR
}
}))),
hir::StmtDecl(ref decl, id) => match decl.node {
hir::DeclItem(..) => { /* ignore for purposes of the MIR */ }
hir::DeclLocal(ref local) => {
let remainder_extent = CodeExtentData::Remainder(BlockRemainder {
block: block_id,
first_statement_index: index as u32,
});
let remainder_extent =
cx.tcx.region_maps.lookup_code_extent(remainder_extent);
hir::DeclLocal(ref local) => {
let remainder_extent = CodeExtentData::Remainder(BlockRemainder {
block: block_id,
first_statement_index: index as u32,
});
let remainder_extent =
cx.tcx.region_maps.lookup_code_extent(remainder_extent);

let pattern = Pattern::from_hir(cx.tcx, &local.pat);
result.push(StmtRef::Mirror(Box::new(Stmt {
span: stmt.span,
kind: StmtKind::Let {
remainder_scope: remainder_extent,
init_scope: cx.tcx.region_maps.node_extent(id),
pattern: pattern,
initializer: local.init.to_ref(),
},
})));
let pattern = Pattern::from_hir(cx.tcx, &local.pat);
result.push(StmtRef::Mirror(Box::new(Stmt {
span: stmt.span,
kind: StmtKind::Let {
remainder_scope: remainder_extent,
init_scope: cx.tcx.region_maps.node_extent(id),
pattern: pattern,
initializer: local.init.to_ref(),
},
})));
}
}
}
}
Expand Down
Loading