lint: move module-level doc comment to top

This commit is contained in:
Weihang Lo 2023-05-25 09:29:04 +01:00
parent 437942ee7e
commit 85a3e9ace0
No known key found for this signature in database
GPG key ID: D7DBF189825E82E7

View file

@ -1,16 +1,3 @@
// For various reasons, some idioms are still allow'ed, but we would like to
// test and enforce them.
#![warn(rust_2018_idioms)]
// Due to some of the default clippy lints being somewhat subjective and not
// necessarily an improvement, we prefer to not use them at this time.
#![allow(clippy::all)]
#![warn(clippy::disallowed_methods)]
#![warn(clippy::self_named_module_files)]
#![warn(clippy::print_stdout)]
#![warn(clippy::print_stderr)]
#![warn(clippy::dbg_macro)]
#![allow(rustdoc::private_intra_doc_links)]
//! # Cargo as a library
//!
//! There are two places you can find API documentation of cargo-the-library,
@ -144,6 +131,20 @@
//! [The Cargo Book]: https://doc.rust-lang.org/cargo/
//! [Cargo Contributor Guide]: https://doc.crates.io/contrib/
// TODO: consider removing these lint attributes when `-Zlints` hits stable.
// For various reasons, some idioms are still allow'ed, but we would like to
// test and enforce them.
#![warn(rust_2018_idioms)]
// Due to some of the default clippy lints being somewhat subjective and not
// necessarily an improvement, we prefer to not use them at this time.
#![allow(clippy::all)]
#![warn(clippy::disallowed_methods)]
#![warn(clippy::self_named_module_files)]
#![warn(clippy::print_stdout)]
#![warn(clippy::print_stderr)]
#![warn(clippy::dbg_macro)]
#![allow(rustdoc::private_intra_doc_links)]
use crate::core::shell::Verbosity::Verbose;
use crate::core::Shell;
use anyhow::Error;