diff options
| author | bors <bors@rust-lang.org> | 2022-12-24 09:41:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-24 09:41:11 +0000 |
| commit | d23554fae855d884761d549cd6ee6537450b0f3c (patch) | |
| tree | b44bd3e79fa5019f0e8648737e71c432bc784188 /compiler/rustc_ast/src | |
| parent | 245357f61939d2b6d15f8c6b15f7026396f95871 (diff) | |
| parent | e52e0d855799fe651922be4a038fe84fe9009c72 (diff) | |
| download | rust-d23554fae855d884761d549cd6ee6537450b0f3c.tar.gz rust-d23554fae855d884761d549cd6ee6537450b0f3c.zip | |
Auto merge of #2738 - RalfJung:rustup, r=RalfJung
Rustup
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_ast/src/node_id.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_ast/src/util/comments.rs | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index f933b9b161c..31596a1e9bf 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -2554,10 +2554,9 @@ pub enum AttrStyle { } rustc_index::newtype_index! { - pub struct AttrId { - ENCODABLE = custom - DEBUG_FORMAT = "AttrId({})" - } + #[custom_encodable] + #[debug_format = "AttrId({})]"] + pub struct AttrId {} } impl<S: Encoder> Encodable<S> for AttrId { diff --git a/compiler/rustc_ast/src/node_id.rs b/compiler/rustc_ast/src/node_id.rs index 7b5acc3f485..daa82996b3d 100644 --- a/compiler/rustc_ast/src/node_id.rs +++ b/compiler/rustc_ast/src/node_id.rs @@ -8,9 +8,8 @@ rustc_index::newtype_index! { /// This is later turned into [`DefId`] and `HirId` for the HIR. /// /// [`DefId`]: rustc_span::def_id::DefId - pub struct NodeId { - DEBUG_FORMAT = "NodeId({})" - } + #[debug_format = "NodeId({})"] + pub struct NodeId {} } rustc_data_structures::define_id_collections!(NodeMap, NodeSet, NodeMapEntry, NodeId); diff --git a/compiler/rustc_ast/src/util/comments.rs b/compiler/rustc_ast/src/util/comments.rs index 35454c3a670..275ed02c2b9 100644 --- a/compiler/rustc_ast/src/util/comments.rs +++ b/compiler/rustc_ast/src/util/comments.rs @@ -51,7 +51,7 @@ pub fn beautify_doc_string(data: Symbol, kind: CommentKind) -> Symbol { if i != 0 || j != lines.len() { Some((i, j)) } else { None } } - fn get_horizontal_trim<'a>(lines: &'a [&str], kind: CommentKind) -> Option<String> { + fn get_horizontal_trim(lines: &[&str], kind: CommentKind) -> Option<String> { let mut i = usize::MAX; let mut first = true; |
