mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Update to rust 1.80.0 (#32896)
* Update for nix Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Update to Rust 1.80.0 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Rename to BindingMode from BindingAnnotation https://github.com/rust-lang/rust/pull/124047 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Remove TypeVariableOriginKind https://github.com/rust-lang/rust/pull/123016 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Remove TypeVariableOrigin https://github.com/rust-lang/rust/pull/124955 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Remove LintDiagnostic::msg rust-lang/rust#125410 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * common.rs fmt mistake indents Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * trace_in_no_trace.rs remove mistake space Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * trace_in_no_trace.rs remove mistake head space Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Workaround for https://github.com/servo/servo/issues/32912 It's dirty but it worked on 2000 runs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
a3f588832b
commit
3c271fb298
6 changed files with 44 additions and 58 deletions
|
@ -35,6 +35,9 @@ fn test_exit() {
|
|||
);
|
||||
resource_thread.send(CoreResourceMsg::Exit(sender)).unwrap();
|
||||
receiver.recv().unwrap();
|
||||
// Workaround for https://github.com/servo/servo/issues/32912
|
||||
#[cfg(windows)]
|
||||
std::thread::sleep(std::time::Duration::from_millis(100));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -10,7 +10,7 @@ with import (builtins.fetchTarball {
|
|||
overlays = [
|
||||
(import (builtins.fetchTarball {
|
||||
# Bumped the channel in rust-toolchain.toml? Bump this commit too!
|
||||
url = "https://github.com/oxalica/rust-overlay/archive/7f0e3ef7b7fbed78e12e5100851175d28af4b7c6.tar.gz";
|
||||
url = "https://github.com/oxalica/rust-overlay/archive/8b81b8ed00b20fd57b24adcb390bd96ea81ecd90.tar.gz";
|
||||
}))
|
||||
];
|
||||
config = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[toolchain]
|
||||
# Be sure to update etc/shell.nix when bumping this!
|
||||
channel = "1.78.0"
|
||||
channel = "1.80.0"
|
||||
|
||||
components = [
|
||||
# For support/crown
|
||||
|
|
|
@ -6,7 +6,6 @@ use rustc_ast::Mutability;
|
|||
use rustc_hir::def::{DefKind, Res};
|
||||
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE};
|
||||
use rustc_hir::{ImplItemRef, ItemKind, Node, OwnerId, PrimTy, TraitItemRef};
|
||||
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::ty::fast_reject::SimplifiedType;
|
||||
|
@ -338,14 +337,10 @@ pub fn implements_trait_with_env<'tcx>(
|
|||
return false;
|
||||
}
|
||||
let infcx = tcx.infer_ctxt().build();
|
||||
let orig = TypeVariableOrigin {
|
||||
kind: TypeVariableOriginKind::MiscVariable,
|
||||
span: DUMMY_SP,
|
||||
};
|
||||
let ty_params = tcx.mk_args_from_iter(
|
||||
ty_params
|
||||
.into_iter()
|
||||
.map(|arg| arg.unwrap_or_else(|| infcx.next_ty_var(orig).into())),
|
||||
.map(|arg| arg.unwrap_or_else(|| infcx.next_ty_var(DUMMY_SP).into())),
|
||||
);
|
||||
infcx
|
||||
.type_implements_trait(
|
||||
|
|
|
@ -131,24 +131,18 @@ fn incorrect_no_trace<'tcx, I: Into<MultiSpan> + Copy>(
|
|||
{
|
||||
let inner = substs.type_at(pos);
|
||||
if inner.is_primitive_ty() {
|
||||
cx.lint(
|
||||
EMPTY_TRACE_IN_NO_TRACE,
|
||||
EMPTY_TRACE_IN_NO_TRACE_MSG,
|
||||
|lint| {
|
||||
lint.span(span);
|
||||
},
|
||||
)
|
||||
cx.lint(EMPTY_TRACE_IN_NO_TRACE, |lint| {
|
||||
lint.primary_message(EMPTY_TRACE_IN_NO_TRACE_MSG);
|
||||
lint.span(span);
|
||||
})
|
||||
} else if is_jstraceable(cx, inner) {
|
||||
cx.lint(
|
||||
TRACE_IN_NO_TRACE,
|
||||
format!(
|
||||
cx.lint(TRACE_IN_NO_TRACE, |lint| {
|
||||
lint.primary_message(format!(
|
||||
"must_not_have_traceable marked wrapper must not have \
|
||||
jsmanaged inside on {pos}-th position. Consider removing the wrapper."
|
||||
),
|
||||
|lint| {
|
||||
lint.span(span);
|
||||
},
|
||||
)
|
||||
));
|
||||
lint.span(span);
|
||||
})
|
||||
}
|
||||
false
|
||||
} else {
|
||||
|
|
|
@ -187,14 +187,13 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
|
|||
for field in def.fields() {
|
||||
let field_type = cx.tcx.type_of(field.def_id);
|
||||
if is_unrooted_ty(&self.symbols, cx, field_type.skip_binder(), false) {
|
||||
cx.lint(
|
||||
UNROOTED_MUST_ROOT,
|
||||
"Type must be rooted, use #[crown::unrooted_must_root_lint::must_root] \
|
||||
on the struct definition to propagate",
|
||||
|lint| {
|
||||
lint.span(field.span);
|
||||
},
|
||||
)
|
||||
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||
lint.primary_message(
|
||||
"Type must be rooted, use #[crown::unrooted_must_root_lint::must_root] \
|
||||
on the struct definition to propagate"
|
||||
);
|
||||
lint.span(field.span);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -212,15 +211,14 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
|
|||
for field in fields {
|
||||
let field_type = cx.tcx.type_of(field.def_id);
|
||||
if is_unrooted_ty(&self.symbols, cx, field_type.skip_binder(), false) {
|
||||
cx.lint(
|
||||
UNROOTED_MUST_ROOT,
|
||||
"Type must be rooted, \
|
||||
use #[crown::unrooted_must_root_lint::must_root] \
|
||||
on the enum definition to propagate",
|
||||
|lint| {
|
||||
lint.span(field.ty.span);
|
||||
},
|
||||
)
|
||||
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||
lint.primary_message(
|
||||
"Type must be rooted, \
|
||||
use #[crown::unrooted_must_root_lint::must_root] \
|
||||
on the enum definition to propagate",
|
||||
);
|
||||
lint.span(field.ty.span);
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -250,7 +248,8 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
|
|||
|
||||
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) {
|
||||
if is_unrooted_ty(&self.symbols, cx, *ty, false) {
|
||||
cx.lint(UNROOTED_MUST_ROOT, "Type must be rooted", |lint| {
|
||||
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||
lint.primary_message("Type must be rooted");
|
||||
lint.span(arg.span);
|
||||
})
|
||||
}
|
||||
|
@ -259,7 +258,8 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass {
|
|||
if !in_new_function &&
|
||||
is_unrooted_ty(&self.symbols, cx, sig.output().skip_binder(), false)
|
||||
{
|
||||
cx.lint(UNROOTED_MUST_ROOT, "Type must be rooted", |lint| {
|
||||
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||
lint.primary_message("Type must be rooted");
|
||||
lint.span(decl.output.span());
|
||||
})
|
||||
}
|
||||
|
@ -289,13 +289,10 @@ impl<'a, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'tcx> {
|
|||
let require_rooted = |cx: &LateContext, in_new_function: bool, subexpr: &hir::Expr| {
|
||||
let ty = cx.typeck_results().expr_ty(subexpr);
|
||||
if is_unrooted_ty(self.symbols, cx, ty, in_new_function) {
|
||||
cx.lint(
|
||||
UNROOTED_MUST_ROOT,
|
||||
format!("Expression of type {:?} must be rooted", ty),
|
||||
|lint| {
|
||||
lint.span(subexpr.span);
|
||||
},
|
||||
)
|
||||
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||
lint.primary_message(format!("Expression of type {:?} must be rooted", ty));
|
||||
lint.span(subexpr.span);
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -329,17 +326,14 @@ impl<'a, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'tcx> {
|
|||
// are implemented, the `Unannotated` case could cause false-positives.
|
||||
// These should be fixable by adding an explicit `ref`.
|
||||
match pat.kind {
|
||||
hir::PatKind::Binding(hir::BindingAnnotation::NONE, ..) |
|
||||
hir::PatKind::Binding(hir::BindingAnnotation::MUT, ..) => {
|
||||
hir::PatKind::Binding(hir::BindingMode::NONE, ..) |
|
||||
hir::PatKind::Binding(hir::BindingMode::MUT, ..) => {
|
||||
let ty = cx.typeck_results().pat_ty(pat);
|
||||
if is_unrooted_ty(self.symbols, cx, ty, self.in_new_function) {
|
||||
cx.lint(
|
||||
UNROOTED_MUST_ROOT,
|
||||
format!("Expression of type {:?} must be rooted", ty),
|
||||
|lint| {
|
||||
lint.span(pat.span);
|
||||
},
|
||||
)
|
||||
cx.lint(UNROOTED_MUST_ROOT, |lint| {
|
||||
lint.primary_message(format!("Expression of type {:?} must be rooted", ty));
|
||||
lint.span(pat.span);
|
||||
})
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue