Rollup merge of #124099 - voidc:disallow-ambiguous-expr-attrs, r=davidtwco
Disallow ambiguous attributes on expressions This implements the suggestion in [#15701](https://github.com/rust-lang/rust/issues/15701#issuecomment-2033124217) to disallow ambiguous outer attributes on expressions. This should resolve one of the concerns blocking the stabilization of `stmt_expr_attributes`.
This commit is contained in:
commit
9c0e5f2c34
@ -214,8 +214,8 @@ pub struct Params {
|
||||
// #3313
|
||||
fn stmt_expr_attributes() {
|
||||
let foo ;
|
||||
#[must_use]
|
||||
foo = false ;
|
||||
(#[must_use]
|
||||
foo) = false ;
|
||||
}
|
||||
|
||||
// #3509
|
||||
|
@ -248,8 +248,8 @@ pub struct Params {
|
||||
// #3313
|
||||
fn stmt_expr_attributes() {
|
||||
let foo;
|
||||
#[must_use]
|
||||
foo = false;
|
||||
(#[must_use]
|
||||
foo) = false;
|
||||
}
|
||||
|
||||
// #3509
|
||||
|
Loading…
Reference in New Issue
Block a user