forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#93759 - dtolnay:usetree, r=nagisa
Pretty print ItemKind::Use in rustfmt style This PR backports the formatting for `use` items from https://github.com/dtolnay/prettyplease into rustc_ast_pretty. Before: ```rust use core::{cmp::{Eq, Ord, PartialEq, PartialOrd}, convert::{AsMut, AsRef, From, Into}, iter::{DoubleEndedIterator, ExactSizeIterator, Extend, FromIterator, IntoIterator, Iterator}, marker::{Copy as Copy, Send as Send, Sized as Sized, Sync as Sync, Unpin as U}, ops::{*, Drop, Fn, FnMut, FnOnce}}; ``` After: ```rust use core::{ cmp::{Eq, Ord, PartialEq, PartialOrd}, convert::{AsMut, AsRef, From, Into}, iter::{ DoubleEndedIterator, ExactSizeIterator, Extend, FromIterator, IntoIterator, Iterator, }, marker::{ Copy as Copy, Send as Send, Sized as Sized, Sync as Sync, Unpin as U, }, ops::{*, Drop, Fn, FnMut, FnOnce}, }; ```
- Loading branch information
Showing
4 changed files
with
62 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// pp-exact | ||
// edition:2021 | ||
|
||
#![allow(unused_imports)] | ||
|
||
use ::std::fmt::{self, Debug, Display, Write as _}; | ||
|
||
use core::option::Option::*; | ||
|
||
use core::{ | ||
cmp::{Eq, Ord, PartialEq, PartialOrd}, | ||
convert::{AsMut, AsRef, From, Into}, | ||
iter::{ | ||
DoubleEndedIterator, ExactSizeIterator, Extend, FromIterator, | ||
IntoIterator, Iterator, | ||
}, | ||
marker::{ | ||
Copy as Copy, Send as Send, Sized as Sized, Sync as Sync, Unpin as U, | ||
}, | ||
ops::{*, Drop, Fn, FnMut, FnOnce}, | ||
}; | ||
|
||
fn main() {} |