-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into tf/slice-equality-failing-test
* master: fix: Add more thorough check for whether a type is valid when passing it from constrained code to unconstrained code (#5009)
- Loading branch information
Showing
5 changed files
with
69 additions
and
7 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,7 @@ | ||
[package] | ||
name = "regression_5008" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = ">=0.28.0" | ||
|
||
[dependencies] |
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,17 @@ | ||
struct Bar { | ||
value: Field, | ||
} | ||
|
||
struct Foo{ | ||
bar: &mut Bar, | ||
} | ||
|
||
impl Foo { | ||
unconstrained fn crash_fn(self) {} | ||
} | ||
|
||
fn main() { | ||
let foo = Foo { bar: &mut Bar { value: 0 } }; | ||
|
||
foo.crash_fn(); | ||
} |