mirror of
https://github.com/servo/servo.git
synced 2025-06-26 10:04:33 +01:00
Auto merge of #27619 - servo:rustup, r=jdm
Upgrade to rustc 1.48.0-nightly (623fb90b5 2020-09-26) https://github.com/rust-lang/hashbrown/pull/159 reduced `size_of::<HashMap>()`
This commit is contained in:
commit
19d1544b66
5 changed files with 28 additions and 19 deletions
|
@ -110,7 +110,7 @@ fn is_unrooted_ty(sym: &Symbols, cx: &LateContext, ty: &ty::TyS, in_new_function
|
||||||
continue;
|
continue;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
let recur_into_subtree = match t.kind {
|
let recur_into_subtree = match t.kind() {
|
||||||
ty::Adt(did, substs) => {
|
ty::Adt(did, substs) => {
|
||||||
let has_attr = |did, name| has_lint_attr(sym, &cx.tcx.get_attrs(did), name);
|
let has_attr = |did, name| has_lint_attr(sym, &cx.tcx.get_attrs(did), name);
|
||||||
if has_attr(did.did, sym.must_root) {
|
if has_attr(did.did, sym.must_root) {
|
||||||
|
@ -121,7 +121,7 @@ fn is_unrooted_ty(sym: &Symbols, cx: &LateContext, ty: &ty::TyS, in_new_function
|
||||||
} else if match_def_path(cx, did.did, &[sym.alloc, sym.rc, sym.Rc]) {
|
} else if match_def_path(cx, did.did, &[sym.alloc, sym.rc, sym.Rc]) {
|
||||||
// Rc<Promise> is okay
|
// Rc<Promise> is okay
|
||||||
let inner = substs.type_at(0);
|
let inner = substs.type_at(0);
|
||||||
if let ty::Adt(did, _) = inner.kind {
|
if let ty::Adt(did, _) = inner.kind() {
|
||||||
if has_attr(did.did, sym.allow_unrooted_in_rc) {
|
if has_attr(did.did, sym.allow_unrooted_in_rc) {
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
|
@ -132,8 +132,12 @@ fn is_unrooted_ty(sym: &Symbols, cx: &LateContext, ty: &ty::TyS, in_new_function
|
||||||
}
|
}
|
||||||
} else if match_def_path(cx, did.did, &[sym::core, sym.cell, sym.Ref]) ||
|
} else if match_def_path(cx, did.did, &[sym::core, sym.cell, sym.Ref]) ||
|
||||||
match_def_path(cx, did.did, &[sym::core, sym.cell, sym.RefMut]) ||
|
match_def_path(cx, did.did, &[sym::core, sym.cell, sym.RefMut]) ||
|
||||||
match_def_path(cx, did.did, &[sym::core, sym.slice, sym.Iter]) ||
|
match_def_path(cx, did.did, &[sym::core, sym::slice, sym::iter, sym.Iter]) ||
|
||||||
match_def_path(cx, did.did, &[sym::core, sym.slice, sym.IterMut]) ||
|
match_def_path(
|
||||||
|
cx,
|
||||||
|
did.did,
|
||||||
|
&[sym::core, sym::slice, sym::iter, sym.IterMut],
|
||||||
|
) ||
|
||||||
match_def_path(cx, did.did, &[sym.accountable_refcell, sym.Ref]) ||
|
match_def_path(cx, did.did, &[sym.accountable_refcell, sym.Ref]) ||
|
||||||
match_def_path(cx, did.did, &[sym.accountable_refcell, sym.RefMut]) ||
|
match_def_path(cx, did.did, &[sym.accountable_refcell, sym.RefMut]) ||
|
||||||
match_def_path(
|
match_def_path(
|
||||||
|
@ -383,13 +387,14 @@ impl<'a, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'tcx> {
|
||||||
/// usage e.g. with
|
/// usage e.g. with
|
||||||
/// `match_def_path(cx, id, &["core", "option", "Option"])`
|
/// `match_def_path(cx, id, &["core", "option", "Option"])`
|
||||||
fn match_def_path(cx: &LateContext, def_id: DefId, path: &[Symbol]) -> bool {
|
fn match_def_path(cx: &LateContext, def_id: DefId, path: &[Symbol]) -> bool {
|
||||||
let krate = &cx.tcx.crate_name(def_id.krate);
|
let def_path = cx.tcx.def_path(def_id);
|
||||||
|
let krate = &cx.tcx.crate_name(def_path.krate);
|
||||||
if krate != &path[0] {
|
if krate != &path[0] {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = &path[1..];
|
let path = &path[1..];
|
||||||
let other = cx.tcx.def_path(def_id).data;
|
let other = def_path.data;
|
||||||
|
|
||||||
if other.len() != path.len() {
|
if other.len() != path.len() {
|
||||||
return false;
|
return false;
|
||||||
|
@ -398,7 +403,7 @@ fn match_def_path(cx: &LateContext, def_id: DefId, path: &[Symbol]) -> bool {
|
||||||
other
|
other
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.zip(path)
|
.zip(path)
|
||||||
.all(|(e, p)| e.data.as_symbol() == *p)
|
.all(|(e, p)| e.data.get_opt_name().as_ref() == Some(p))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn in_derive_expn(span: Span) -> bool {
|
fn in_derive_expn(span: Span) -> bool {
|
||||||
|
@ -438,7 +443,6 @@ symbols! {
|
||||||
accountable_refcell
|
accountable_refcell
|
||||||
Ref
|
Ref
|
||||||
RefMut
|
RefMut
|
||||||
slice
|
|
||||||
Iter
|
Iter
|
||||||
IterMut
|
IterMut
|
||||||
collections
|
collections
|
||||||
|
|
|
@ -1028,7 +1028,12 @@ install them, let us know by filing a bug!")
|
||||||
|
|
||||||
def ensure_rustup_version(self):
|
def ensure_rustup_version(self):
|
||||||
try:
|
try:
|
||||||
version_line = subprocess.check_output(["rustup" + BIN_SUFFIX, "--version"])
|
version_line = subprocess.check_output(
|
||||||
|
["rustup" + BIN_SUFFIX, "--version"],
|
||||||
|
# Silence "info: This is the version for the rustup toolchain manager,
|
||||||
|
# not the rustc compiler."
|
||||||
|
stderr=open(os.devnull, "wb")
|
||||||
|
)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno == NO_SUCH_FILE_OR_DIRECTORY:
|
if e.errno == NO_SUCH_FILE_OR_DIRECTORY:
|
||||||
print("It looks like rustup is not installed. See instructions at "
|
print("It looks like rustup is not installed. See instructions at "
|
||||||
|
|
|
@ -11,5 +11,5 @@ WINDOWS_MSVC = {
|
||||||
"openssl": "111.3.0+1.1.1c-vs2017-2019-09-18",
|
"openssl": "111.3.0+1.1.1c-vs2017-2019-09-18",
|
||||||
"gstreamer-uwp": "1.16.0.5",
|
"gstreamer-uwp": "1.16.0.5",
|
||||||
"openxr-loader-uwp": "1.0",
|
"openxr-loader-uwp": "1.0",
|
||||||
"xargo": "v0.3.17",
|
"xargo": "v0.3.22",
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2020-07-27
|
nightly-2020-09-27
|
||||||
|
|
|
@ -29,11 +29,11 @@ macro_rules! sizeof_checker (
|
||||||
);
|
);
|
||||||
|
|
||||||
// Update the sizes here
|
// Update the sizes here
|
||||||
sizeof_checker!(size_event_target, EventTarget, 56);
|
sizeof_checker!(size_event_target, EventTarget, 48);
|
||||||
sizeof_checker!(size_node, Node, 192);
|
sizeof_checker!(size_node, Node, 184);
|
||||||
sizeof_checker!(size_element, Element, 368);
|
sizeof_checker!(size_element, Element, 360);
|
||||||
sizeof_checker!(size_htmlelement, HTMLElement, 384);
|
sizeof_checker!(size_htmlelement, HTMLElement, 376);
|
||||||
sizeof_checker!(size_div, HTMLDivElement, 384);
|
sizeof_checker!(size_div, HTMLDivElement, 376);
|
||||||
sizeof_checker!(size_span, HTMLSpanElement, 384);
|
sizeof_checker!(size_span, HTMLSpanElement, 376);
|
||||||
sizeof_checker!(size_text, Text, 224);
|
sizeof_checker!(size_text, Text, 216);
|
||||||
sizeof_checker!(size_characterdata, CharacterData, 224);
|
sizeof_checker!(size_characterdata, CharacterData, 216);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue