-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #114450 - chenyukang:yukang-fix-114435, r=compiler-er…
…rors Fix ICE failed to get layout for ReferencesError Fixes #114435 r? `@compiler-errors`
- Loading branch information
Showing
5 changed files
with
55 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
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,44 @@ | ||
// build-fail | ||
// compile-flags: --crate-type lib -Cdebuginfo=2 | ||
// error-pattern: the type has an unknown layout | ||
|
||
#![recursion_limit = "10"] | ||
macro_rules! link { | ||
($outer:ident, $inner:ident) => { | ||
struct $outer($inner); | ||
impl $outer { | ||
fn new() -> $outer { | ||
$outer($inner::new()) | ||
} | ||
} | ||
impl std::ops::Deref for $outer { | ||
type Target = $inner; | ||
fn deref(&self) -> &$inner { | ||
&self.0 | ||
} | ||
} | ||
}; | ||
} | ||
|
||
struct Bottom; | ||
|
||
impl Bottom { | ||
fn new() -> Bottom { | ||
Bottom | ||
} | ||
} | ||
|
||
|
||
link!(A, B); | ||
link!(B, C); | ||
link!(C, D); | ||
link!(D, E); | ||
link!(E, F); | ||
link!(F, G); | ||
link!(G, H); | ||
link!(H, I); | ||
link!(I, J); | ||
link!(J, K); | ||
link!(K, Bottom); | ||
|
||
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: reached the recursion limit finding the struct tail for `Bottom` | ||
| | ||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]` | ||
|
||
error: the type has an unknown layout | ||
|
||
error: aborting due to 2 previous errors | ||
|