merge privacy/privacy-sanity-2 with privacy/privacy-sanity.rs Add comment to generics/type-args-on-module-in-bound.rs Add comment to array-slice-vec/closure-in-array-eln.rs Add comment to array-slice-vec/return-in-array-len.rs Merge for-loop-while/break-outside-loop-2.rs with for-loop-while/break-outside-loop.rs Add comment to macros/column-macro-collision.rs Add comment to privacy/private-extern-fn-visibility.rs Add comment to mismatched_types/vec-hashset-type-mismatch.rs Merge std-sync-right-kind-impls-2.rs with std-sync-right-kind-impls.rs Add comment to array-slice-vec/slice-of-multi-ref.rs Add comment to mismatched_types\vec-hashset-type-mismatch.rs Add comment to derives/derive-hygiene-struct-builder.rs Add comment to label/undeclared-label-span.rs Add comment to label\undeclared-label-span.rs Add comment to mismatched_types/array-repeat-unit-struct.rs
22 lines
873 B
Rust
22 lines
873 B
Rust
//! regression test for <https://github.com/rust-lang/rust/issues/51714>
|
|
fn main() {
|
|
//~^ NOTE: not the enclosing function body
|
|
//~| NOTE: not the enclosing function body
|
|
//~| NOTE: not the enclosing function body
|
|
//~| NOTE: not the enclosing function body
|
|
|_: [_; return || {}]| {};
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
//~| NOTE: the return is part of this body...
|
|
|
|
[(); return || {}];
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
//~| NOTE: the return is part of this body...
|
|
|
|
[(); return |ice| {}];
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
//~| NOTE: the return is part of this body...
|
|
|
|
[(); return while let Some(n) = Some(0) {}];
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
//~| NOTE: the return is part of this body...
|
|
}
|