mirror of
https://github.com/servo/servo.git
synced 2025-06-19 14:48:59 +01:00
Upgrade to rustc 1.40.0-nightly (084beb83e 2019-09-27)
This commit is contained in:
parent
b0b01b86b8
commit
5b935a60a5
3 changed files with 5 additions and 5 deletions
|
@ -151,7 +151,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
|||
{
|
||||
return;
|
||||
}
|
||||
if let hir::ItemKind::Struct(def, ..) = &item.node {
|
||||
if let hir::ItemKind::Struct(def, ..) = &item.kind {
|
||||
for ref field in def.fields() {
|
||||
let def_id = cx.tcx.hir().local_def_id(field.hir_id);
|
||||
if is_unrooted_ty(&self.symbols, cx, cx.tcx.type_of(def_id), false) {
|
||||
|
@ -257,7 +257,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
|
|||
}
|
||||
};
|
||||
|
||||
match expr.node {
|
||||
match expr.kind {
|
||||
// Trait casts from #[must_root] types are not allowed
|
||||
ExprKind::Cast(ref subexpr, _) => require_rooted(cx, self.in_new_function, &*subexpr),
|
||||
// This catches assignments... the main point of this would be to catch mutable
|
||||
|
@ -286,7 +286,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
|
|||
// When "default binding modes" https://github.com/rust-lang/rust/issues/42640
|
||||
// are implemented, the `Unannotated` case could cause false-positives.
|
||||
// These should be fixable by adding an explicit `ref`.
|
||||
match pat.node {
|
||||
match pat.kind {
|
||||
hir::PatKind::Binding(hir::BindingAnnotation::Unannotated, ..) |
|
||||
hir::PatKind::Binding(hir::BindingAnnotation::Mutable, ..) => {
|
||||
let ty = cx.tables.pat_ty(pat);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue