Skip to content
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

Fixes for nightly changes #1327

Merged
merged 3 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions crates/lang/ir/src/ir/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ impl TryFrom<ast::AttributeArgs> for Config {
))
}
} else if arg.name.is_ident("keep_attr") {
if let Err(err) = whitelisted_attributes.parse_arg_value(&arg) {
return Err(err)
}
whitelisted_attributes.parse_arg_value(&arg)?;
} else {
return Err(format_err_spanned!(
arg,
Expand Down
4 changes: 1 addition & 3 deletions crates/lang/ir/src/ir/trait_def/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ impl TryFrom<ast::AttributeArgs> for TraitDefinitionConfig {
))
}
} else if arg.name.is_ident("keep_attr") {
if let Err(err) = whitelisted_attributes.parse_arg_value(&arg) {
return Err(err)
}
whitelisted_attributes.parse_arg_value(&arg)?;
} else {
return Err(format_err_spanned!(
arg,
Expand Down
12 changes: 4 additions & 8 deletions crates/lang/ir/src/ir/trait_def/item/trait_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,10 @@ impl<'a> InkTraitMessage<'a> {
true
}
syn::FnArg::Typed(pat_type) => {
match &*pat_type.ty {
syn::Type::Reference(reference)
if reference.mutability.is_some() =>
{
true
}
_ => false,
}
matches!(
&*pat_type.ty,
syn::Type::Reference(reference) if reference.mutability.is_some()
)
}
_ => false,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ error[E0599]: the method `fire` exists for struct `ink_env::call::CallBuilder<De
= note: the following trait bounds were not satisfied:
`NonCodecType: parity_scale_codec::Decode`
note: the following trait must be implemented
--> $CARGO/parity-scale-codec-3.1.5/src/codec.rs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmichi uhh why's this been downgraded?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nvm I see it's fixed in #1328

--> $CARGO/parity-scale-codec-3.1.2/src/codec.rs
|
| pub trait Decode: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ error[E0599]: the method `fire` exists for struct `CallBuilder<E, Set<Call<E>>,
= note: the following trait bounds were not satisfied:
`NonCodec: parity_scale_codec::Decode`
note: the following trait must be implemented
--> $CARGO/parity-scale-codec-3.1.5/src/codec.rs
--> $CARGO/parity-scale-codec-3.1.2/src/codec.rs
|
| pub trait Decode: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^