1
Fork 0

Rollup merge of #117114 - nnethercote:improve-stringify-test, r=petrochenkov

Improve `stringify.rs` test

Best reviewed one commit at a time.

r? `@petrochenkov`
This commit is contained in:
Matthias Krüger 2023-10-26 22:26:11 +02:00 committed by GitHub
commit a8f7acd8f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 482 additions and 559 deletions

View file

@ -734,6 +734,8 @@ pub enum RangeSyntax {
} }
/// All the different flavors of pattern that Rust recognizes. /// All the different flavors of pattern that Rust recognizes.
//
// Adding a new variant? Please update `test_pat` in `tests/ui/macros/stringify.rs`.
#[derive(Clone, Encodable, Decodable, Debug)] #[derive(Clone, Encodable, Decodable, Debug)]
pub enum PatKind { pub enum PatKind {
/// Represents a wildcard pattern (`_`). /// Represents a wildcard pattern (`_`).
@ -967,6 +969,7 @@ impl Stmt {
} }
} }
// Adding a new variant? Please update `test_stmt` in `tests/ui/macros/stringify.rs`.
#[derive(Clone, Encodable, Decodable, Debug)] #[derive(Clone, Encodable, Decodable, Debug)]
pub enum StmtKind { pub enum StmtKind {
/// A local (let) binding. /// A local (let) binding.
@ -1345,6 +1348,7 @@ pub struct StructExpr {
pub rest: StructRest, pub rest: StructRest,
} }
// Adding a new variant? Please update `test_expr` in `tests/ui/macros/stringify.rs`.
#[derive(Clone, Encodable, Decodable, Debug)] #[derive(Clone, Encodable, Decodable, Debug)]
pub enum ExprKind { pub enum ExprKind {
/// An array (`[a, b, c, d]`) /// An array (`[a, b, c, d]`)
@ -2015,6 +2019,8 @@ pub struct BareFnTy {
} }
/// The various kinds of type recognized by the compiler. /// The various kinds of type recognized by the compiler.
//
// Adding a new variant? Please update `test_ty` in `tests/ui/macros/stringify.rs`.
#[derive(Clone, Encodable, Decodable, Debug)] #[derive(Clone, Encodable, Decodable, Debug)]
pub enum TyKind { pub enum TyKind {
/// A variable-length slice (`[T]`). /// A variable-length slice (`[T]`).
@ -2880,6 +2886,7 @@ pub struct ConstItem {
pub expr: Option<P<Expr>>, pub expr: Option<P<Expr>>,
} }
// Adding a new variant? Please update `test_item` in `tests/ui/macros/stringify.rs`.
#[derive(Clone, Encodable, Decodable, Debug)] #[derive(Clone, Encodable, Decodable, Debug)]
pub enum ItemKind { pub enum ItemKind {
/// An `extern crate` item, with the optional *original* crate name if the crate was renamed. /// An `extern crate` item, with the optional *original* crate name if the crate was renamed.

File diff suppressed because it is too large Load diff