Skip to content

Commit bece740

Browse files
committed
Auto merge of rust-lang#131269 - workingjubilee:rollup-bf7fzhf, r=workingjubilee
Rollup of 10 pull requests Successful merges: - rust-lang#130453 (Add x86_64-unknown-trusty as tier 3 target) - rust-lang#130518 (Stabilize the `map`/`value` methods on `ControlFlow`) - rust-lang#131116 (Increase Stack Size for AIX) - rust-lang#131171 (Fix `target_env` in `avr-unknown-gnu-atmega328`) - rust-lang#131174 (Fix `target_abi` in `sparc-unknown-none-elf`) - rust-lang#131177 ( Stabilize 5 `const_mut_refs`-dependent API) - rust-lang#131238 (Remove mw from triagebot.toml) - rust-lang#131240 (Fix typo in csky-unknown-linux-gnuabiv2.md) - rust-lang#131257 ([rustdoc] Fix list margins) - rust-lang#131264 (Fix some `pub(crate)` that were undetected bc of `#[instrument]`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 14f303b + 4778893 commit bece740

File tree

68 files changed

+159
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+159
-105
lines changed

compiler/rustc_borrowck/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![doc(rust_logo)]
66
#![feature(assert_matches)]
77
#![feature(box_patterns)]
8-
#![feature(control_flow_enum)]
98
#![feature(file_buffered)]
109
#![feature(let_chains)]
1110
#![feature(never_type)]

compiler/rustc_borrowck/src/renumber.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::BorrowckInferCtxt;
1111
/// Replaces all free regions appearing in the MIR with fresh
1212
/// inference variables, returning the number of variables created.
1313
#[instrument(skip(infcx, body, promoted), level = "debug")]
14-
pub fn renumber_mir<'tcx>(
14+
pub(crate) fn renumber_mir<'tcx>(
1515
infcx: &BorrowckInferCtxt<'tcx>,
1616
body: &mut Body<'tcx>,
1717
promoted: &mut IndexSlice<Promoted, Body<'tcx>>,

compiler/rustc_borrowck/src/type_check/constraint_conversion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> {
9797
/// that we computed for the closure. This has the effect of adding new outlives obligations
9898
/// to existing region variables in `closure_args`.
9999
#[instrument(skip(self), level = "debug")]
100-
pub fn apply_closure_requirements(
100+
pub(crate) fn apply_closure_requirements(
101101
&mut self,
102102
closure_requirements: &ClosureRegionRequirements<'tcx>,
103103
closure_def_id: DefId,

compiler/rustc_data_structures/src/stack.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ const RED_ZONE: usize = 100 * 1024; // 100k
55

66
// Only the first stack that is pushed, grows exponentially (2^n * STACK_PER_RECURSION) from then
77
// on. This flag has performance relevant characteristics. Don't set it too high.
8+
#[cfg(not(target_os = "aix"))]
89
const STACK_PER_RECURSION: usize = 1024 * 1024; // 1MB
10+
// LLVM for AIX doesn't feature TCO, increase recursion size for workaround.
11+
#[cfg(target_os = "aix")]
12+
const STACK_PER_RECURSION: usize = 16 * 1024 * 1024; // 16MB
913

1014
/// Grows the stack on demand to prevent stack overflow. Call this in strategic locations
1115
/// to "break up" recursive calls. E.g. almost any call to `visit_expr` or equivalent can benefit

compiler/rustc_hir_analysis/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ This API is completely unstable and subject to change.
6262
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
6363
#![doc(rust_logo)]
6464
#![feature(assert_matches)]
65-
#![feature(control_flow_enum)]
6665
#![feature(if_let_guard)]
6766
#![feature(iter_intersperse)]
6867
#![feature(let_chains)]

compiler/rustc_hir_typeck/src/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::{Diverges, Expectation, FnCtxt, Needs};
1515

1616
impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1717
#[instrument(skip(self), level = "debug", ret)]
18-
pub fn check_match(
18+
pub(crate) fn check_match(
1919
&self,
2020
expr: &'tcx hir::Expr<'tcx>,
2121
scrut: &'tcx hir::Expr<'tcx>,

compiler/rustc_hir_typeck/src/cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
671671
}
672672

673673
#[instrument(skip(fcx), level = "debug")]
674-
pub fn check(mut self, fcx: &FnCtxt<'a, 'tcx>) {
674+
pub(crate) fn check(mut self, fcx: &FnCtxt<'a, 'tcx>) {
675675
self.expr_ty = fcx.structurally_resolve_type(self.expr_span, self.expr_ty);
676676
self.cast_ty = fcx.structurally_resolve_type(self.cast_span, self.cast_ty);
677677

compiler/rustc_hir_typeck/src/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct ClosureSignatures<'tcx> {
4444

4545
impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
4646
#[instrument(skip(self, closure), level = "debug")]
47-
pub fn check_expr_closure(
47+
pub(crate) fn check_expr_closure(
4848
&self,
4949
closure: &hir::Closure<'tcx>,
5050
expr_span: Span,

compiler/rustc_hir_typeck/src/demand.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
182182
}
183183

184184
#[instrument(skip(self), level = "debug")]
185-
pub fn demand_suptype_with_origin(
185+
pub(crate) fn demand_suptype_with_origin(
186186
&'a self,
187187
cause: &ObligationCause<'tcx>,
188188
expected: Ty<'tcx>,
@@ -247,7 +247,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
247247
/// N.B., this code relies on `self.diverges` to be accurate. In particular, assignments to `!`
248248
/// will be permitted if the diverges flag is currently "always".
249249
#[instrument(level = "debug", skip(self, expr, expected_ty_expr, allow_two_phase))]
250-
pub fn demand_coerce_diag(
250+
pub(crate) fn demand_coerce_diag(
251251
&'a self,
252252
mut expr: &'tcx hir::Expr<'tcx>,
253253
checked_ty: Ty<'tcx>,

compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
187187
}
188188

189189
#[instrument(level = "debug", skip(self))]
190-
pub fn write_method_call_and_enforce_effects(
190+
pub(crate) fn write_method_call_and_enforce_effects(
191191
&self,
192192
hir_id: HirId,
193193
span: Span,
@@ -214,7 +214,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
214214
/// occurred**, so that annotations like `Vec<_>` are preserved
215215
/// properly.
216216
#[instrument(skip(self), level = "debug")]
217-
pub fn write_user_type_annotation_from_args(
217+
pub(crate) fn write_user_type_annotation_from_args(
218218
&self,
219219
hir_id: HirId,
220220
def_id: DefId,
@@ -235,7 +235,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
235235
}
236236

237237
#[instrument(skip(self), level = "debug")]
238-
pub fn write_user_type_annotation(
238+
pub(crate) fn write_user_type_annotation(
239239
&self,
240240
hir_id: HirId,
241241
canonical_user_type_annotation: CanonicalUserType<'tcx>,
@@ -254,7 +254,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
254254
}
255255

256256
#[instrument(skip(self, expr), level = "debug")]
257-
pub fn apply_adjustments(&self, expr: &hir::Expr<'_>, adj: Vec<Adjustment<'tcx>>) {
257+
pub(crate) fn apply_adjustments(&self, expr: &hir::Expr<'_>, adj: Vec<Adjustment<'tcx>>) {
258258
debug!("expr = {:#?}", expr);
259259

260260
if adj.is_empty() {
@@ -448,7 +448,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
448448
}
449449

450450
#[instrument(level = "debug", skip_all)]
451-
pub fn lower_ty_saving_user_provided_ty(&self, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> {
451+
pub(crate) fn lower_ty_saving_user_provided_ty(&self, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> {
452452
let ty = self.lower_ty(hir_ty);
453453
debug!(?ty);
454454

@@ -736,7 +736,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
736736
/// Resolves an associated value path into a base type and associated constant, or method
737737
/// resolution. The newly resolved definition is written into `type_dependent_defs`.
738738
#[instrument(level = "trace", skip(self), ret)]
739-
pub fn resolve_ty_and_res_fully_qualified_call(
739+
pub(crate) fn resolve_ty_and_res_fully_qualified_call(
740740
&self,
741741
qpath: &'tcx QPath<'tcx>,
742742
hir_id: HirId,
@@ -995,7 +995,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
995995
// Instantiates the given path, which must refer to an item with the given
996996
// number of type parameters and type.
997997
#[instrument(skip(self, span), level = "debug")]
998-
pub fn instantiate_value_path(
998+
pub(crate) fn instantiate_value_path(
999999
&self,
10001000
segments: &'tcx [hir::PathSegment<'tcx>],
10011001
self_ty: Option<LoweredTy<'tcx>>,
@@ -1446,7 +1446,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
14461446
/// variable. This is different from `structurally_resolve_type` which errors
14471447
/// in this case.
14481448
#[instrument(level = "debug", skip(self, sp), ret)]
1449-
pub fn try_structurally_resolve_type(&self, sp: Span, ty: Ty<'tcx>) -> Ty<'tcx> {
1449+
pub(crate) fn try_structurally_resolve_type(&self, sp: Span, ty: Ty<'tcx>) -> Ty<'tcx> {
14501450
let ty = self.resolve_vars_with_obligations(ty);
14511451

14521452
if self.next_trait_solver()
@@ -1471,7 +1471,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
14711471
}
14721472

14731473
#[instrument(level = "debug", skip(self, sp), ret)]
1474-
pub fn try_structurally_resolve_const(&self, sp: Span, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {
1474+
pub(crate) fn try_structurally_resolve_const(
1475+
&self,
1476+
sp: Span,
1477+
ct: ty::Const<'tcx>,
1478+
) -> ty::Const<'tcx> {
14751479
// FIXME(min_const_generic_exprs): We could process obligations here if `ct` is a var.
14761480

14771481
if self.next_trait_solver()

0 commit comments

Comments
 (0)