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#83569 - sjakobi:issue56445-regression-test,…
… r=jackh726 Add regression tests for rust-lang#56445 Closes rust-lang#56445.
- Loading branch information
Showing
7 changed files
with
48 additions
and
3 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
2 changes: 1 addition & 1 deletion
2
...st-generics/issues/issue-56445.min.stderr → ...-generics/issues/issue-56445-1.min.stderr
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
File renamed without changes.
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,11 @@ | ||
// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-502095133 | ||
struct OnDiskDirEntry<'a> { _s: &'a usize } | ||
|
||
impl<'a> OnDiskDirEntry<'a> { | ||
const LFN_FRAGMENT_LEN: usize = 2; | ||
|
||
fn lfn_contents(&self) -> [char; Self::LFN_FRAGMENT_LEN] { loop { } } | ||
//~^ ERROR: generic `Self` types are currently not permitted in anonymous constants | ||
} | ||
|
||
fn main() {} |
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,14 @@ | ||
error: generic `Self` types are currently not permitted in anonymous constants | ||
--> $DIR/issue-56445-2.rs:7:38 | ||
| | ||
LL | fn lfn_contents(&self) -> [char; Self::LFN_FRAGMENT_LEN] { loop { } } | ||
| ^^^^ | ||
| | ||
note: not a concrete type | ||
--> $DIR/issue-56445-2.rs:4:10 | ||
| | ||
LL | impl<'a> OnDiskDirEntry<'a> { | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
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,12 @@ | ||
// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-524494170 | ||
pub struct Memory<'rom> { | ||
rom: &'rom [u8], | ||
ram: [u8; Self::SIZE], | ||
//~^ ERROR: generic `Self` types are currently not permitted in anonymous constants | ||
} | ||
|
||
impl<'rom> Memory<'rom> { | ||
pub const SIZE: usize = 0x8000; | ||
} | ||
|
||
fn main() {} |
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,8 @@ | ||
error: generic `Self` types are currently not permitted in anonymous constants | ||
--> $DIR/issue-56445-3.rs:4:15 | ||
| | ||
LL | ram: [u8; Self::SIZE], | ||
| ^^^^ | ||
|
||
error: aborting due to previous error | ||
|