Skip to content

Commit 03ee484

Browse files
committed
Auto merge of rust-lang#133179 - GuillaumeGomez:rollup-ro5rtts, r=GuillaumeGomez
Rollup of 5 pull requests Successful merges: - rust-lang#133156 (typo in config.example.toml) - rust-lang#133157 (stability: remove skip_stability_check_due_to_privacy) - rust-lang#133163 (remove pointless cold_path impl in interpreter) - rust-lang#133169 (Update autolabels for T-compiler and T-bootstrap) - rust-lang#133171 (Add the missing quotation mark in comment) r? `@ghost` `@rustbot` modify labels: rollup
2 parents c602e9a + 62d0235 commit 03ee484

File tree

8 files changed

+31
-45
lines changed

8 files changed

+31
-45
lines changed

Diff for: compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
12641264

12651265
sym::cold_path => {
12661266
// This is a no-op. The intrinsic is just a hint to the optimizer.
1267+
// We still have an impl here to avoid it being turned into a call.
12671268
}
12681269

12691270
// Unimplemented intrinsics must have a fallback body. The fallback body is obtained

Diff for: compiler/rustc_const_eval/src/interpret/intrinsics.rs

-3
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
417417
// These just return their argument
418418
self.copy_op(&args[0], dest)?;
419419
}
420-
sym::cold_path => {
421-
// This is a no-op. The intrinsic is just a hint to the optimizer.
422-
}
423420
sym::raw_eq => {
424421
let result = self.raw_eq_intrinsic(&args[0], &args[1])?;
425422
self.write_scalar(result, dest)?;

Diff for: compiler/rustc_middle/src/middle/stability.rs

+1-28
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use rustc_attr::{
1010
use rustc_data_structures::unord::UnordMap;
1111
use rustc_errors::{Applicability, Diag, EmissionGuarantee};
1212
use rustc_feature::GateIssue;
13-
use rustc_hir::def::DefKind;
1413
use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap};
1514
use rustc_hir::{self as hir, HirId};
1615
use rustc_macros::{Decodable, Encodable, HashStable, Subdiagnostic};
@@ -24,7 +23,7 @@ use rustc_span::symbol::{Symbol, sym};
2423
use tracing::debug;
2524

2625
pub use self::StabilityLevel::*;
27-
use crate::ty::{self, TyCtxt};
26+
use crate::ty::TyCtxt;
2827

2928
#[derive(PartialEq, Clone, Copy, Debug)]
3029
pub enum StabilityLevel {
@@ -273,22 +272,6 @@ pub enum EvalResult {
273272
Unmarked,
274273
}
275274

276-
// See issue #38412.
277-
fn skip_stability_check_due_to_privacy(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
278-
if tcx.def_kind(def_id) == DefKind::TyParam {
279-
// Have no visibility, considered public for the purpose of this check.
280-
return false;
281-
}
282-
match tcx.visibility(def_id) {
283-
// Must check stability for `pub` items.
284-
ty::Visibility::Public => false,
285-
286-
// These are not visible outside crate; therefore
287-
// stability markers are irrelevant, if even present.
288-
ty::Visibility::Restricted(..) => true,
289-
}
290-
}
291-
292275
// See issue #83250.
293276
fn suggestion_for_allocator_api(
294277
tcx: TyCtxt<'_>,
@@ -407,11 +390,6 @@ impl<'tcx> TyCtxt<'tcx> {
407390
def_id, span, stability
408391
);
409392

410-
// Issue #38412: private items lack stability markers.
411-
if skip_stability_check_due_to_privacy(self, def_id) {
412-
return EvalResult::Allow;
413-
}
414-
415393
match stability {
416394
Some(Stability {
417395
level: attr::Unstable { reason, issue, is_soft, implied_by },
@@ -495,11 +473,6 @@ impl<'tcx> TyCtxt<'tcx> {
495473
"body stability: inspecting def_id={def_id:?} span={span:?} of stability={stability:?}"
496474
);
497475

498-
// Issue #38412: private items lack stability markers.
499-
if skip_stability_check_due_to_privacy(self, def_id) {
500-
return EvalResult::Allow;
501-
}
502-
503476
match stability {
504477
Some(DefaultBodyStability {
505478
level: attr::Unstable { reason, issue, is_soft, .. },

Diff for: config.example.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
# Indicates whether the LLVM plugin is enabled or not
8282
#plugins = false
8383

84-
# Wheter to build Enzyme as AutoDiff backend.
84+
# Whether to build Enzyme as AutoDiff backend.
8585
#enzyme = false
8686

8787
# Whether to build LLVM with support for it's gpu offload runtime.

Diff for: tests/ui/auxiliary/pub-and-stability.rs

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

Diff for: tests/ui/explore-issue-38412.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//@ aux-build:pub-and-stability.rs
22

3-
// A big point of this test is that we *declare* `unstable_declared`,
4-
// but do *not* declare `unstable_undeclared`. This way we can check
5-
// that the compiler is letting in uses of declared feature-gated
6-
// stuff but still rejecting uses of undeclared feature-gated stuff.
3+
// A big point of this test is that we *enable* `unstable_declared`,
4+
// but do *not* enable `unstable_undeclared`. This way we can check
5+
// that the compiler is letting in uses of enabled feature-gated
6+
// stuff but still rejecting uses of disabled feature-gated stuff.
77
#![feature(unstable_declared)]
88

99
extern crate pub_and_stability;

Diff for: tests/ui/feature-gates/feature-gate-large-assignments.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check that `move_size_limit is feature-gated
1+
// check that `move_size_limit` is feature-gated
22

33
#![move_size_limit = "42"] //~ ERROR the `#[move_size_limit]` attribute is an experimental feature
44

Diff for: triagebot.toml

+21-6
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,21 @@ trigger_files = [
236236
"compiler",
237237

238238
# Tests
239+
"tests/assembly",
240+
"tests/auxiliary",
241+
"tests/codegen",
242+
"tests/codegen-units",
243+
"tests/COMPILER_TESTS.md",
244+
"tests/coverage",
245+
"tests/coverage-run-rustdoc",
246+
"tests/crashes",
247+
"tests/debuginfo",
248+
"tests/incremental",
249+
"tests/mir-opt",
250+
"tests/pretty",
251+
"tests/run-make",
239252
"tests/ui",
253+
"tests/ui-fulldeps",
240254
]
241255
exclude_labels = [
242256
"T-*",
@@ -353,21 +367,22 @@ trigger_files = [
353367

354368
[autolabel."T-bootstrap"]
355369
trigger_files = [
356-
"x.py",
357-
"x",
358-
"x.ps1",
370+
"Cargo.toml",
371+
"configure",
372+
"config.example.toml",
359373
"src/bootstrap",
374+
"src/build_helper",
360375
"src/tools/rust-installer",
361376
"src/tools/x",
362-
"configure",
363-
"Cargo.toml",
364-
"config.example.toml",
365377
"src/stage0",
366378
"src/tools/compiletest",
367379
"src/tools/tidy",
368380
"src/tools/rustdoc-gui-test",
369381
"src/tools/libcxx-version",
370382
"src/tools/rustc-perf-wrapper",
383+
"x.py",
384+
"x",
385+
"x.ps1"
371386
]
372387

373388
[autolabel."T-infra"]

0 commit comments

Comments
 (0)