diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs index 211b6117781..926c5a04b03 100644 --- a/components/script_plugins/lib.rs +++ b/components/script_plugins/lib.rs @@ -210,7 +210,8 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass { /// All structs containing #[unrooted_must_root_lint::must_root] types /// must be #[unrooted_must_root_lint::must_root] themselves fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item) { - if has_lint_attr(&self.symbols, &item.attrs, self.symbols.must_root) { + let attrs = cx.tcx.hir().attrs(item.hir_id()); + if has_lint_attr(&self.symbols, &attrs, self.symbols.must_root) { return; } if let hir::ItemKind::Struct(def, ..) = &item.kind { @@ -235,7 +236,8 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass { fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant) { let ref map = cx.tcx.hir(); let parent_item = map.expect_item(map.get_parent_item(var.id)); - if !has_lint_attr(&self.symbols, &parent_item.attrs, self.symbols.must_root) { + let attrs = cx.tcx.hir().attrs(parent_item.hir_id()); + if !has_lint_attr(&self.symbols, &attrs, self.symbols.must_root) { match var.data { hir::VariantData::Tuple(fields, ..) => { for field in fields { @@ -268,10 +270,10 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass { id: HirId, ) { let in_new_function = match kind { - visit::FnKind::ItemFn(n, _, _, _, _) | visit::FnKind::Method(n, _, _, _) => { + visit::FnKind::ItemFn(n, _, _, _) | visit::FnKind::Method(n, _, _) => { &*n.as_str() == "new" || n.as_str().starts_with("new_") }, - visit::FnKind::Closure(_) => return, + visit::FnKind::Closure => return, }; if !in_derive_expn(span) { diff --git a/rust-toolchain b/rust-toolchain index d6ee05dcfce..02c828fea2f 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2021-02-25 +nightly-2021-03-12 diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html.ini index 23792568fa4..5c8f5d9135b 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html.ini @@ -1,4 +1,34 @@ [event-insertion.html] + [< [Insert same event at same time\] 1 out of 15 assertions were failed.] + expected: FAIL + + [X Linear+Expo: At time 0.01556396484375 (frame 255) output is not close to 1.99609375 within a relative error of 0 (RelErr=0.4964742940465998). Got 2.98710298538208.] + expected: FAIL + + [X Expo+Linear: At time 0.01556396484375 (frame 255) output is not close to 2.9871532226369792 within a relative error of 0.0000042533 (RelErr=0.3317790074896618). Got 1.9960784912109375.] + expected: FAIL + + [< [Linear + Expo\] 1 out of 6 assertions were failed.] + expected: FAIL + + [< [Expo + Linear\] 1 out of 6 assertions were failed.] + expected: FAIL + + [X Linear+SetTarget: At time 0.015625 (frame 256) output is not equal to 100. Got NaN.] + expected: FAIL + + [X Multiple linear ramps: Output at frame 63 is not close to 1.984375 within a relative error of 0 (RelErr=3.9673788716473917). Got 9.857142448425293.] + expected: FAIL + + [X Multiple exponential ramps: Output at frame 63 is not close to 1.978456026387951 within a relative error of 5.3924e-7 (RelErr=3.873046650665318). Got 9.641108512878418.] + expected: FAIL + + [< [Multiple linear ramps at the same time\] 1 out of 6 assertions were failed.] + expected: FAIL + + [< [Multiple exponential ramps at the same time\] 1 out of 6 assertions were failed.] + expected: FAIL + [X Output at frame 512 (time 0.03125) is not equal to 4. Got 3.] expected: FAIL