mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)
This commit is contained in:
parent
6059d0c467
commit
46ad811017
6 changed files with 6 additions and 14 deletions
|
@ -143,14 +143,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
|
|||
let def_id = cx.tcx.hir.local_def_id(id);
|
||||
let sig = cx.tcx.type_of(def_id).fn_sig(cx.tcx);
|
||||
|
||||
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().0.iter()) {
|
||||
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {
|
||||
if is_unrooted_ty(cx, ty, false) {
|
||||
cx.span_lint(UNROOTED_MUST_ROOT, arg.span, "Type must be rooted")
|
||||
}
|
||||
}
|
||||
|
||||
if !in_new_function {
|
||||
if is_unrooted_ty(cx, sig.output().0, false) {
|
||||
if is_unrooted_ty(cx, sig.output().skip_binder(), false) {
|
||||
cx.span_lint(UNROOTED_MUST_ROOT, decl.output.span(), "Type must be rooted")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ pub fn match_def_path(cx: &LateContext, def_id: DefId, path: &[&str]) -> bool {
|
|||
other.into_iter()
|
||||
.map(|e| e.data)
|
||||
.zip(path)
|
||||
.all(|(nm, p)| &*nm.as_interned_str() == *p)
|
||||
.all(|(nm, p)| nm.as_interned_str().with(|nm| nm == *p))
|
||||
}
|
||||
|
||||
pub fn in_derive_expn(span: Span) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue