Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 89886e6

Browse files
committed
Auto merge of rust-lang#80314 - GuillaumeGomez:rollup-9rc48vx, r=GuillaumeGomez
Rollup of 17 pull requests Successful merges: - rust-lang#80136 (Add test for issue rust-lang#74824) - rust-lang#80203 (Edit rustc_middle::lint::LintSource docs) - rust-lang#80204 (docs: Edit rustc_middle::ty::query::on_disk_cache) - rust-lang#80219 (Fix labels for 'Library Tracking Issue' template) - rust-lang#80222 (Fix rustc-std-workspace-core documentation) - rust-lang#80223 (docs: Fix outdated crate reference) - rust-lang#80225 (Add module-level docs to rustc_middle::ty) - rust-lang#80241 (Fix typo) - rust-lang#80248 (Remove `I-prioritize` from Zulip topic) - rust-lang#80266 (Remove redundant test) - rust-lang#80272 (rustc_span: Provide a reserved identifier check for a specific edition) - rust-lang#80285 (Update books) - rust-lang#80286 (docs: Edit rustc_middle::middle::privacy) - rust-lang#80297 (Add some intra-doc links to compiler docs) - rust-lang#80298 (Improve the code quality by using matches macro) - rust-lang#80299 (Turn helper method into a closure) - rust-lang#80302 (docs: Update rustc_middle::middle::region::ScopeTree) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 969b42d + 67f8244 commit 89886e6

File tree

25 files changed

+160
-84
lines changed

25 files changed

+160
-84
lines changed

.github/ISSUE_TEMPLATE/library_tracking_issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Library Tracking Issue
33
about: A tracking issue for an unstable library feature.
44
title: Tracking Issue for XXX
5-
labels: C-tracking-issue T-libs
5+
labels: C-tracking-issue, T-libs
66
---
77
<!--
88
Thank you for creating a tracking issue!

compiler/rustc_builtin_macros/src/deriving/generic/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ pub struct Substructure<'a> {
257257
pub type_ident: Ident,
258258
/// ident of the method
259259
pub method_ident: Ident,
260-
/// dereferenced access to any `Self_` or `Ptr(Self_, _)` arguments
260+
/// dereferenced access to any [`Self_`] or [`Ptr(Self_, _)][ptr]` arguments
261+
///
262+
/// [`Self_`]: ty::Ty::Self_
263+
/// [ptr]: ty::Ty::Ptr
261264
pub self_args: &'a [P<Expr>],
262265
/// verbatim access to any other arguments
263266
pub nonself_args: &'a [P<Expr>],

compiler/rustc_interface/src/interface.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ use std::sync::{Arc, Mutex};
2525
pub type Result<T> = result::Result<T, ErrorReported>;
2626

