2021-11-24 09:20:23 +00:00
|
|
|
use crate::util::{check_builtin_macro_attribute, warn_on_duplicate_attribute};
|
2021-03-06 18:33:02 +00:00
|
|
|
|
2024-02-24 07:52:59 +00:00
|
|
|
use core::ops::ControlFlow;
|
2020-11-28 23:33:17 +00:00
|
|
|
use rustc_ast as ast;
|
|
|
|
use rustc_ast::mut_visit::MutVisitor;
|
2021-07-17 14:28:43 +00:00
|
|
|
use rustc_ast::ptr::P;
|
2020-11-28 23:33:17 +00:00
|
|
|
use rustc_ast::visit::Visitor;
|
2022-02-27 21:26:24 +00:00
|
|
|
use rustc_ast::NodeId;
|
2020-11-28 23:33:17 +00:00
|
|
|
use rustc_ast::{mut_visit, visit};
|
2022-05-01 17:58:24 +00:00
|
|
|
use rustc_ast::{Attribute, HasAttrs, HasTokens};
|
2022-08-08 17:17:37 +00:00
|
|
|
use rustc_errors::PResult;
|
2021-03-06 18:33:02 +00:00
|
|
|
use rustc_expand::base::{Annotatable, ExtCtxt};
|
|
|
|
use rustc_expand::config::StripUnconfigured;
|
2021-03-06 20:37:59 +00:00
|
|
|
use rustc_expand::configure;
|
2021-07-17 14:28:43 +00:00
|
|
|
use rustc_feature::Features;
|
2021-11-28 18:41:04 +00:00
|
|
|
use rustc_parse::parser::{ForceCollect, Parser};
|
2021-07-17 14:28:43 +00:00
|
|
|
use rustc_session::Session;
|
2021-03-06 18:33:02 +00:00
|
|
|
use rustc_span::symbol::sym;
|
|
|
|
use rustc_span::Span;
|
2021-03-06 20:37:59 +00:00
|
|
|
use smallvec::SmallVec;
|
2021-03-06 18:33:02 +00:00
|
|
|
|
2022-05-20 23:51:09 +00:00
|
|
|
pub(crate) fn expand(
|
2021-03-06 18:33:02 +00:00
|
|
|
ecx: &mut ExtCtxt<'_>,
|
|
|
|
_span: Span,
|
|
|
|
meta_item: &ast::MetaItem,
|
2021-03-06 22:11:21 +00:00
|
|
|
annotatable: Annotatable,
|
2021-03-06 18:33:02 +00:00
|
|
|
) -> Vec<Annotatable> {
|
|
|
|
check_builtin_macro_attribute(ecx, meta_item, sym::cfg_eval);
|
2023-11-21 19:07:32 +00:00
|
|
|
warn_on_duplicate_attribute(ecx, &annotatable, sym::cfg_eval);
|
2022-02-27 21:26:24 +00:00
|
|
|
vec![cfg_eval(ecx.sess, ecx.ecfg.features, annotatable, ecx.current_expansion.lint_node_id)]
|
2021-03-06 22:11:21 +00:00
|
|
|
}
|
2021-03-06 18:33:02 +00:00
|
|
|
|
2022-05-20 23:51:09 +00:00
|
|
|
pub(crate) fn cfg_eval(
|
2021-07-17 14:28:43 +00:00
|
|
|
sess: &Session,
|
2023-08-09 12:28:00 +00:00
|
|
|
features: &Features,
|
2021-07-17 14:28:43 +00:00
|
|
|
annotatable: Annotatable,
|
2022-02-27 21:26:24 +00:00
|
|
|
lint_node_id: NodeId,
|
2021-07-17 14:28:43 +00:00
|
|
|
) -> Annotatable {
|
2023-08-09 12:28:00 +00:00
|
|
|
let features = Some(features);
|
2022-02-27 21:26:24 +00:00
|
|
|
CfgEval { cfg: &mut StripUnconfigured { sess, features, config_tokens: true, lint_node_id } }
|
2021-07-17 14:28:43 +00:00
|
|
|
.configure_annotatable(annotatable)
|
|
|
|
// Since the item itself has already been configured by the `InvocationCollector`,
|
|
|
|
// we know that fold result vector will contain exactly one element.
|
|
|
|
.unwrap()
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
struct CfgEval<'a, 'b> {
|
|
|
|
cfg: &'a mut StripUnconfigured<'b>,
|
|
|
|
}
|
|
|
|
|
2021-06-20 15:52:10 +00:00
|
|
|
fn flat_map_annotatable(
|
|
|
|
vis: &mut impl MutVisitor,
|
|
|
|
annotatable: Annotatable,
|
|
|
|
) -> Option<Annotatable> {
|
2020-11-28 23:33:17 +00:00
|
|
|
match annotatable {
|
2021-06-20 15:52:10 +00:00
|
|
|
Annotatable::Item(item) => vis.flat_map_item(item).pop().map(Annotatable::Item),
|
2020-11-28 23:33:17 +00:00
|
|
|
Annotatable::TraitItem(item) => {
|
2021-06-20 15:52:10 +00:00
|
|
|
vis.flat_map_trait_item(item).pop().map(Annotatable::TraitItem)
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
|
|
|
Annotatable::ImplItem(item) => {
|
2021-06-20 15:52:10 +00:00
|
|
|
vis.flat_map_impl_item(item).pop().map(Annotatable::ImplItem)
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
|
|
|
Annotatable::ForeignItem(item) => {
|
2021-06-20 15:52:10 +00:00
|
|
|
vis.flat_map_foreign_item(item).pop().map(Annotatable::ForeignItem)
|
2021-03-06 18:33:02 +00:00
|
|
|
}
|
2020-11-28 23:33:17 +00:00
|
|
|
Annotatable::Stmt(stmt) => {
|
2021-06-20 15:52:10 +00:00
|
|
|
vis.flat_map_stmt(stmt.into_inner()).pop().map(P).map(Annotatable::Stmt)
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
2021-06-20 15:52:10 +00:00
|
|
|
Annotatable::Expr(mut expr) => {
|
2020-11-28 23:33:17 +00:00
|
|
|
vis.visit_expr(&mut expr);
|
2021-06-20 15:52:10 +00:00
|
|
|
Some(Annotatable::Expr(expr))
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
2021-06-20 15:52:10 +00:00
|
|
|
Annotatable::Arm(arm) => vis.flat_map_arm(arm).pop().map(Annotatable::Arm),
|
|
|
|
Annotatable::ExprField(field) => {
|
|
|
|
vis.flat_map_expr_field(field).pop().map(Annotatable::ExprField)
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
2021-06-20 15:52:10 +00:00
|
|
|
Annotatable::PatField(fp) => vis.flat_map_pat_field(fp).pop().map(Annotatable::PatField),
|
2020-11-28 23:33:17 +00:00
|
|
|
Annotatable::GenericParam(param) => {
|
2021-06-20 15:52:10 +00:00
|
|
|
vis.flat_map_generic_param(param).pop().map(Annotatable::GenericParam)
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
2021-06-20 15:52:10 +00:00
|
|
|
Annotatable::Param(param) => vis.flat_map_param(param).pop().map(Annotatable::Param),
|
|
|
|
Annotatable::FieldDef(sf) => vis.flat_map_field_def(sf).pop().map(Annotatable::FieldDef),
|
|
|
|
Annotatable::Variant(v) => vis.flat_map_variant(v).pop().map(Annotatable::Variant),
|
2021-10-17 16:32:34 +00:00
|
|
|
Annotatable::Crate(mut krate) => {
|
|
|
|
vis.visit_crate(&mut krate);
|
|
|
|
Some(Annotatable::Crate(krate))
|
|
|
|
}
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-24 07:52:59 +00:00
|
|
|
fn has_cfg_or_cfg_attr(annotatable: &Annotatable) -> bool {
|
|
|
|
struct CfgFinder;
|
2021-03-06 20:37:59 +00:00
|
|
|
|
2024-02-24 07:52:59 +00:00
|
|
|
impl<'ast> visit::Visitor<'ast> for CfgFinder {
|
|
|
|
type Result = ControlFlow<()>;
|
|
|
|
fn visit_attribute(&mut self, attr: &'ast Attribute) -> ControlFlow<()> {
|
|
|
|
if attr
|
2020-11-28 23:33:17 +00:00
|
|
|
.ident()
|
2024-02-24 07:52:59 +00:00
|
|
|
.is_some_and(|ident| ident.name == sym::cfg || ident.name == sym::cfg_attr)
|
|
|
|
{
|
|
|
|
ControlFlow::Break(())
|
|
|
|
} else {
|
|
|
|
ControlFlow::Continue(())
|
|
|
|
}
|
|
|
|
}
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
2024-02-24 07:52:59 +00:00
|
|
|
|
|
|
|
let res = match annotatable {
|
|
|
|
Annotatable::Item(item) => CfgFinder.visit_item(item),
|
|
|
|
Annotatable::TraitItem(item) => CfgFinder.visit_assoc_item(item, visit::AssocCtxt::Trait),
|
|
|
|
Annotatable::ImplItem(item) => CfgFinder.visit_assoc_item(item, visit::AssocCtxt::Impl),
|
|
|
|
Annotatable::ForeignItem(item) => CfgFinder.visit_foreign_item(item),
|
|
|
|
Annotatable::Stmt(stmt) => CfgFinder.visit_stmt(stmt),
|
|
|
|
Annotatable::Expr(expr) => CfgFinder.visit_expr(expr),
|
|
|
|
Annotatable::Arm(arm) => CfgFinder.visit_arm(arm),
|
|
|
|
Annotatable::ExprField(field) => CfgFinder.visit_expr_field(field),
|
|
|
|
Annotatable::PatField(field) => CfgFinder.visit_pat_field(field),
|
|
|
|
Annotatable::GenericParam(param) => CfgFinder.visit_generic_param(param),
|
|
|
|
Annotatable::Param(param) => CfgFinder.visit_param(param),
|
|
|
|
Annotatable::FieldDef(field) => CfgFinder.visit_field_def(field),
|
|
|
|
Annotatable::Variant(variant) => CfgFinder.visit_variant(variant),
|
|
|
|
Annotatable::Crate(krate) => CfgFinder.visit_crate(krate),
|
|
|
|
};
|
|
|
|
res.is_break()
|
2021-03-06 20:37:59 +00:00
|
|
|
}
|
|
|
|
|
2020-11-28 23:33:17 +00:00
|
|
|
impl CfgEval<'_, '_> {
|
2022-05-01 17:58:24 +00:00
|
|
|
fn configure<T: HasAttrs + HasTokens>(&mut self, node: T) -> Option<T> {
|
2021-03-06 20:37:59 +00:00
|
|
|
self.cfg.configure(node)
|
|
|
|
}
|
|
|
|
|
2021-06-20 15:52:10 +00:00
|
|
|
fn configure_annotatable(&mut self, mut annotatable: Annotatable) -> Option<Annotatable> {
|
2020-11-28 23:33:17 +00:00
|
|
|
// Tokenizing and re-parsing the `Annotatable` can have a significant
|
|
|
|
// performance impact, so try to avoid it if possible
|
2024-02-24 07:52:59 +00:00
|
|
|
if !has_cfg_or_cfg_attr(&annotatable) {
|
2021-06-20 15:52:10 +00:00
|
|
|
return Some(annotatable);
|
2020-11-28 23:33:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// The majority of parsed attribute targets will never need to have early cfg-expansion
|
2022-03-30 05:39:38 +00:00
|
|
|
// run (e.g. they are not part of a `#[derive]` or `#[cfg_eval]` macro input).
|
2020-11-28 23:33:17 +00:00
|
|
|
// Therefore, we normally do not capture the necessary information about `#[cfg]`
|
|
|
|
// and `#[cfg_attr]` attributes during parsing.
|
|
|
|
//
|
|
|
|
// Therefore, when we actually *do* run early cfg-expansion, we need to tokenize
|
|
|
|
// and re-parse the attribute target, this time capturing information about
|
|
|
|
// the location of `#[cfg]` and `#[cfg_attr]` in the token stream. The tokenization
|
|
|
|
// process is lossless, so this process is invisible to proc-macros.
|
|
|
|
|
2022-08-08 17:17:37 +00:00
|
|
|
let parse_annotatable_with: for<'a> fn(&mut Parser<'a>) -> PResult<'a, _> =
|
|
|
|
match annotatable {
|
|
|
|
Annotatable::Item(_) => {
|
|
|
|
|parser| Ok(Annotatable::Item(parser.parse_item(ForceCollect::Yes)?.unwrap()))
|
|
|
|
}
|
|
|
|
Annotatable::TraitItem(_) => |parser| {
|
|
|
|
Ok(Annotatable::TraitItem(
|
|
|
|
parser.parse_trait_item(ForceCollect::Yes)?.unwrap().unwrap(),
|
|
|
|
))
|
|
|
|
},
|
|
|
|
Annotatable::ImplItem(_) => |parser| {
|
|
|
|
Ok(Annotatable::ImplItem(
|
|
|
|
parser.parse_impl_item(ForceCollect::Yes)?.unwrap().unwrap(),
|
|
|
|
))
|
|
|
|
},
|
|
|
|
Annotatable::ForeignItem(_) => |parser| {
|
|
|
|
Ok(Annotatable::ForeignItem(
|
|
|
|
parser.parse_foreign_item(ForceCollect::Yes)?.unwrap().unwrap(),
|
|
|
|
))
|
|
|
|
},
|
|
|
|
Annotatable::Stmt(_) => |parser| {
|
2023-05-01 08:51:47 +00:00
|
|
|
Ok(Annotatable::Stmt(P(parser
|
|
|
|
.parse_stmt_without_recovery(false, ForceCollect::Yes)?
|
|
|
|
.unwrap())))
|
2022-08-08 17:17:37 +00:00
|
|
|
},
|
|
|
|
Annotatable::Expr(_) => {
|
|
|
|
|parser| Ok(Annotatable::Expr(parser.parse_expr_force_collect()?))
|
|
|
|
}
|
|
|
|
_ => unreachable!(),
|
|
|
|
};
|
2020-11-28 23:33:17 +00:00
|
|
|
|
|
|
|
// 'Flatten' all nonterminals (i.e. `TokenKind::Interpolated`)
|
|
|
|
// to `None`-delimited groups containing the corresponding tokens. This
|
|
|
|
// is normally delayed until the proc-macro server actually needs to
|
|
|
|
// provide a `TokenKind::Interpolated` to a proc-macro. We do this earlier,
|
|
|
|
// so that we can handle cases like:
|
|
|
|
//
|
|
|
|
// ```rust
|
|
|
|
// #[cfg_eval] #[cfg] $item
|
|
|
|
//```
|
|
|
|
//
|
|
|
|
// where `$item` is `#[cfg_attr] struct Foo {}`. We want to make
|
|
|
|
// sure to evaluate *all* `#[cfg]` and `#[cfg_attr]` attributes - the simplest
|
|
|
|
// way to do this is to do a single parse of a stream without any nonterminals.
|
2022-05-21 12:50:39 +00:00
|
|
|
let orig_tokens = annotatable.to_tokens().flattened();
|
2020-11-28 23:33:17 +00:00
|
|
|
|
|
|
|
// Re-parse the tokens, setting the `capture_cfg` flag to save extra information
|
2022-09-09 02:44:05 +00:00
|
|
|
// to the captured `AttrTokenStream` (specifically, we capture
|
|
|
|
// `AttrTokenTree::AttributesData` for all occurrences of `#[cfg]` and `#[cfg_attr]`)
|
2024-03-04 05:31:49 +00:00
|
|
|
let mut parser = rustc_parse::stream_to_parser(&self.cfg.sess.psess, orig_tokens, None);
|
2020-11-28 23:33:17 +00:00
|
|
|
parser.capture_cfg = true;
|
2022-08-08 17:17:37 +00:00
|
|
|
match parse_annotatable_with(&mut parser) {
|
|
|
|
Ok(a) => annotatable = a,
|
Make `DiagnosticBuilder::emit` consuming.
This works for most of its call sites. This is nice, because `emit` very
much makes sense as a consuming operation -- indeed,
`DiagnosticBuilderState` exists to ensure no diagnostic is emitted
twice, but it uses runtime checks.
For the small number of call sites where a consuming emit doesn't work,
the commit adds `DiagnosticBuilder::emit_without_consuming`. (This will
be removed in subsequent commits.)
Likewise, `emit_unless` becomes consuming. And `delay_as_bug` becomes
consuming, while `delay_as_bug_without_consuming` is added (which will
also be removed in subsequent commits.)
All this requires significant changes to `DiagnosticBuilder`'s chaining
methods. Currently `DiagnosticBuilder` method chaining uses a
non-consuming `&mut self -> &mut Self` style, which allows chaining to
be used when the chain ends in `emit()`, like so:
```
struct_err(msg).span(span).emit();
```
But it doesn't work when producing a `DiagnosticBuilder` value,
requiring this:
```
let mut err = self.struct_err(msg);
err.span(span);
err
```
This style of chaining won't work with consuming `emit` though. For
that, we need to use to a `self -> Self` style. That also would allow
`DiagnosticBuilder` production to be chained, e.g.:
```
self.struct_err(msg).span(span)
```
However, removing the `&mut self -> &mut Self` style would require that
individual modifications of a `DiagnosticBuilder` go from this:
```
err.span(span);
```
to this:
```
err = err.span(span);
```
There are *many* such places. I have a high tolerance for tedious
refactorings, but even I gave up after a long time trying to convert
them all.
Instead, this commit has it both ways: the existing `&mut self -> Self`
chaining methods are kept, and new `self -> Self` chaining methods are
added, all of which have a `_mv` suffix (short for "move"). Changes to
the existing `forward!` macro lets this happen with very little
additional boilerplate code. I chose to add the suffix to the new
chaining methods rather than the existing ones, because the number of
changes required is much smaller that way.
This doubled chainging is a bit clumsy, but I think it is worthwhile
because it allows a *lot* of good things to subsequently happen. In this
commit, there are many `mut` qualifiers removed in places where
diagnostics are emitted without being modified. In subsequent commits:
- chaining can be used more, making the code more concise;
- more use of chaining also permits the removal of redundant diagnostic
APIs like `struct_err_with_code`, which can be replaced easily with
`struct_err` + `code_mv`;
- `emit_without_diagnostic` can be removed, which simplifies a lot of
machinery, removing the need for `DiagnosticBuilderState`.
2024-01-03 01:17:35 +00:00
|
|
|
Err(err) => {
|
2022-08-08 17:17:37 +00:00
|
|
|
err.emit();
|
|
|
|
return Some(annotatable);
|
|
|
|
}
|
|
|
|
}
|
2020-11-28 23:33:17 +00:00
|
|
|
|
2022-09-09 02:44:05 +00:00
|
|
|
// Now that we have our re-parsed `AttrTokenStream`, recursively configuring
|
2020-11-28 23:33:17 +00:00
|
|
|
// our attribute target will correctly the tokens as well.
|
|
|
|
flat_map_annotatable(self, annotatable)
|
2021-03-06 20:37:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-28 23:33:17 +00:00
|
|
|
impl MutVisitor for CfgEval<'_, '_> {
|
2022-10-23 09:22:19 +00:00
|
|
|
#[instrument(level = "trace", skip(self))]
|
2021-03-06 20:37:59 +00:00
|
|
|
fn visit_expr(&mut self, expr: &mut P<ast::Expr>) {
|
2022-10-23 09:22:19 +00:00
|
|
|
self.cfg.configure_expr(expr, false);
|
|
|
|
mut_visit::noop_visit_expr(expr, self);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[instrument(level = "trace", skip(self))]
|
|
|
|
fn visit_method_receiver_expr(&mut self, expr: &mut P<ast::Expr>) {
|
|
|
|
self.cfg.configure_expr(expr, true);
|
2021-03-06 20:37:59 +00:00
|
|
|
mut_visit::noop_visit_expr(expr, self);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn filter_map_expr(&mut self, expr: P<ast::Expr>) -> Option<P<ast::Expr>> {
|
|
|
|
let mut expr = configure!(self, expr);
|
|
|
|
mut_visit::noop_visit_expr(&mut expr, self);
|
|
|
|
Some(expr)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn flat_map_generic_param(
|
|
|
|
&mut self,
|
|
|
|
param: ast::GenericParam,
|
|
|
|
) -> SmallVec<[ast::GenericParam; 1]> {
|
|
|
|
mut_visit::noop_flat_map_generic_param(configure!(self, param), self)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn flat_map_stmt(&mut self, stmt: ast::Stmt) -> SmallVec<[ast::Stmt; 1]> {
|
|
|
|
mut_visit::noop_flat_map_stmt(configure!(self, stmt), self)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn flat_map_item(&mut self, item: P<ast::Item>) -> SmallVec<[P<ast::Item>; 1]> {
|
|
|
|
mut_visit::noop_flat_map_item(configure!(self, item), self)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn flat_map_impl_item(&mut self, item: P<ast::AssocItem>) -> SmallVec<[P<ast::AssocItem>; 1]> {
|
|
|
|
mut_visit::noop_flat_map_assoc_item(configure!(self, item), self)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn flat_map_trait_item(&mut self, item: P<ast::AssocItem>) -> SmallVec<[P<ast::AssocItem>; 1]> {
|
|
|
|
mut_visit::noop_flat_map_assoc_item(configure!(self, item), self)
|
|
|
|
}
|
|
|
|
|
2021-03-06 21:18:51 +00:00
|
|
|
fn flat_map_foreign_item(
|
|
|
|
&mut self,
|
|
|
|
foreign_item: P<ast::ForeignItem>,
|
|
|
|
) -> SmallVec<[P<ast::ForeignItem>; 1]> {
|
|
|
|
mut_visit::noop_flat_map_foreign_item(configure!(self, foreign_item), self)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn flat_map_arm(&mut self, arm: ast::Arm) -> SmallVec<[ast::Arm; 1]> {
|
|
|
|
mut_visit::noop_flat_map_arm(configure!(self, arm), self)
|
|
|
|
}
|
|
|
|
|
2021-03-15 21:36:07 +00:00
|
|
|
fn flat_map_expr_field(&mut self, field: ast::ExprField) -> SmallVec<[ast::ExprField; 1]> {
|
|
|
|
mut_visit::noop_flat_map_expr_field(configure!(self, field), self)
|
2021-03-06 21:18:51 +00:00
|
|
|
}
|
|
|
|
|
2021-03-15 21:36:07 +00:00
|
|
|
fn flat_map_pat_field(&mut self, fp: ast::PatField) -> SmallVec<[ast::PatField; 1]> {
|
|
|
|
mut_visit::noop_flat_map_pat_field(configure!(self, fp), self)
|
2021-03-06 21:18:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn flat_map_param(&mut self, p: ast::Param) -> SmallVec<[ast::Param; 1]> {
|
|
|
|
mut_visit::noop_flat_map_param(configure!(self, p), self)
|
|
|
|
}
|
|
|
|
|
2021-03-15 21:36:07 +00:00
|
|
|
fn flat_map_field_def(&mut self, sf: ast::FieldDef) -> SmallVec<[ast::FieldDef; 1]> {
|
|
|
|
mut_visit::noop_flat_map_field_def(configure!(self, sf), self)
|
2021-03-06 20:37:59 +00:00
|
|
|
}
|
|
|
|
|
2021-03-06 21:18:51 +00:00
|
|
|
fn flat_map_variant(&mut self, variant: ast::Variant) -> SmallVec<[ast::Variant; 1]> {
|
|
|
|
mut_visit::noop_flat_map_variant(configure!(self, variant), self)
|
2021-03-06 20:37:59 +00:00
|
|
|
}
|
|
|
|
}
|