From bedecf94ce3d90c2164f99410706b70e2b8a441f Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 18 Nov 2024 07:45:33 +0200 Subject: [PATCH 1/6] typo in config.example.toml --- config.example.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.example.toml b/config.example.toml index 9dc71b10f70..d3233ad17b5 100644 --- a/config.example.toml +++ b/config.example.toml @@ -81,7 +81,7 @@ # Indicates whether the LLVM plugin is enabled or not #plugins = false -# Wheter to build Enzyme as AutoDiff backend. +# Whether to build Enzyme as AutoDiff backend. #enzyme = false # Whether to build LLVM with support for it's gpu offload runtime. From b07ed6ab164bf58a0fcfe7a365d5341c0e7b7e7d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 18 Nov 2024 08:05:30 +0100 Subject: [PATCH 2/6] stability: remove skip_stability_check_due_to_privacy --- compiler/rustc_middle/src/middle/stability.rs | 29 +------------------ tests/ui/auxiliary/pub-and-stability.rs | 4 +-- tests/ui/explore-issue-38412.rs | 8 ++--- 3 files changed, 7 insertions(+), 34 deletions(-) diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index e6b36299d7f..94d13021612 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -10,7 +10,6 @@ use rustc_attr::{ use rustc_data_structures::unord::UnordMap; use rustc_errors::{Applicability, Diag, EmissionGuarantee}; use rustc_feature::GateIssue; -use rustc_hir::def::DefKind; use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap}; use rustc_hir::{self as hir, HirId}; use rustc_macros::{Decodable, Encodable, HashStable, Subdiagnostic}; @@ -24,7 +23,7 @@ use rustc_span::symbol::{Symbol, sym}; use tracing::debug; pub use self::StabilityLevel::*; -use crate::ty::{self, TyCtxt}; +use crate::ty::TyCtxt; #[derive(PartialEq, Clone, Copy, Debug)] pub enum StabilityLevel { @@ -273,22 +272,6 @@ pub enum EvalResult { Unmarked, } -// See issue #38412. -fn skip_stability_check_due_to_privacy(tcx: TyCtxt<'_>, def_id: DefId) -> bool { - if tcx.def_kind(def_id) == DefKind::TyParam { - // Have no visibility, considered public for the purpose of this check. - return false; - } - match tcx.visibility(def_id) { - // Must check stability for `pub` items. - ty::Visibility::Public => false, - - // These are not visible outside crate; therefore - // stability markers are irrelevant, if even present. - ty::Visibility::Restricted(..) => true, - } -} - // See issue #83250. fn suggestion_for_allocator_api( tcx: TyCtxt<'_>, @@ -407,11 +390,6 @@ impl<'tcx> TyCtxt<'tcx> { def_id, span, stability ); - // Issue #38412: private items lack stability markers. - if skip_stability_check_due_to_privacy(self, def_id) { - return EvalResult::Allow; - } - match stability { Some(Stability { level: attr::Unstable { reason, issue, is_soft, implied_by }, @@ -495,11 +473,6 @@ impl<'tcx> TyCtxt<'tcx> { "body stability: inspecting def_id={def_id:?} span={span:?} of stability={stability:?}" ); - // Issue #38412: private items lack stability markers. - if skip_stability_check_due_to_privacy(self, def_id) { - return EvalResult::Allow; - } - match stability { Some(DefaultBodyStability { level: attr::Unstable { reason, issue, is_soft, .. }, diff --git a/tests/ui/auxiliary/pub-and-stability.rs b/tests/ui/auxiliary/pub-and-stability.rs index ee05a07dbb2..d2d07f99398 100644 --- a/tests/ui/auxiliary/pub-and-stability.rs +++ b/tests/ui/auxiliary/pub-and-stability.rs @@ -5,8 +5,8 @@ // The basic stability pattern in this file has four cases: // 1. no stability attribute at all // 2. a stable attribute (feature "unit_test") -// 3. an unstable attribute that unit test declares (feature "unstable_declared") -// 4. an unstable attribute that unit test fails to declare (feature "unstable_undeclared") +// 3. an unstable attribute that unit test enables (feature "unstable_declared") +// 4. an unstable attribute that unit test fails to enable (feature "unstable_undeclared") // // This file also covers four kinds of visibility: private, // pub(module), pub(crate), and pub. diff --git a/tests/ui/explore-issue-38412.rs b/tests/ui/explore-issue-38412.rs index e1295a96ba5..2008b120faa 100644 --- a/tests/ui/explore-issue-38412.rs +++ b/tests/ui/explore-issue-38412.rs @@ -1,9 +1,9 @@ //@ aux-build:pub-and-stability.rs -// A big point of this test is that we *declare* `unstable_declared`, -// but do *not* declare `unstable_undeclared`. This way we can check -// that the compiler is letting in uses of declared feature-gated -// stuff but still rejecting uses of undeclared feature-gated stuff. +// A big point of this test is that we *enable* `unstable_declared`, +// but do *not* enable `unstable_undeclared`. This way we can check +// that the compiler is letting in uses of enabled feature-gated +// stuff but still rejecting uses of disabled feature-gated stuff. #![feature(unstable_declared)] extern crate pub_and_stability; From dff98a8a144f7ebf19d8d238aed8f0e2c2375086 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 18 Nov 2024 08:41:28 +0100 Subject: [PATCH 3/6] remove pointless cold_path impl in interpreter --- compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs | 1 + compiler/rustc_const_eval/src/interpret/intrinsics.rs | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs index b92885cc1a7..6cf1cff183d 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs @@ -1264,6 +1264,7 @@ fn codegen_regular_intrinsic_call<'tcx>( sym::cold_path => { // This is a no-op. The intrinsic is just a hint to the optimizer. + // We still have an impl here to avoid it being turned into a call. } // Unimplemented intrinsics must have a fallback body. The fallback body is obtained diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs index d89d73824aa..c7a56a80e81 100644 --- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs +++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs @@ -417,9 +417,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // These just return their argument self.copy_op(&args[0], dest)?; } - sym::cold_path => { - // This is a no-op. The intrinsic is just a hint to the optimizer. - } sym::raw_eq => { let result = self.raw_eq_intrinsic(&args[0], &args[1])?; self.write_scalar(result, dest)?; From 1569414574d6560c4730498021f443bf77dc0442 Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Mon, 18 Nov 2024 20:03:57 +0800 Subject: [PATCH 4/6] Tag more test suite changes with `T-compiler` --- triagebot.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/triagebot.toml b/triagebot.toml index c5942fe27cd..8510883c202 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -236,7 +236,21 @@ trigger_files = [ "compiler", # Tests + "tests/assembly", + "tests/auxiliary", + "tests/codegen", + "tests/codegen-units", + "tests/COMPILER_TESTS.md", + "tests/coverage", + "tests/coverage-run-rustdoc", + "tests/crashes", + "tests/debuginfo", + "tests/incremental", + "tests/mir-opt", + "tests/pretty", + "tests/run-make", "tests/ui", + "tests/ui-fulldeps", ] exclude_labels = [ "T-*", From 75661c535f2517920ec2064b480945f79caed6e7 Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Mon, 18 Nov 2024 20:07:03 +0800 Subject: [PATCH 5/6] Tag `src/build_helper` with `T-bootstrap` --- triagebot.toml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/triagebot.toml b/triagebot.toml index 8510883c202..6154ffedc14 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -367,21 +367,22 @@ trigger_files = [ [autolabel."T-bootstrap"] trigger_files = [ - "x.py", - "x", - "x.ps1", + "Cargo.toml", + "configure", + "config.example.toml", "src/bootstrap", + "src/build_helper", "src/tools/rust-installer", "src/tools/x", - "configure", - "Cargo.toml", - "config.example.toml", "src/stage0", "src/tools/compiletest", "src/tools/tidy", "src/tools/rustdoc-gui-test", "src/tools/libcxx-version", "src/tools/rustc-perf-wrapper", + "x.py", + "x", + "x.ps1" ] [autolabel."T-infra"] From a307c5499e47adc639100e6cb8c2689274644eb5 Mon Sep 17 00:00:00 2001 From: binchengqu Date: Mon, 18 Nov 2024 20:18:22 +0800 Subject: [PATCH 6/6] Add the missing quotation mark in comment Signed-off-by: binchengqu --- tests/ui/feature-gates/feature-gate-large-assignments.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ui/feature-gates/feature-gate-large-assignments.rs b/tests/ui/feature-gates/feature-gate-large-assignments.rs index 7e9e574bfa0..c4125c55722 100644 --- a/tests/ui/feature-gates/feature-gate-large-assignments.rs +++ b/tests/ui/feature-gates/feature-gate-large-assignments.rs @@ -1,4 +1,4 @@ -// check that `move_size_limit is feature-gated +// check that `move_size_limit` is feature-gated #![move_size_limit = "42"] //~ ERROR the `#[move_size_limit]` attribute is an experimental feature