From 4237624a83fc72e6b4f2855ead132a3bd40922a4 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 10 Dec 2023 10:48:27 -0800 Subject: [PATCH] Move crate-level documentation in test above attributes --- tests/test_precedence.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_precedence.rs b/tests/test_precedence.rs index 7a297a0eac..36e2e51c6b 100644 --- a/tests/test_precedence.rs +++ b/tests/test_precedence.rs @@ -1,3 +1,15 @@ +//! The tests in this module do the following: +//! +//! 1. Parse a given expression in both `syn` and `librustc`. +//! 2. Fold over the expression adding brackets around each subexpression (with +//! some complications - see the `syn_brackets` and `librustc_brackets` +//! methods). +//! 3. Serialize the `syn` expression back into a string, and re-parse it with +//! `librustc`. +//! 4. Respan all of the expressions, replacing the spans with the default +//! spans. +//! 5. Compare the expressions with one another, if they are not equal fail. + #![cfg(not(syn_disable_nightly_tests))] #![cfg(not(miri))] #![recursion_limit = "1024"] @@ -13,18 +25,6 @@ clippy::uninlined_format_args )] -//! The tests in this module do the following: -//! -//! 1. Parse a given expression in both `syn` and `librustc`. -//! 2. Fold over the expression adding brackets around each subexpression (with -//! some complications - see the `syn_brackets` and `librustc_brackets` -//! methods). -//! 3. Serialize the `syn` expression back into a string, and re-parse it with -//! `librustc`. -//! 4. Respan all of the expressions, replacing the spans with the default -//! spans. -//! 5. Compare the expressions with one another, if they are not equal fail. - extern crate rustc_ast; extern crate rustc_ast_pretty; extern crate rustc_data_structures;