forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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#99393 - Logarithmus:feature/99255-omit-cons…
…t-generic-suffixes, r=petrochenkov feat: omit suffixes in const generics (e.g. `1_i32`) Closes rust-lang#99255
- Loading branch information
Showing
48 changed files
with
189 additions
and
180 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#![crate_name = "foo"] | ||
|
||
// @has foo/struct.Foo.html '//pre[@class="rust struct"]' \ | ||
// 'pub struct Foo<const M: usize = 10_usize, const N: usize = M, T = i32>(_);' | ||
// 'pub struct Foo<const M: usize = 10, const N: usize = M, T = i32>(_);' | ||
pub struct Foo<const M: usize = 10, const N: usize = M, T = i32>(T); |
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
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
pub struct Example<const N: usize=13>; | ||
pub struct Example2<T=u32, const N: usize=13>(T); | ||
pub struct Example3<const N: usize=13, T=u32>(T); | ||
pub struct Example4<const N: usize=13, const M: usize=4>; | ||
pub struct Example<const N: usize = 13>; | ||
pub struct Example2<T = u32, const N: usize = 13>(T); | ||
pub struct Example3<const N: usize = 13, T = u32>(T); | ||
pub struct Example4<const N: usize = 13, const M: usize = 4>; | ||
|
||
fn main() { | ||
let e: Example::<13> = (); | ||
let e: Example<13> = (); | ||
//~^ Error: mismatched types | ||
//~| expected struct `Example` | ||
let e: Example2::<u32, 13> = (); | ||
let e: Example2<u32, 13> = (); | ||
//~^ Error: mismatched types | ||
//~| expected struct `Example2` | ||
let e: Example3::<13, u32> = (); | ||
let e: Example3<13, u32> = (); | ||
//~^ Error: mismatched types | ||
//~| expected struct `Example3` | ||
let e: Example3::<7> = (); | ||
let e: Example3<7> = (); | ||
//~^ Error: mismatched types | ||
//~| expected struct `Example3<7_usize>` | ||
let e: Example4::<7> = (); | ||
//~| expected struct `Example3<7>` | ||
let e: Example4<7> = (); | ||
//~^ Error: mismatched types | ||
//~| expected struct `Example4<7_usize>` | ||
//~| expected struct `Example4<7>` | ||
} |
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
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
Oops, something went wrong.