From dcfc0752fcfeb8bda4e0473ecf95e594774cd3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Wed, 28 Sep 2022 18:51:18 +0200 Subject: [PATCH 1/2] Disable rustc lints --- compiler/rustc_lint/src/array_into_iter.rs | 4 +- compiler/rustc_lint/src/builtin.rs | 112 +++++++++--------- compiler/rustc_lint/src/early.rs | 2 +- .../src/enum_intrinsics_non_enums.rs | 4 +- .../src/hidden_unicode_codepoints.rs | 4 +- compiler/rustc_lint/src/internal.rs | 12 +- compiler/rustc_lint/src/let_underscore.rs | 4 +- compiler/rustc_lint/src/methods.rs | 4 +- compiler/rustc_lint/src/non_ascii_idents.rs | 4 +- compiler/rustc_lint/src/non_fmt_panic.rs | 4 +- compiler/rustc_lint/src/nonstandard_style.rs | 12 +- compiler/rustc_lint/src/noop_method_call.rs | 4 +- compiler/rustc_lint/src/pass_by_value.rs | 4 +- compiler/rustc_lint/src/passes.rs | 4 +- .../rustc_lint/src/redundant_semicolon.rs | 4 +- compiler/rustc_lint/src/traits.rs | 4 +- compiler/rustc_lint/src/types.rs | 20 ++-- compiler/rustc_lint/src/unused.rs | 12 +- .../ui-fulldeps/auxiliary/lint-plugin-test.rs | 4 +- .../ui-fulldeps/auxiliary/lint-tool-test.rs | 4 +- 20 files changed, 113 insertions(+), 113 deletions(-) diff --git a/compiler/rustc_lint/src/array_into_iter.rs b/compiler/rustc_lint/src/array_into_iter.rs index b97f8acb37f84..64666dbbe0a32 100644 --- a/compiler/rustc_lint/src/array_into_iter.rs +++ b/compiler/rustc_lint/src/array_into_iter.rs @@ -45,7 +45,7 @@ pub struct ArrayIntoIter { impl_lint_pass!(ArrayIntoIter => [ARRAY_INTO_ITER]); impl<'tcx> LateLintPass<'tcx> for ArrayIntoIter { - fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { + /*fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { // Save the span of expressions in `for _ in expr` syntax, // so we can give a better suggestion for those later. if let hir::ExprKind::Match(arg, [_], hir::MatchSource::ForLoopDesugar) = &expr.kind { @@ -150,5 +150,5 @@ impl<'tcx> LateLintPass<'tcx> for ArrayIntoIter { diag.emit(); }) } - } + }*/ } diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 146c4971348ea..8f9eb94b8b738 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -96,7 +96,7 @@ fn pierce_parens(mut expr: &ast::Expr) -> &ast::Expr { } impl EarlyLintPass for WhileTrue { - fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) { + /*fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) { if let ast::ExprKind::While(cond, _, label) = &e.kind { if let ast::ExprKind::Lit(ref lit) = pierce_parens(cond).kind { if let ast::LitKind::Bool(true) = lit.kind { @@ -122,7 +122,7 @@ impl EarlyLintPass for WhileTrue { } } } - } + }*/ } declare_lint! { @@ -166,7 +166,7 @@ impl BoxPointers { } impl<'tcx> LateLintPass<'tcx> for BoxPointers { - fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { match it.kind { hir::ItemKind::Fn(..) | hir::ItemKind::TyAlias(..) @@ -193,7 +193,7 @@ impl<'tcx> LateLintPass<'tcx> for BoxPointers { fn check_expr(&mut self, cx: &LateContext<'_>, e: &hir::Expr<'_>) { let ty = cx.typeck_results().node_type(e.hir_id); self.check_heap_type(cx, e.span, ty); - } + }*/ } declare_lint! { @@ -235,7 +235,7 @@ declare_lint! { declare_lint_pass!(NonShorthandFieldPatterns => [NON_SHORTHAND_FIELD_PATTERNS]); impl<'tcx> LateLintPass<'tcx> for NonShorthandFieldPatterns { - fn check_pat(&mut self, cx: &LateContext<'_>, pat: &hir::Pat<'_>) { + /*fn check_pat(&mut self, cx: &LateContext<'_>, pat: &hir::Pat<'_>) { if let PatKind::Struct(ref qpath, field_pats, _) = pat.kind { let variant = cx .typeck_results() @@ -274,7 +274,7 @@ impl<'tcx> LateLintPass<'tcx> for NonShorthandFieldPatterns { } } } - } + }*/ } declare_lint! { @@ -343,7 +343,7 @@ impl UnsafeCode { } impl EarlyLintPass for UnsafeCode { - fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &ast::Attribute) { + /*fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &ast::Attribute) { if attr.has_name(sym::allow_internal_unsafe) { self.report_unsafe(cx, attr.span, |lint| { lint.build(fluent::lint::builtin_allow_internal_unsafe).emit(); @@ -469,7 +469,7 @@ impl EarlyLintPass for UnsafeCode { lint.build(msg).emit(); }); } - } + }*/ } declare_lint! { @@ -579,7 +579,7 @@ impl MissingDoc { } impl<'tcx> LateLintPass<'tcx> for MissingDoc { - fn enter_lint_attrs(&mut self, _cx: &LateContext<'_>, attrs: &[ast::Attribute]) { + /*fn enter_lint_attrs(&mut self, _cx: &LateContext<'_>, attrs: &[ast::Attribute]) { let doc_hidden = self.doc_hidden() || attrs.iter().any(|attr| { attr.has_name(sym::doc) @@ -677,7 +677,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc { fn check_variant(&mut self, cx: &LateContext<'_>, v: &hir::Variant<'_>) { self.check_missing_docs_attrs(cx, cx.tcx.hir().local_def_id(v.id), "a", "variant"); - } + }*/ } declare_lint! { @@ -717,7 +717,7 @@ declare_lint! { declare_lint_pass!(MissingCopyImplementations => [MISSING_COPY_IMPLEMENTATIONS]); impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations { - fn check_item(&mut self, cx: &LateContext<'_>, item: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, item: &hir::Item<'_>) { if !cx.access_levels.is_reachable(item.def_id.def_id) { return; } @@ -764,7 +764,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations { lint.build(fluent::lint::builtin_missing_copy_impl).emit(); }) } - } + }*/ } declare_lint! { @@ -807,7 +807,7 @@ pub struct MissingDebugImplementations { impl_lint_pass!(MissingDebugImplementations => [MISSING_DEBUG_IMPLEMENTATIONS]); impl<'tcx> LateLintPass<'tcx> for MissingDebugImplementations { - fn check_item(&mut self, cx: &LateContext<'_>, item: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, item: &hir::Item<'_>) { if !cx.access_levels.is_reachable(item.def_id.def_id) { return; } @@ -842,7 +842,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDebugImplementations { .emit(); }); } - } + }*/ } declare_lint! { @@ -899,7 +899,7 @@ declare_lint_pass!( ); impl EarlyLintPass for AnonymousParameters { - fn check_trait_item(&mut self, cx: &EarlyContext<'_>, it: &ast::AssocItem) { + /*fn check_trait_item(&mut self, cx: &EarlyContext<'_>, it: &ast::AssocItem) { if cx.sess().edition() != Edition::Edition2015 { // This is a hard error in future editions; avoid linting and erroring return; @@ -930,7 +930,7 @@ impl EarlyLintPass for AnonymousParameters { } } } - } + }*/ } /// Check for use of attributes which have been deprecated. @@ -950,7 +950,7 @@ impl DeprecatedAttr { } impl EarlyLintPass for DeprecatedAttr { - fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &ast::Attribute) { + /*fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &ast::Attribute) { for BuiltinAttribute { name, gate, .. } in &self.depr_attrs { if attr.ident().map(|ident| ident.name) == Some(*name) { if let &AttributeGate::Gated( @@ -993,7 +993,7 @@ impl EarlyLintPass for DeprecatedAttr { .emit(); }); } - } + }*/ } fn warn_if_doc(cx: &EarlyContext<'_>, node_span: Span, node_kind: &str, attrs: &[ast::Attribute]) { @@ -1037,7 +1037,7 @@ fn warn_if_doc(cx: &EarlyContext<'_>, node_span: Span, node_kind: &str, attrs: & } impl EarlyLintPass for UnusedDocComment { - fn check_stmt(&mut self, cx: &EarlyContext<'_>, stmt: &ast::Stmt) { + /*fn check_stmt(&mut self, cx: &EarlyContext<'_>, stmt: &ast::Stmt) { let kind = match stmt.kind { ast::StmtKind::Local(..) => "statements", // Disabled pending discussion in #78306 @@ -1073,7 +1073,7 @@ impl EarlyLintPass for UnusedDocComment { if let ast::ItemKind::ForeignMod(_) = item.kind { warn_if_doc(cx, item.span, "extern blocks", &item.attrs); } - } + }*/ } declare_lint! { @@ -1133,7 +1133,7 @@ declare_lint! { declare_lint_pass!(InvalidNoMangleItems => [NO_MANGLE_CONST_ITEMS, NO_MANGLE_GENERIC_ITEMS]); impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems { - fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { let attrs = cx.tcx.hir().attrs(it.hir_id()); let check_no_mangle_on_generic_fn = |no_mangle_attr: &ast::Attribute, impl_generics: Option<&hir::Generics<'_>>, @@ -1214,7 +1214,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems { } _ => {} } - } + }*/ } declare_lint! { @@ -1247,7 +1247,7 @@ declare_lint! { declare_lint_pass!(MutableTransmutes => [MUTABLE_TRANSMUTES]); impl<'tcx> LateLintPass<'tcx> for MutableTransmutes { - fn check_expr(&mut self, cx: &LateContext<'_>, expr: &hir::Expr<'_>) { + /*fn check_expr(&mut self, cx: &LateContext<'_>, expr: &hir::Expr<'_>) { if let Some((&ty::Ref(_, _, from_mt), &ty::Ref(_, _, to_mt))) = get_transmute_from_to(cx, expr).map(|(ty1, ty2)| (ty1.kind(), ty2.kind())) { @@ -1282,7 +1282,7 @@ impl<'tcx> LateLintPass<'tcx> for MutableTransmutes { fn def_id_is_transmute(cx: &LateContext<'_>, def_id: DefId) -> bool { cx.tcx.is_intrinsic(def_id) && cx.tcx.item_name(def_id) == sym::transmute } - } + }*/ } declare_lint! { @@ -1298,7 +1298,7 @@ declare_lint_pass!( ); impl<'tcx> LateLintPass<'tcx> for UnstableFeatures { - fn check_attribute(&mut self, cx: &LateContext<'_>, attr: &ast::Attribute) { + /*fn check_attribute(&mut self, cx: &LateContext<'_>, attr: &ast::Attribute) { if attr.has_name(sym::feature) { if let Some(items) = attr.meta_item_list() { for item in items { @@ -1308,7 +1308,7 @@ impl<'tcx> LateLintPass<'tcx> for UnstableFeatures { } } } - } + }*/ } declare_lint! { @@ -1383,7 +1383,7 @@ impl UnreachablePub { } impl<'tcx> LateLintPass<'tcx> for UnreachablePub { - fn check_item(&mut self, cx: &LateContext<'_>, item: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, item: &hir::Item<'_>) { // Do not warn for fake `use` statements. if let hir::ItemKind::Use(_, hir::UseKind::ListStem) = &item.kind { return; @@ -1405,7 +1405,7 @@ impl<'tcx> LateLintPass<'tcx> for UnreachablePub { if cx.tcx.associated_item(impl_item.def_id).trait_item_def_id.is_none() { self.perform_lint(cx, "item", impl_item.def_id.def_id, impl_item.vis_span, false); } - } + }*/ } declare_lint! { @@ -1477,7 +1477,7 @@ impl TypeAliasBounds { } impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds { - fn check_item(&mut self, cx: &LateContext<'_>, item: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, item: &hir::Item<'_>) { let hir::ItemKind::TyAlias(ty, type_alias_generics) = &item.kind else { return }; @@ -1539,7 +1539,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds { err.emit(); }); } - } + }*/ } declare_lint_pass!( @@ -1551,7 +1551,7 @@ declare_lint_pass!( ); impl<'tcx> LateLintPass<'tcx> for UnusedBrokenConst { - fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { match it.kind { hir::ItemKind::Const(_, body_id) => { let def_id = cx.tcx.hir().body_owner_def_id(body_id).to_def_id(); @@ -1564,7 +1564,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedBrokenConst { } _ => {} } - } + }*/ } declare_lint! { @@ -1609,7 +1609,7 @@ declare_lint_pass!( ); impl<'tcx> LateLintPass<'tcx> for TrivialConstraints { - fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) { + /*fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) { use rustc_middle::ty::visit::TypeVisitable; use rustc_middle::ty::PredicateKind::*; @@ -1644,7 +1644,7 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints { } } } - } + }*/ } declare_lint_pass!( @@ -1713,7 +1713,7 @@ pub struct EllipsisInclusiveRangePatterns { impl_lint_pass!(EllipsisInclusiveRangePatterns => [ELLIPSIS_INCLUSIVE_RANGE_PATTERNS]); impl EarlyLintPass for EllipsisInclusiveRangePatterns { - fn check_pat(&mut self, cx: &EarlyContext<'_>, pat: &ast::Pat) { + /*fn check_pat(&mut self, cx: &EarlyContext<'_>, pat: &ast::Pat) { if self.node_id.is_some() { // Don't recursively warn about patterns inside range endpoints. return; @@ -1797,7 +1797,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns { self.node_id = None } } - } + }*/ } declare_lint! { @@ -1853,7 +1853,7 @@ impl UnnameableTestItems { } impl<'tcx> LateLintPass<'tcx> for UnnameableTestItems { - fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { if self.items_nameable { if let hir::ItemKind::Mod(..) = it.kind { } else { @@ -1875,7 +1875,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnameableTestItems { if !self.items_nameable && self.boundary == Some(it.def_id) { self.items_nameable = true; } - } + }*/ } declare_lint! { @@ -1999,7 +1999,7 @@ impl KeywordIdents { } impl EarlyLintPass for KeywordIdents { - fn check_mac_def(&mut self, cx: &EarlyContext<'_>, mac_def: &ast::MacroDef) { + /*fn check_mac_def(&mut self, cx: &EarlyContext<'_>, mac_def: &ast::MacroDef) { self.check_tokens(cx, mac_def.body.inner_tokens()); } fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &ast::MacCall) { @@ -2007,7 +2007,7 @@ impl EarlyLintPass for KeywordIdents { } fn check_ident(&mut self, cx: &EarlyContext<'_>, ident: Ident) { self.check_ident_token(cx, UnderMacro(false), ident); - } + }*/ } declare_lint_pass!(ExplicitOutlivesRequirements => [EXPLICIT_OUTLIVES_REQUIREMENTS]); @@ -2134,7 +2134,7 @@ impl ExplicitOutlivesRequirements { } impl<'tcx> LateLintPass<'tcx> for ExplicitOutlivesRequirements { - fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { use rustc_middle::middle::resolve_lifetime::Region; let def_id = item.def_id.def_id; @@ -2260,7 +2260,7 @@ impl<'tcx> LateLintPass<'tcx> for ExplicitOutlivesRequirements { }); } } - } + }*/ } declare_lint! { @@ -2295,7 +2295,7 @@ declare_lint_pass!( ); impl EarlyLintPass for IncompleteFeatures { - fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) { + /*fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) { let features = cx.sess().features_untracked(); features .declared_lang_features @@ -2317,7 +2317,7 @@ impl EarlyLintPass for IncompleteFeatures { builder.emit(); }) }); - } + }*/ } const HAS_MIN_FEATURES: &[Symbol] = &[sym::specialization]; @@ -2361,7 +2361,7 @@ declare_lint! { declare_lint_pass!(InvalidValue => [INVALID_VALUE]); impl<'tcx> LateLintPass<'tcx> for InvalidValue { - fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &hir::Expr<'_>) { + /*fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &hir::Expr<'_>) { #[derive(Debug, Copy, Clone, PartialEq)] enum InitKind { Zeroed, @@ -2654,7 +2654,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue { }); } } - } + }*/ } declare_lint! { @@ -2968,7 +2968,7 @@ impl ClashingExternDeclarations { impl_lint_pass!(ClashingExternDeclarations => [CLASHING_EXTERN_DECLARATIONS]); impl<'tcx> LateLintPass<'tcx> for ClashingExternDeclarations { - fn check_foreign_item(&mut self, cx: &LateContext<'tcx>, this_fi: &hir::ForeignItem<'_>) { + /*fn check_foreign_item(&mut self, cx: &LateContext<'tcx>, this_fi: &hir::ForeignItem<'_>) { trace!("ClashingExternDeclarations: check_foreign_item: {:?}", this_fi); if let ForeignItemKind::Fn(..) = this_fi.kind { let tcx = cx.tcx; @@ -3027,7 +3027,7 @@ impl<'tcx> LateLintPass<'tcx> for ClashingExternDeclarations { } } } - } + }*/ } declare_lint! { @@ -3062,7 +3062,7 @@ declare_lint! { declare_lint_pass!(DerefNullPtr => [DEREF_NULLPTR]); impl<'tcx> LateLintPass<'tcx> for DerefNullPtr { - fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &hir::Expr<'_>) { + /*fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &hir::Expr<'_>) { /// test if expression is a null ptr fn is_null_ptr(cx: &LateContext<'_>, expr: &hir::Expr<'_>) -> bool { match &expr.kind { @@ -3109,7 +3109,7 @@ impl<'tcx> LateLintPass<'tcx> for DerefNullPtr { }); } } - } + }*/ } declare_lint! { @@ -3149,7 +3149,7 @@ declare_lint! { declare_lint_pass!(NamedAsmLabels => [NAMED_ASM_LABELS]); impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels { - fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { + /*fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { if let hir::Expr { kind: hir::ExprKind::InlineAsm(hir::InlineAsm { template_strs, .. }), .. @@ -3227,7 +3227,7 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels { } } } - } + }*/ } declare_lint! { @@ -3278,7 +3278,7 @@ declare_lint! { declare_lint_pass!(SpecialModuleName => [SPECIAL_MODULE_NAME]); impl EarlyLintPass for SpecialModuleName { - fn check_crate(&mut self, cx: &EarlyContext<'_>, krate: &ast::Crate) { + /*fn check_crate(&mut self, cx: &EarlyContext<'_>, krate: &ast::Crate) { for item in &krate.items { if let ast::ItemKind::Mod( _, @@ -3305,7 +3305,7 @@ impl EarlyLintPass for SpecialModuleName { } } } - } + }*/ } pub use rustc_session::lint::builtin::UNEXPECTED_CFGS; @@ -3313,7 +3313,7 @@ pub use rustc_session::lint::builtin::UNEXPECTED_CFGS; declare_lint_pass!(UnexpectedCfgs => [UNEXPECTED_CFGS]); impl EarlyLintPass for UnexpectedCfgs { - fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) { + /*fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) { let cfg = &cx.sess().parse_sess.config; let check_cfg = &cx.sess().parse_sess.check_config; for &(name, value) in cfg { @@ -3341,5 +3341,5 @@ impl EarlyLintPass for UnexpectedCfgs { } } } - } + }*/ } diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs index 96ecd79a69cfb..6564dfc845dda 100644 --- a/compiler/rustc_lint/src/early.rs +++ b/compiler/rustc_lint/src/early.rs @@ -310,7 +310,7 @@ macro_rules! expand_early_lint_pass_impl_methods { macro_rules! early_lint_pass_impl { ([], [$($methods:tt)*]) => ( impl EarlyLintPass for EarlyLintPassObjects<'_> { - expand_early_lint_pass_impl_methods!([$($methods)*]); + //expand_early_lint_pass_impl_methods!([$($methods)*]); } ) } diff --git a/compiler/rustc_lint/src/enum_intrinsics_non_enums.rs b/compiler/rustc_lint/src/enum_intrinsics_non_enums.rs index f41ee6404992d..ab3705d686cf3 100644 --- a/compiler/rustc_lint/src/enum_intrinsics_non_enums.rs +++ b/compiler/rustc_lint/src/enum_intrinsics_non_enums.rs @@ -74,7 +74,7 @@ fn enforce_mem_variant_count(cx: &LateContext<'_>, func_expr: &hir::Expr<'_>, sp } impl<'tcx> LateLintPass<'tcx> for EnumIntrinsicsNonEnums { - fn check_expr(&mut self, cx: &LateContext<'_>, expr: &hir::Expr<'_>) { + /*fn check_expr(&mut self, cx: &LateContext<'_>, expr: &hir::Expr<'_>) { let hir::ExprKind::Call(func, args) = &expr.kind else { return }; let hir::ExprKind::Path(qpath) = &func.kind else { return }; let Some(def_id) = cx.qpath_res(qpath, func.hir_id).opt_def_id() else { return }; @@ -84,5 +84,5 @@ impl<'tcx> LateLintPass<'tcx> for EnumIntrinsicsNonEnums { sym::mem_variant_count => enforce_mem_variant_count(cx, func, expr.span), _ => {} } - } + }*/ } diff --git a/compiler/rustc_lint/src/hidden_unicode_codepoints.rs b/compiler/rustc_lint/src/hidden_unicode_codepoints.rs index 8f22221324a6e..6bed543ef91a0 100644 --- a/compiler/rustc_lint/src/hidden_unicode_codepoints.rs +++ b/compiler/rustc_lint/src/hidden_unicode_codepoints.rs @@ -109,7 +109,7 @@ impl HiddenUnicodeCodepoints { } } impl EarlyLintPass for HiddenUnicodeCodepoints { - fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &ast::Attribute) { + /*fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &ast::Attribute) { if let ast::AttrKind::DocComment(_, comment) = attr.kind { if contains_text_flow_control_chars(comment.as_str()) { self.lint_text_direction_codepoint(cx, comment, attr.span, 0, false, "doc comment"); @@ -137,5 +137,5 @@ impl EarlyLintPass for HiddenUnicodeCodepoints { _ => return, }; self.lint_text_direction_codepoint(cx, text, *span, padding, true, "literal"); - } + }*/ } diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs index d8a03024d1323..11301b1a2367e 100644 --- a/compiler/rustc_lint/src/internal.rs +++ b/compiler/rustc_lint/src/internal.rs @@ -111,7 +111,7 @@ declare_lint_pass!(TyTyKind => [ ]); impl<'tcx> LateLintPass<'tcx> for TyTyKind { - fn check_path( + /*fn check_path( &mut self, cx: &LateContext<'tcx>, path: &'tcx rustc_hir::Path<'tcx>, @@ -225,7 +225,7 @@ impl<'tcx> LateLintPass<'tcx> for TyTyKind { } _ => {} } - } + }*/ } fn lint_ty_kind_usage(cx: &LateContext<'_>, res: &Res) -> bool { @@ -295,7 +295,7 @@ declare_tool_lint! { declare_lint_pass!(LintPassImpl => [LINT_PASS_IMPL_WITHOUT_MACRO]); impl EarlyLintPass for LintPassImpl { - fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { + /*fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { if let ast::ItemKind::Impl(box ast::Impl { of_trait: Some(lint_pass), .. }) = &item.kind { if let Some(last) = lint_pass.path.segments.last() { if last.ident.name == sym::LintPass { @@ -318,7 +318,7 @@ impl EarlyLintPass for LintPassImpl { } } } - } + }*/ } declare_tool_lint! { @@ -335,7 +335,7 @@ fn is_doc_keyword(s: Symbol) -> bool { } impl<'tcx> LateLintPass<'tcx> for ExistingDocKeyword { - fn check_item(&mut self, cx: &LateContext<'_>, item: &rustc_hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, item: &rustc_hir::Item<'_>) { for attr in cx.tcx.hir().attrs(item.hir_id()) { if !attr.has_name(sym::doc) { continue; @@ -359,7 +359,7 @@ impl<'tcx> LateLintPass<'tcx> for ExistingDocKeyword { } } } - } + }*/ } declare_tool_lint! { diff --git a/compiler/rustc_lint/src/let_underscore.rs b/compiler/rustc_lint/src/let_underscore.rs index 7e885e6c51aad..13b55e7a8a4a1 100644 --- a/compiler/rustc_lint/src/let_underscore.rs +++ b/compiler/rustc_lint/src/let_underscore.rs @@ -100,7 +100,7 @@ const SYNC_GUARD_SYMBOLS: [Symbol; 3] = [ ]; impl<'tcx> LateLintPass<'tcx> for LetUnderscore { - fn check_local(&mut self, cx: &LateContext<'_>, local: &hir::Local<'_>) { + /*fn check_local(&mut self, cx: &LateContext<'_>, local: &hir::Local<'_>) { if !matches!(local.pat.kind, hir::PatKind::Wild) { return; } @@ -147,7 +147,7 @@ impl<'tcx> LateLintPass<'tcx> for LetUnderscore { }) } } - } + }*/ } fn build_and_emit_lint( diff --git a/compiler/rustc_lint/src/methods.rs b/compiler/rustc_lint/src/methods.rs index 5f7f03480c043..a7b2872dcf873 100644 --- a/compiler/rustc_lint/src/methods.rs +++ b/compiler/rustc_lint/src/methods.rs @@ -57,7 +57,7 @@ fn first_method_call<'tcx>( } impl<'tcx> LateLintPass<'tcx> for TemporaryCStringAsPtr { - fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { + /*fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { if in_macro(expr.span) { return; } @@ -76,7 +76,7 @@ impl<'tcx> LateLintPass<'tcx> for TemporaryCStringAsPtr { } _ => return, } - } + }*/ } fn lint_cstring_as_ptr( diff --git a/compiler/rustc_lint/src/non_ascii_idents.rs b/compiler/rustc_lint/src/non_ascii_idents.rs index 764003e61a6df..8dad98ea66011 100644 --- a/compiler/rustc_lint/src/non_ascii_idents.rs +++ b/compiler/rustc_lint/src/non_ascii_idents.rs @@ -145,7 +145,7 @@ declare_lint! { declare_lint_pass!(NonAsciiIdents => [NON_ASCII_IDENTS, UNCOMMON_CODEPOINTS, CONFUSABLE_IDENTS, MIXED_SCRIPT_CONFUSABLES]); impl EarlyLintPass for NonAsciiIdents { - fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) { + /*fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) { use rustc_session::lint::Level; use rustc_span::Span; use std::collections::BTreeMap; @@ -341,5 +341,5 @@ impl EarlyLintPass for NonAsciiIdents { } } } - } + }*/ } diff --git a/compiler/rustc_lint/src/non_fmt_panic.rs b/compiler/rustc_lint/src/non_fmt_panic.rs index cdad2d2e8f93e..c2805bd0ff8b2 100644 --- a/compiler/rustc_lint/src/non_fmt_panic.rs +++ b/compiler/rustc_lint/src/non_fmt_panic.rs @@ -46,7 +46,7 @@ declare_lint! { declare_lint_pass!(NonPanicFmt => [NON_FMT_PANICS]); impl<'tcx> LateLintPass<'tcx> for NonPanicFmt { - fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { + /*fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { if let hir::ExprKind::Call(f, [arg]) = &expr.kind { if let &ty::FnDef(def_id, _) = cx.typeck_results().expr_ty(f).kind() { let f_diagnostic_name = cx.tcx.get_diagnostic_name(def_id); @@ -82,7 +82,7 @@ impl<'tcx> LateLintPass<'tcx> for NonPanicFmt { } } } - } + }*/ } fn check_panic<'tcx>(cx: &LateContext<'tcx>, f: &'tcx hir::Expr<'tcx>, arg: &'tcx hir::Expr<'tcx>) { diff --git a/compiler/rustc_lint/src/nonstandard_style.rs b/compiler/rustc_lint/src/nonstandard_style.rs index 768ad84838b15..13bf9de71a30f 100644 --- a/compiler/rustc_lint/src/nonstandard_style.rs +++ b/compiler/rustc_lint/src/nonstandard_style.rs @@ -161,7 +161,7 @@ impl NonCamelCaseTypes { } impl EarlyLintPass for NonCamelCaseTypes { - fn check_item(&mut self, cx: &EarlyContext<'_>, it: &ast::Item) { + /*fn check_item(&mut self, cx: &EarlyContext<'_>, it: &ast::Item) { let has_repr_c = it .attrs .iter() @@ -196,7 +196,7 @@ impl EarlyLintPass for NonCamelCaseTypes { if let ast::GenericParamKind::Type { .. } = param.kind { self.check_case(cx, "type parameter", ¶m.ident); } - } + }*/ } declare_lint! { @@ -327,7 +327,7 @@ impl NonSnakeCase { } impl<'tcx> LateLintPass<'tcx> for NonSnakeCase { - fn check_mod(&mut self, cx: &LateContext<'_>, _: &'tcx hir::Mod<'tcx>, id: hir::HirId) { + /*fn check_mod(&mut self, cx: &LateContext<'_>, _: &'tcx hir::Mod<'tcx>, id: hir::HirId) { if id != hir::CRATE_HIR_ID { return; } @@ -448,7 +448,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSnakeCase { for sf in s.fields() { self.check_snake_case(cx, "structure field", &sf.ident); } - } + }*/ } declare_lint! { @@ -503,7 +503,7 @@ impl NonUpperCaseGlobals { } impl<'tcx> LateLintPass<'tcx> for NonUpperCaseGlobals { - fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { let attrs = cx.tcx.hir().attrs(it.hir_id()); match it.kind { hir::ItemKind::Static(..) if !cx.sess().contains_name(attrs, sym::no_mangle) => { @@ -547,7 +547,7 @@ impl<'tcx> LateLintPass<'tcx> for NonUpperCaseGlobals { if let GenericParamKind::Const { .. } = param.kind { NonUpperCaseGlobals::check_upper_case(cx, "const parameter", ¶m.name.ident()); } - } + }*/ } #[cfg(test)] diff --git a/compiler/rustc_lint/src/noop_method_call.rs b/compiler/rustc_lint/src/noop_method_call.rs index d1449496d3315..f7406e3f44403 100644 --- a/compiler/rustc_lint/src/noop_method_call.rs +++ b/compiler/rustc_lint/src/noop_method_call.rs @@ -39,7 +39,7 @@ declare_lint! { declare_lint_pass!(NoopMethodCall => [NOOP_METHOD_CALL]); impl<'tcx> LateLintPass<'tcx> for NoopMethodCall { - fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { + /*fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { // We only care about method calls. let ExprKind::MethodCall(call, receiver, ..) = &expr.kind else { return @@ -98,5 +98,5 @@ impl<'tcx> LateLintPass<'tcx> for NoopMethodCall { .note(fluent::lint::note) .emit(); }); - } + }*/ } diff --git a/compiler/rustc_lint/src/pass_by_value.rs b/compiler/rustc_lint/src/pass_by_value.rs index af5e5faf1f568..b1aa4cd70afde 100644 --- a/compiler/rustc_lint/src/pass_by_value.rs +++ b/compiler/rustc_lint/src/pass_by_value.rs @@ -20,7 +20,7 @@ declare_tool_lint! { declare_lint_pass!(PassByValue => [PASS_BY_VALUE]); impl<'tcx> LateLintPass<'tcx> for PassByValue { - fn check_ty(&mut self, cx: &LateContext<'_>, ty: &'tcx hir::Ty<'tcx>) { + /*fn check_ty(&mut self, cx: &LateContext<'_>, ty: &'tcx hir::Ty<'tcx>) { match &ty.kind { TyKind::Rptr(_, hir::MutTy { ty: inner_ty, mutbl: hir::Mutability::Not }) => { if let Some(impl_did) = cx.tcx.impl_of_method(ty.hir_id.owner.to_def_id()) { @@ -45,7 +45,7 @@ impl<'tcx> LateLintPass<'tcx> for PassByValue { } _ => {} } - } + }*/ } fn path_for_pass_by_value(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> Option { diff --git a/compiler/rustc_lint/src/passes.rs b/compiler/rustc_lint/src/passes.rs index 1c6a057d1a85b..95dcc13a33cb7 100644 --- a/compiler/rustc_lint/src/passes.rs +++ b/compiler/rustc_lint/src/passes.rs @@ -123,7 +123,7 @@ macro_rules! declare_combined_late_lint_pass { } impl<'tcx> LateLintPass<'tcx> for $name { - expand_combined_late_lint_pass_methods!([$($passes),*], $methods); + //expand_combined_late_lint_pass_methods!([$($passes),*], $methods); } #[allow(rustc::lint_pass_impl_without_macro)] @@ -230,7 +230,7 @@ macro_rules! declare_combined_early_lint_pass { } impl EarlyLintPass for $name { - expand_combined_early_lint_pass_methods!([$($passes),*], $methods); + //expand_combined_early_lint_pass_methods!([$($passes),*], $methods); } #[allow(rustc::lint_pass_impl_without_macro)] diff --git a/compiler/rustc_lint/src/redundant_semicolon.rs b/compiler/rustc_lint/src/redundant_semicolon.rs index 26f41345383f9..7bb32798f6359 100644 --- a/compiler/rustc_lint/src/redundant_semicolon.rs +++ b/compiler/rustc_lint/src/redundant_semicolon.rs @@ -27,7 +27,7 @@ declare_lint! { declare_lint_pass!(RedundantSemicolons => [REDUNDANT_SEMICOLONS]); impl EarlyLintPass for RedundantSemicolons { - fn check_block(&mut self, cx: &EarlyContext<'_>, block: &Block) { + /*fn check_block(&mut self, cx: &EarlyContext<'_>, block: &Block) { let mut seq = None; for stmt in block.stmts.iter() { match (&stmt.kind, &mut seq) { @@ -37,7 +37,7 @@ impl EarlyLintPass for RedundantSemicolons { } } maybe_lint_redundant_semis(cx, &mut seq); - } + }*/ } fn maybe_lint_redundant_semis(cx: &EarlyContext<'_>, seq: &mut Option<(Span, bool)>) { diff --git a/compiler/rustc_lint/src/traits.rs b/compiler/rustc_lint/src/traits.rs index df1587c5948f5..a0336216e64e7 100644 --- a/compiler/rustc_lint/src/traits.rs +++ b/compiler/rustc_lint/src/traits.rs @@ -86,7 +86,7 @@ declare_lint_pass!( ); impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints { - fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) { + /*fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) { use rustc_middle::ty::PredicateKind::*; let predicates = cx.tcx.explicit_predicates_of(item.def_id); @@ -130,5 +130,5 @@ impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints { }); } } - } + }*/ } diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs index 4fb6d65a6e98f..f940d3e792b20 100644 --- a/compiler/rustc_lint/src/types.rs +++ b/compiler/rustc_lint/src/types.rs @@ -487,7 +487,7 @@ fn lint_literal<'tcx>( } impl<'tcx> LateLintPass<'tcx> for TypeLimits { - fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx hir::Expr<'tcx>) { + /*fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx hir::Expr<'tcx>) { match e.kind { hir::ExprKind::Unary(hir::UnOp::Neg, ref expr) => { // propagate negation, if the negation itself isn't negated @@ -585,7 +585,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeLimits { | hir::BinOpKind::Gt ) } - } + }*/ } declare_lint! { @@ -1290,7 +1290,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> { } impl<'tcx> LateLintPass<'tcx> for ImproperCTypesDeclarations { - fn check_foreign_item(&mut self, cx: &LateContext<'_>, it: &hir::ForeignItem<'_>) { + /*fn check_foreign_item(&mut self, cx: &LateContext<'_>, it: &hir::ForeignItem<'_>) { let mut vis = ImproperCTypesVisitor { cx, mode: CItemKind::Declaration }; let abi = cx.tcx.hir().get_foreign_abi(it.hir_id()); @@ -1305,11 +1305,11 @@ impl<'tcx> LateLintPass<'tcx> for ImproperCTypesDeclarations { hir::ForeignItemKind::Type => (), } } - } + }*/ } impl<'tcx> LateLintPass<'tcx> for ImproperCTypesDefinitions { - fn check_fn( + /*fn check_fn( &mut self, cx: &LateContext<'tcx>, kind: hir::intravisit::FnKind<'tcx>, @@ -1330,13 +1330,13 @@ impl<'tcx> LateLintPass<'tcx> for ImproperCTypesDefinitions { if !vis.is_internal_abi(abi) { vis.check_foreign_fn(hir_id, decl); } - } + }*/ } declare_lint_pass!(VariantSizeDifferences => [VARIANT_SIZE_DIFFERENCES]); impl<'tcx> LateLintPass<'tcx> for VariantSizeDifferences { - fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { + /*fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { if let hir::ItemKind::Enum(ref enum_definition, _) = it.kind { let t = cx.tcx.type_of(it.def_id); let ty = cx.tcx.erase_regions(t); @@ -1389,7 +1389,7 @@ impl<'tcx> LateLintPass<'tcx> for VariantSizeDifferences { ); } } - } + }*/ } declare_lint! { @@ -1563,9 +1563,9 @@ impl InvalidAtomicOrdering { } impl<'tcx> LateLintPass<'tcx> for InvalidAtomicOrdering { - fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { + /*fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { Self::check_atomic_load_store(cx, expr); Self::check_memory_fence(cx, expr); Self::check_atomic_compare_exchange(cx, expr); - } + }*/ } diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs index 3d426ecbfcb05..22f1b82410cfe 100644 --- a/compiler/rustc_lint/src/unused.rs +++ b/compiler/rustc_lint/src/unused.rs @@ -780,7 +780,7 @@ impl UnusedParens { } impl EarlyLintPass for UnusedParens { - fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) { + /*fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) { match e.kind { ExprKind::Let(ref pat, _, _) | ExprKind::ForLoop(ref pat, ..) => { self.check_unused_parens_pat(cx, pat, false, false); @@ -892,7 +892,7 @@ impl EarlyLintPass for UnusedParens { fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { ::check_item(self, cx, item) - } + }*/ } declare_lint! { @@ -992,7 +992,7 @@ impl UnusedDelimLint for UnusedBraces { } impl EarlyLintPass for UnusedBraces { - fn check_stmt(&mut self, cx: &EarlyContext<'_>, s: &ast::Stmt) { + /*fn check_stmt(&mut self, cx: &EarlyContext<'_>, s: &ast::Stmt) { ::check_stmt(self, cx, s) } @@ -1067,7 +1067,7 @@ impl EarlyLintPass for UnusedBraces { fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { ::check_item(self, cx, item) - } + }*/ } declare_lint! { @@ -1136,11 +1136,11 @@ impl UnusedImportBraces { } impl EarlyLintPass for UnusedImportBraces { - fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { + /*fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { if let ast::ItemKind::Use(ref use_tree) = item.kind { self.check_use_tree(cx, use_tree, item); } - } + }*/ } declare_lint! { diff --git a/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs b/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs index 285754928c219..30babd2c33020 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs @@ -19,13 +19,13 @@ declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'"); declare_lint_pass!(Pass => [TEST_LINT]); impl EarlyLintPass for Pass { - fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) { + /*fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) { if it.ident.name.as_str() == "lintme" { cx.lint(TEST_LINT, |lint| { lint.build("item is named 'lintme'").set_span(it.span).emit(); }); } - } + }*/ } #[no_mangle] diff --git a/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs b/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs index 3d5dba42b5f03..dbf468cf03467 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs @@ -29,7 +29,7 @@ declare_tool_lint!( declare_lint_pass!(Pass => [TEST_LINT, TEST_GROUP, TEST_RUSTC_TOOL_LINT]); impl EarlyLintPass for Pass { - fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) { + /*fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) { if it.ident.name.as_str() == "lintme" { cx.lint(TEST_LINT, |lint| { lint.build("item is named 'lintme'").set_span(it.span).emit(); @@ -40,7 +40,7 @@ impl EarlyLintPass for Pass { lint.build("item is named 'lintmetoo'").set_span(it.span).emit(); }); } - } + }*/ } #[no_mangle] From d0bc9cc60851186c97571b4b162c58366d39e930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Wed, 28 Sep 2022 19:34:37 +0200 Subject: [PATCH 2/2] Ignore warnings --- src/ci/pgo.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ci/pgo.sh b/src/ci/pgo.sh index b60b7868d068a..ba546d1e2c53c 100755 --- a/src/ci/pgo.sh +++ b/src/ci/pgo.sh @@ -91,7 +91,7 @@ LLVM_PROFILE_DIR=${LLVM_PROFILE_DIRECTORY_ROOT}/prof-%p python3 $CHECKOUT/x.py b --target=$PGO_HOST \ --host=$PGO_HOST \ --stage 2 library/std \ - --llvm-profile-generate + --llvm-profile-generate --warnings warn # Compile rustc-perf: # - get the expected commit source code: on linux, the Dockerfile downloads a source archive before @@ -150,7 +150,7 @@ RUSTC_PROFILE_DIRECTORY_ROOT=$PGO_TMP/rustc-pgo python3 $CHECKOUT/x.py build --target=$PGO_HOST --host=$PGO_HOST \ --stage 2 library/std \ - --rust-profile-generate=${RUSTC_PROFILE_DIRECTORY_ROOT} + --rust-profile-generate=${RUSTC_PROFILE_DIRECTORY_ROOT} --warnings warn # Here we're profiling the `rustc` frontend, so we also include `Check`. # The benchmark set includes various stress tests that put the frontend under pressure. @@ -194,7 +194,7 @@ rm -r $BUILD_ARTIFACTS/llvm $BUILD_ARTIFACTS/lld # collected profiling data. $@ \ --rust-profile-use=${RUSTC_PROFILE_MERGED_FILE} \ - --llvm-profile-use=${LLVM_PROFILE_MERGED_FILE} + --llvm-profile-use=${LLVM_PROFILE_MERGED_FILE} --warnings warn echo "Rustc binary size" ls -la ./build/$PGO_HOST/stage2/bin