Auto merge of #133179 - GuillaumeGomez:rollup-ro5rtts, r=GuillaumeGomez

Rollup of 5 pull requests

Successful merges:

 - #133156 (typo in config.example.toml)
 - #133157 (stability: remove skip_stability_check_due_to_privacy)
 - #133163 (remove pointless cold_path impl in interpreter)
 - #133169 (Update autolabels for T-compiler and T-bootstrap)
 - #133171 (Add the missing quotation mark in comment)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2024-11-18 17:58:35 +00:00
commit 03ee484519
8 changed files with 31 additions and 45 deletions

View File

@ -1264,6 +1264,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
sym::cold_path => { sym::cold_path => {
// This is a no-op. The intrinsic is just a hint to the optimizer. // 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 // Unimplemented intrinsics must have a fallback body. The fallback body is obtained

View File

@ -417,9 +417,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
// These just return their argument // These just return their argument
self.copy_op(&args[0], dest)?; 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 => { sym::raw_eq => {
let result = self.raw_eq_intrinsic(&args[0], &args[1])?; let result = self.raw_eq_intrinsic(&args[0], &args[1])?;
self.write_scalar(result, dest)?; self.write_scalar(result, dest)?;

View File

@ -10,7 +10,6 @@ use rustc_attr::{
use rustc_data_structures::unord::UnordMap; use rustc_data_structures::unord::UnordMap;
use rustc_errors::{Applicability, Diag, EmissionGuarantee}; use rustc_errors::{Applicability, Diag, EmissionGuarantee};
use rustc_feature::GateIssue; use rustc_feature::GateIssue;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap}; use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap};
use rustc_hir::{self as hir, HirId}; use rustc_hir::{self as hir, HirId};
use rustc_macros::{Decodable, Encodable, HashStable, Subdiagnostic}; use rustc_macros::{Decodable, Encodable, HashStable, Subdiagnostic};
@ -24,7 +23,7 @@ use rustc_span::symbol::{Symbol, sym};
use tracing::debug; use tracing::debug;
pub use self::StabilityLevel::*; pub use self::StabilityLevel::*;
use crate::ty::{self, TyCtxt}; use crate::ty::TyCtxt;
#[derive(PartialEq, Clone, Copy, Debug)] #[derive(PartialEq, Clone, Copy, Debug)]
pub enum StabilityLevel { pub enum StabilityLevel {
@ -273,22 +272,6 @@ pub enum EvalResult {
Unmarked, 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. // See issue #83250.
fn suggestion_for_allocator_api( fn suggestion_for_allocator_api(
tcx: TyCtxt<'_>, tcx: TyCtxt<'_>,
@ -407,11 +390,6 @@ impl<'tcx> TyCtxt<'tcx> {
def_id, span, stability 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 { match stability {
Some(Stability { Some(Stability {
level: attr::Unstable { reason, issue, is_soft, implied_by }, 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:?}" "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 { match stability {
Some(DefaultBodyStability { Some(DefaultBodyStability {
level: attr::Unstable { reason, issue, is_soft, .. }, level: attr::Unstable { reason, issue, is_soft, .. },

View File

@ -81,7 +81,7 @@
# Indicates whether the LLVM plugin is enabled or not # Indicates whether the LLVM plugin is enabled or not
#plugins = false #plugins = false
# Wheter to build Enzyme as AutoDiff backend. # Whether to build Enzyme as AutoDiff backend.
#enzyme = false #enzyme = false
# Whether to build LLVM with support for it's gpu offload runtime. # Whether to build LLVM with support for it's gpu offload runtime.

View File

@ -5,8 +5,8 @@
// The basic stability pattern in this file has four cases: // The basic stability pattern in this file has four cases:
// 1. no stability attribute at all // 1. no stability attribute at all
// 2. a stable attribute (feature "unit_test") // 2. a stable attribute (feature "unit_test")
// 3. an unstable attribute that unit test declares (feature "unstable_declared") // 3. an unstable attribute that unit test enables (feature "unstable_declared")
// 4. an unstable attribute that unit test fails to declare (feature "unstable_undeclared") // 4. an unstable attribute that unit test fails to enable (feature "unstable_undeclared")
// //
// This file also covers four kinds of visibility: private, // This file also covers four kinds of visibility: private,
// pub(module), pub(crate), and pub. // pub(module), pub(crate), and pub.

View File

@ -1,9 +1,9 @@
//@ aux-build:pub-and-stability.rs //@ aux-build:pub-and-stability.rs
// A big point of this test is that we *declare* `unstable_declared`, // A big point of this test is that we *enable* `unstable_declared`,
// but do *not* declare `unstable_undeclared`. This way we can check // but do *not* enable `unstable_undeclared`. This way we can check
// that the compiler is letting in uses of declared feature-gated // that the compiler is letting in uses of enabled feature-gated
// stuff but still rejecting uses of undeclared feature-gated stuff. // stuff but still rejecting uses of disabled feature-gated stuff.
#![feature(unstable_declared)] #![feature(unstable_declared)]
extern crate pub_and_stability; extern crate pub_and_stability;

View File

@ -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 #![move_size_limit = "42"] //~ ERROR the `#[move_size_limit]` attribute is an experimental feature

View File

@ -236,7 +236,21 @@ trigger_files = [
"compiler", "compiler",
# Tests # 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",
"tests/ui-fulldeps",
] ]
exclude_labels = [ exclude_labels = [
"T-*", "T-*",
@ -353,21 +367,22 @@ trigger_files = [
[autolabel."T-bootstrap"] [autolabel."T-bootstrap"]
trigger_files = [ trigger_files = [
"x.py", "Cargo.toml",
"x", "configure",
"x.ps1", "config.example.toml",
"src/bootstrap", "src/bootstrap",
"src/build_helper",
"src/tools/rust-installer", "src/tools/rust-installer",
"src/tools/x", "src/tools/x",
"configure",
"Cargo.toml",
"config.example.toml",
"src/stage0", "src/stage0",
"src/tools/compiletest", "src/tools/compiletest",
"src/tools/tidy", "src/tools/tidy",
"src/tools/rustdoc-gui-test", "src/tools/rustdoc-gui-test",
"src/tools/libcxx-version", "src/tools/libcxx-version",
"src/tools/rustc-perf-wrapper", "src/tools/rustc-perf-wrapper",
"x.py",
"x",
"x.ps1"
] ]
[autolabel."T-infra"] [autolabel."T-infra"]