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#132540 - compiler-errors:gc, r=calebcartwright
Do not format generic consts We introduced **nightly support** for generic const items in rust-lang#113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items. r? `````@calebcartwright````` or `````@ytmimi`````
- Loading branch information
Showing
3 changed files
with
52 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Make sure we don't mess up the formatting of generic consts | ||
|
||
#![feature(generic_const_items)] | ||
|
||
const GENERIC<N, const M: usize>: i32 = 0; | ||
|
||
const WHERECLAUSE: i32 = 0 | ||
where | ||
i32:; | ||
|
||
trait Foo { | ||
const GENERIC<N, const M: usize>: i32; | ||
|
||
const WHERECLAUSE: i32 | ||
where | ||
i32:; | ||
} | ||
|
||
impl Foo for () { | ||
const GENERIC<N, const M: usize>: i32 = 0; | ||
|
||
const WHERECLAUSE: i32 = 0 | ||
where | ||
i32:; | ||
} |