We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcdce8f commit dcaaab3Copy full SHA for dcaaab3
tests/ui/no_effect.rs
@@ -37,7 +37,9 @@ enum DropEnum {
37
impl Drop for DropEnum {
38
fn drop(&mut self) {}
39
}
40
-
+struct FooString {
41
+ s: String,
42
+}
43
union Union {
44
a: u8,
45
b: f64,
@@ -79,6 +81,8 @@ fn main() {
79
81
[42; 55][13];
80
82
let mut x = 0;
83
|| x += 5;
84
+ let s: String = "foo".into();
85
+ FooString { s: s };
86
87
// Do not warn
88
get_number();
@@ -108,6 +112,7 @@ fn main() {
108
112
[get_number(); 55];
109
113
[42; 55][get_number() as usize];
110
114
{get_number()};
115
+ FooString { s: String::from("blah"), };
111
116
117
118
DropTuple(get_number());
0 commit comments