mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #14689 - servo:rustup, r=Manishearth
Update to rustc 1.16.0-nightly (4ecc85beb 2016-12-28) <s>**This is not ready to land** since there is no corresponding Nightly build of Rust yet.</s> Update: we got a Nightly build on 2016-12-29: http://rusty-dash.com/nightlies I made these changes to check that https://github.com/rust-lang/rust/pull/38566 fixes https://github.com/rust-lang/rust/issues/38535 (which it does, yay!) so I might as well publish them, we’ll need them soon enough. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14689) <!-- Reviewable:end -->
This commit is contained in:
commit
9bdd0f401a
3 changed files with 14 additions and 8 deletions
|
@ -123,7 +123,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
|||
cx: &LateContext<'a, 'tcx>,
|
||||
kind: visit::FnKind,
|
||||
decl: &'tcx hir::FnDecl,
|
||||
body: &'tcx hir::Expr,
|
||||
body: &'tcx hir::Body,
|
||||
span: codemap::Span,
|
||||
id: ast::NodeId) {
|
||||
let in_new_function = match kind {
|
||||
|
@ -140,7 +140,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
|||
|
||||
for (arg, ty) in decl.inputs.iter().zip(ty.fn_args().0.iter()) {
|
||||
if is_unrooted_ty(cx, ty, false) {
|
||||
cx.span_lint(UNROOTED_MUST_ROOT, arg.ty.span, "Type must be rooted")
|
||||
cx.span_lint(UNROOTED_MUST_ROOT, arg.span, "Type must be rooted")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
|||
cx: cx,
|
||||
in_new_function: in_new_function,
|
||||
};
|
||||
visit::walk_expr(&mut visitor, body);
|
||||
visit::walk_expr(&mut visitor, &body.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
|
|||
}
|
||||
|
||||
fn visit_fn(&mut self, kind: visit::FnKind<'tcx>, decl: &'tcx hir::FnDecl,
|
||||
body: hir::ExprId, span: codemap::Span, id: ast::NodeId) {
|
||||
body: hir::BodyId, span: codemap::Span, id: ast::NodeId) {
|
||||
if let visit::FnKind::Closure(_) = kind {
|
||||
visit::walk_fn(self, kind, decl, body, span, id);
|
||||
}
|
||||
|
|
|
@ -23,10 +23,16 @@ pub fn match_ty_unwrap<'a>(ty: &'a ast::Ty, segments: &[&str]) -> Option<&'a [P<
|
|||
// which will compare them in reverse until one of them runs out of segments
|
||||
if seg.iter().rev().zip(segments.iter().rev()).all(|(a, b)| &*a.identifier.name.as_str() == *b) {
|
||||
match seg.last() {
|
||||
Some(&ast::PathSegment { parameters: ast::PathParameters::AngleBracketed(ref a), .. }) => {
|
||||
Some(&a.types)
|
||||
Some(&ast::PathSegment { parameters: Some(ref params), .. }) => {
|
||||
match **params {
|
||||
ast::PathParameters::AngleBracketed(ref a) => Some(&a.types),
|
||||
|
||||
// `Foo(A,B) -> C`
|
||||
ast::PathParameters::Parenthesized(_) => None,
|
||||
}
|
||||
}
|
||||
_ => None
|
||||
Some(&ast::PathSegment { parameters: None, .. }) => Some(&[]),
|
||||
None => None,
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
|
|
@ -1 +1 @@
|
|||
2016-12-19
|
||||
2016-12-29
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue