-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gccrs: Remove bad assertion in name resolution
This was a handy debug assertion but only works for valid rust code. This needs to handle the case where the type is not resolved which is a valid case. Fixes #2423 gcc/rust/ChangeLog: * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): remove assertions gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: nr2 can't handle this * rust/compile/issue-2423.rs: New test. Signed-off-by: Philip Herron <herron.philip@googlemail.com>
- Loading branch information
Showing
3 changed files
with
39 additions
and
6 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,14 @@ | ||
impl NonExistant { | ||
// { dg-error "failed to resolve" "" { target *-*-* } .-1 } | ||
fn test() {} | ||
} | ||
|
||
impl NotFound for NonExistant { | ||
// { dg-error "failed to resolve" "" { target *-*-* } .-1 } | ||
fn test() {} | ||
} | ||
|
||
trait A {} | ||
|
||
impl A for NotFound {} | ||
// { dg-error "failed to resolve" "" { target *-*-* } .-1 } |
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