Skip to content

Commit

Permalink
Rollup merge of #109713 - dtolnay:debugattrid, r=compiler-errors
Browse files Browse the repository at this point in the history
Fix mismatched punctuation in Debug impl of AttrId

I noticed this odd line in `ast-tree` output.

```console
$ echo '#[attr] struct S;' | rustc -Zunpretty=ast-tree -
```

```rust
...
            attrs: [
                Attribute {
                    kind: Normal(
                        NormalAttr {
                            item: AttrItem {
                                path: Path {
                                    segments: [
                                        PathSegment {
                                            ident: attr#0,
                                            args: None,
                                        },
                                    ],
                                    tokens: None,
                                },
                                args: Empty,
                            },
                        },
                    ),
                    id: AttrId(0)],      // <------
                    style: Outer,
                },
```
  • Loading branch information
Dylan-DPC authored Mar 29, 2023
2 parents 09e9377 + c5da061 commit 2a4455d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,7 @@ pub enum AttrStyle {

rustc_index::newtype_index! {
#[custom_encodable]
#[debug_format = "AttrId({})]"]
#[debug_format = "AttrId({})"]
pub struct AttrId {}
}

Expand Down

0 comments on commit 2a4455d

Please sign in to comment.