From 8caabd62ef5fbe99e6be6aa9e76f55bbb8433d95 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 2 Oct 2019 19:44:58 -0700 Subject: [PATCH] Update for "modern" `meta` matcher. --- src/attributes.md | 4 +--- src/macros-by-example.md | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/attributes.md b/src/attributes.md index 059d4dedf501e..c1e435d26813c 100644 --- a/src/attributes.md +++ b/src/attributes.md @@ -86,8 +86,7 @@ fn some_unused_variables() { ## Meta Item Attribute Syntax A "meta item" is the syntax used for the _Attr_ rule by most [built-in -attributes] and the [`meta` macro fragment specifier]. It has the following -grammar: +attributes]. It has the following grammar: > **Syntax**\ > _MetaItem_ :\ @@ -268,7 +267,6 @@ The following is an index of all built-in attributes. [`link`]: items/external-blocks.md#the-link-attribute [`macro_export`]: macros-by-example.md#path-based-scope [`macro_use`]: macros-by-example.md#the-macro_use-attribute -[`meta` macro fragment specifier]: macros-by-example.md [`must_use`]: attributes/diagnostics.md#the-must_use-attribute [`no_builtins`]: attributes/codegen.md#the-no_builtins-attribute [`no_implicit_prelude`]: items/modules.md#prelude-items diff --git a/src/macros-by-example.md b/src/macros-by-example.md index 8cae03a8e3993..fd7c33575a991 100644 --- a/src/macros-by-example.md +++ b/src/macros-by-example.md @@ -128,7 +128,7 @@ fragment specifiers are: * `ident`: an [IDENTIFIER_OR_KEYWORD] * `path`: a [_TypePath_] style path * `tt`: a [_TokenTree_] (a single [token] or tokens in matching delimiters `()`, `[]`, or `{}`) - * `meta`: a [_MetaItem_], the contents of an attribute + * `meta`: an [_Attr_], the contents of an attribute * `lifetime`: a [LIFETIME_TOKEN] * `vis`: a possibly empty [_Visibility_] qualifier * `literal`: matches `-`?[_LiteralExpression_] @@ -477,12 +477,12 @@ For more detail, see the [formal specification]. [LIFETIME_TOKEN]: tokens.md#lifetimes-and-loop-labels [Metavariables]: #metavariables [Repetitions]: #repetitions +[_Attr_]: attributes.md [_BlockExpression_]: expressions/block-expr.md [_DelimTokenTree_]: macros.md [_Expression_]: expressions.md [_Item_]: items.md [_LiteralExpression_]: expressions/literal-expr.md -[_MetaItem_]: attributes.md#meta-item-attribute-syntax [_MetaListIdents_]: attributes.md#meta-item-attribute-syntax [_Pattern_]: patterns.md [_Statement_]: statements.md