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
|
// #3313
|
||||||
fn stmt_expr_attributes() {
|
fn stmt_expr_attributes() {
|
||||||
let foo ;
|
let foo ;
|
||||||
#[must_use]
|
(#[must_use]
|
||||||
foo = false ;
|
foo) = false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// #3509
|
// #3509
|
||||||
|
@ -248,8 +248,8 @@ pub struct Params {
|
|||||||
// #3313
|
// #3313
|
||||||
fn stmt_expr_attributes() {
|
fn stmt_expr_attributes() {
|
||||||
let foo;
|
let foo;
|
||||||
#[must_use]
|
(#[must_use]
|
||||||
foo = false;
|
foo) = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// #3509
|
// #3509
|
||||||
|
Loading…
Reference in New Issue
Block a user