Skip to content

Commit 4078ee4

Browse files
committed
Revert "attr/passes: comment -> doc comment"
This reverts commit 6f0b8f1.
1 parent 9cdef5a commit 4078ee4

File tree

3 files changed

+16
-29
lines changed

3 files changed

+16
-29
lines changed

Diff for: compiler/rustc_attr/src/builtin.rs

+3-16
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,9 @@ impl ConstStability {
135135
#[derive(Encodable, Decodable, PartialEq, Copy, Clone, Debug, Eq, Hash)]
136136
#[derive(HashStable_Generic)]
137137
pub enum StabilityLevel {
138-
/// `#[unstable]`
139-
Unstable {
140-
/// Reason for the current stability level.
141-
reason: UnstableReason,
142-
/// Relevant `rust-lang/rust` issue.
143-
issue: Option<NonZeroU32>,
144-
is_soft: bool,
145-
},
146-
/// `#[stable]`
147-
Stable {
148-
/// Rust release which stabilized this feature.
149-
since: Symbol,
150-
/// Is this item allowed to be referred to on stable, despite being contained in unstable
151-
/// modules?
152-
allowed_through_unstable_modules: bool,
153-
},
138+
// Reason for the current stability level and the relevant rust-lang issue
139+
Unstable { reason: UnstableReason, issue: Option<NonZeroU32>, is_soft: bool },
140+
Stable { since: Symbol, allowed_through_unstable_modules: bool },
154141
}
155142

156143
impl StabilityLevel {

Diff for: compiler/rustc_passes/src/lib_features.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//! Detecting lib features (i.e., features that are not lang features).
2-
//!
3-
//! These are declared using stability attributes (e.g., `#[stable (..)]` and `#[unstable (..)]`),
4-
//! but are not declared in one single location (unlike lang features), which means we need to
5-
//! collect them instead.
1+
// Detecting lib features (i.e., features that are not lang features).
2+
//
3+
// These are declared using stability attributes (e.g., `#[stable (..)]`
4+
// and `#[unstable (..)]`), but are not declared in one single location
5+
// (unlike lang features), which means we need to collect them instead.
66

77
use rustc_ast::{Attribute, MetaItemKind};
88
use rustc_errors::struct_span_err;

Diff for: compiler/rustc_passes/src/stability.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ use std::num::NonZeroU32;
2929

3030
#[derive(PartialEq)]
3131
enum AnnotationKind {
32-
/// Annotation is required if not inherited from unstable parents.
32+
// Annotation is required if not inherited from unstable parents
3333
Required,
34-
/// Annotation is useless, reject it.
34+
// Annotation is useless, reject it
3535
Prohibited,
36-
/// Deprecation annotation is useless, reject it. (Stability attribute is still required.)
36+
// Deprecation annotation is useless, reject it. (Stability attribute is still required.)
3737
DeprecationProhibited,
38-
/// Annotation itself is useless, but it can be propagated to children.
38+
// Annotation itself is useless, but it can be propagated to children
3939
Container,
4040
}
4141

@@ -83,7 +83,7 @@ impl InheritStability {
8383
}
8484
}
8585

86-
/// A private tree-walker for producing an `Index`.
86+
// A private tree-walker for producing an Index.
8787
struct Annotator<'a, 'tcx> {
8888
tcx: TyCtxt<'tcx>,
8989
index: &'a mut Index,
@@ -94,9 +94,9 @@ struct Annotator<'a, 'tcx> {
9494
}
9595

9696
impl<'a, 'tcx> Annotator<'a, 'tcx> {
97-
/// Determine the stability for a node based on its attributes and inherited stability. The
98-
/// stability is recorded in the index and used as the parent. If the node is a function,
99-
/// `fn_sig` is its signature.
97+
// Determine the stability for a node based on its attributes and inherited
98+
// stability. The stability is recorded in the index and used as the parent.
99+
// If the node is a function, `fn_sig` is its signature
100100
fn annotate<F>(
101101
&mut self,
102102
def_id: LocalDefId,

0 commit comments

Comments
 (0)