-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move const-eval/stable-metric ui tests
- Loading branch information
1 parent
1bbd655
commit bdb815a
Showing
9 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
tests/ui/consts/const-eval/stable-metric/dominators-edge-case.rs
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,19 @@ | ||
// check-pass | ||
// | ||
// Exercising an edge case which was found during Stage 2 compilation. | ||
// Compilation would fail for this code when running the `CtfeLimit` | ||
// MirPass (specifically when looking up the dominators). | ||
#![crate_type="lib"] | ||
|
||
const DUMMY: Expr = Expr::Path(ExprPath { | ||
attrs: Vec::new(), | ||
path: Vec::new(), | ||
}); | ||
|
||
pub enum Expr { | ||
Path(ExprPath), | ||
} | ||
pub struct ExprPath { | ||
pub attrs: Vec<()>, | ||
pub path: Vec<()>, | ||
} |