about summary refs log tree commit diff
path: root/src/librustdoc/visit_ast.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-10-04 15:42:53 +0200
committerGitHub <noreply@github.com>2024-10-04 15:42:53 +0200
commit2ceeeb159dc5aa13cd090ade1b013c51461949a5 (patch)
treeabfd471990fd393fbd7cc4801180085415a07d6d /src/librustdoc/visit_ast.rs
parent3002af6cb643138839537f6fd0265162610fdbbe (diff)
parenta3ffa1eae507809628decc6250b28db6ab167b11 (diff)
downloadrust-2ceeeb159dc5aa13cd090ade1b013c51461949a5.tar.gz
rust-2ceeeb159dc5aa13cd090ade1b013c51461949a5.zip
Rollup merge of #131034 - Urgau:cfg-true-false, r=nnethercote
Implement RFC3695 Allow boolean literals as cfg predicates

This PR implements https://github.com/rust-lang/rfcs/pull/3695: allow boolean literals as cfg predicates, i.e. `cfg(true)` and `cfg(false)`.

r? `@nnethercote` *(or anyone with parser knowledge)*
cc `@clubby789`
Diffstat (limited to 'src/librustdoc/visit_ast.rs')
-rw-r--r--src/librustdoc/visit_ast.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs
index c44e5ecaba8..6defe91d383 100644
--- a/src/librustdoc/visit_ast.rs
+++ b/src/librustdoc/visit_ast.rs
@@ -164,7 +164,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
                     .unwrap_or(&[])
                     .iter()
                     .filter_map(|attr| {
-                        Cfg::parse(attr.meta_item()?)
+                        Cfg::parse(attr)
                             .map_err(|e| self.cx.sess().dcx().span_err(e.span, e.msg))
                             .ok()
                     })