Open
Description
Suggestion (not for this PR): #2735 refers to
"let _ = foo();"
is differently effectful from just"foo();"
This test (
tests/ui/drop/issue-2735-2.rs
) exercisinglet _ = <expr>;
vs<expr>;
drop order does not need to allownon_camel_case_types
, just changedefer
struct to use the canonical name, this is needlessly confusing:
- In the struct decl,
defer
-the-struct
is in type namespace,defer
-the-struct-constructor is in value namespace- In this function decl,
defer
(fn
) is in the value namespace,defer<'_>
is in the type namespace- In the usage in
main
,defer
is the value namespace struct constructorSame for
tests/ui/drop/issue-2735-3.rs
tests/ui/drop/issue-979.rs
Originally posted by @jieyouxu in #138677 (comment)