-
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.
Rollup merge of #60806 - Xanewok:beta-save-analysis-assoc-const-ice, …
…r=pietroalbini
- Loading branch information
Showing
5 changed files
with
48 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// compile-flags: -Zsave-analysis | ||
|
||
// Check that this doesn't ICE when processing associated const (field expr). | ||
|
||
pub fn f() { | ||
trait Trait {} | ||
impl Trait { | ||
const FLAG: u32 = bogus.field; //~ ERROR cannot find value `bogus` | ||
} | ||
} | ||
|
||
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,9 @@ | ||
error[E0425]: cannot find value `bogus` in this scope | ||
--> $DIR/issue-59134-0.rs:8:27 | ||
| | ||
LL | const FLAG: u32 = bogus.field; | ||
| ^^^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0425`. |
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 @@ | ||
// compile-flags: -Zsave-analysis | ||
|
||
// Check that this doesn't ICE when processing associated const (type). | ||
|
||
fn func() { | ||
trait Trait { | ||
type MyType; | ||
const CONST: Self::MyType = bogus.field; //~ ERROR cannot find value `bogus` | ||
} | ||
} | ||
|
||
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,9 @@ | ||
error[E0425]: cannot find value `bogus` in this scope | ||
--> $DIR/issue-59134-1.rs:8:37 | ||
| | ||
LL | const CONST: Self::MyType = bogus.field; | ||
| ^^^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0425`. |