2727
/// Represents a compiler session.
28+
///
2829
/// Can be used to run `rustc_interface` queries.
29-
/// Created by passing `Config` to `run_compiler`.
30+
/// Created by passing [`Config`] to [`run_compiler`].
3031
pub struct Compiler {
3132
pub(crate) sess: Lrc<Session>,
3233
codegen_backend: Lrc<Box<dyn CodegenBackend>>,

compiler/rustc_interface/src/passes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ declare_box_region_type!(
9595
/// harness if one is to be provided, injection of a dependency on the
9696
/// standard library and prelude, and name resolution.
9797
///
98-
/// Returns `None` if we're aborting after handling -W help.
98+
/// Returns [`None`] if we're aborting after handling -W help.
9999
pub fn configure_and_expand(
100100
sess: Lrc<Session>,
101101
lint_store: Lrc<LintStore>,

compiler/rustc_interface/src/queries.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ use std::cell::{Ref, RefCell, RefMut};
2323
use std::rc::Rc;
2424

2525
/// Represent the result of a query.
26-
/// This result can be stolen with the `take` method and generated with the `compute` method.
26+
///
27+
/// This result can be stolen with the [`take`] method and generated with the [`compute`] method.
28+
///
29+
/// [`take`]: Self::take
30+
/// [`compute`]: Self::compute
2731
pub struct Query<T> {
2832
result: RefCell<Option<Result<T>>>,
2933
}

compiler/rustc_middle/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! - **MIR.** The "mid-level (M) intermediate representation (IR)" is
99
//! defined in the `mir` module. This module contains only the
1010
//! *definition* of the MIR; the passes that transform and operate
11-
//! on MIR are found in `librustc_mir` crate.
11+
//! on MIR are found in `rustc_mir` crate.
1212
//! - **Types.** The internal representation of types used in rustc is
1313
//! defined in the `ty` module. This includes the **type context**
1414
//! (or `tcx`), which is the central context during most of

compiler/rustc_middle/src/lint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ pub enum LintSource {
2222
Node(Symbol, Span, Option<Symbol> /* RFC 2383 reason */),
2323

2424
/// Lint level was set by a command-line flag.
25-
/// The provided `Level` is the level specified on the command line -
26-
/// the actual level may be lower due to `--cap-lints`
25+
/// The provided `Level` is the level specified on the command line.
26+
/// (The actual level may be lower due to `--cap-lints`.)
2727
CommandLine(Symbol, Level),
2828
}
2929

compiler/rustc_middle/src/middle/privacy.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ use rustc_macros::HashStable;
88
use std::fmt;
99
use std::hash::Hash;
1010

11-
// Accessibility levels, sorted in ascending order
11+
/// Represents the levels of accessibility an item can have.
12+
///
13+
/// The variants are sorted in ascending order of accessibility.
1214
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, HashStable)]
1315
pub enum AccessLevel {
1416
/// Superset of `AccessLevel::Reachable` used to mark impl Trait items.
@@ -18,13 +20,13 @@ pub enum AccessLevel {
1820
/// public, then type `T` is reachable. Its values can be obtained by other crates
1921
/// even if the type itself is not nameable.
2022
Reachable,
21-
/// Public items + items accessible to other crates with help of `pub use` re-exports
23+
/// Public items + items accessible to other crates with the help of `pub use` re-exports.
2224
Exported,
23-
/// Items accessible to other crates directly, without help of re-exports
25+
/// Items accessible to other crates directly, without the help of re-exports.
2426
Public,
2527
}
2628

27-
// Accessibility levels for reachable HIR nodes
29+
/// Holds a map of accessibility levels for reachable HIR nodes.
2830
#[derive(Clone)]
2931
pub struct AccessLevels<Id = HirId> {
3032
pub map: FxHashMap<Id, AccessLevel>,

compiler/rustc_middle/src/middle/region.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ pub struct ScopeTree {
332332
pub struct YieldData {
333333
/// The `Span` of the yield.
334334
pub span: Span,
335-
/// The number of expressions and patterns appearing before the `yield` in the body plus one.
335+
/// The number of expressions and patterns appearing before the `yield` in the body, plus one.
336336
pub expr_and_pat_count: usize,
337337
pub source: hir::YieldSource,
338338
}
@@ -449,9 +449,7 @@ impl ScopeTree {
449449
}
450450

451451
/// Checks whether the given scope contains a `yield`. If so,
452-
/// returns `Some((span, expr_count))` with the span of a yield we found and
453-
/// the number of expressions and patterns appearing before the `yield` in the body + 1.
454-
/// If there a are multiple yields in a scope, the one with the highest number is returned.
452+
/// returns `Some(YieldData)`. If not, returns `None`.
455453
pub fn yield_in_scope(&self, scope: Scope) -> Option<YieldData> {
456454
self.yield_in_scope.get(&scope).cloned()
457455
}

compiler/rustc_middle/src/ty/inhabitedness/def_id_forest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct DefIdForest {
1717
/// If A and B are DefIds in the `DefIdForest`, and A is a descendant
1818
/// of B, then only B will be in `root_ids`.
1919
/// We use a `SmallVec` here because (for its use for caching inhabitedness)
20-
/// its rare that this will contain even two IDs.
20+
/// it's rare that this will contain even two IDs.
2121
root_ids: SmallVec<[DefId; 1]>,
2222
}
2323

0 commit comments

Comments
 (0)