Rollup merge of #121060 - clubby789:bool-newtypes, r=cjgillot
Add newtypes for bool fields/params/return types Fixed all the cases of this found with some simple searches for `*/ bool` and `bool /*`; probably many more
This commit is contained in:
commit
7c88ea2842
35 changed files with 332 additions and 207 deletions
|
@ -1,4 +1,4 @@
|
|||
use super::{Parser, PathStyle, TokenType};
|
||||
use super::{Parser, PathStyle, TokenType, Trailing};
|
||||
|
||||
use crate::errors::{
|
||||
self, DynAfterMut, ExpectedFnPathFoundFnKeyword, ExpectedMutOrConstInRawPointerType,
|
||||
|
@ -415,7 +415,7 @@ impl<'a> Parser<'a> {
|
|||
Ok(ty)
|
||||
})?;
|
||||
|
||||
if ts.len() == 1 && !trailing {
|
||||
if ts.len() == 1 && matches!(trailing, Trailing::No) {
|
||||
let ty = ts.into_iter().next().unwrap().into_inner();
|
||||
let maybe_bounds = allow_plus == AllowPlus::Yes && self.token.is_like_plus();
|
||||
match ty.kind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue