-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework fallible constructors #1491
Conversation
I am also getting clippy warning for constructors attribute:
Currently debugging this |
* revert instantiating when error * display name + correct return typ when Self * fix dereferencing issue * UI test error variant + cleanup * cargo fmt * cargo fmt * fix another reference issue * fix spec contract test Co-authored-by: Andrew Jones <ascjones@gmail.com>
@@ -0,0 +1,35 @@ | |||
[package] | |||
name = "constructors_return_value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this "example" into your integration tests folder @HCastano, because already all the CI scripts and waterfall tests deal with this special case folder. Perhaps we could introduce an integration-tests
folder and have feature specific integration tests in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could introduce an integration-tests folder and have feature specific integration tests in there.
Yep, I was thinking the same thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff!
fn generate_metadata() -> InkProject { | ||
extern "Rust" { | ||
fn __ink_generate_metadata() -> InkProject; | ||
} | ||
|
||
unsafe { __ink_generate_metadata() } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haxxor
unsafe { __ink_generate_metadata() } | ||
} | ||
|
||
fn main() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice test 👍
Follow up to #1460 and #1446. Closes #1483.
This PR:
Test with:
cargo test --manifest-path ./examples/lang-err-integration-tests/constructors-return-value/Cargo.toml --features e2e-tests