]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #104024 - noeddl:unused-must-use, r=compiler-errors
authorfee1-dead <ent3rm4n@gmail.com>
Wed, 28 Dec 2022 07:51:39 +0000 (15:51 +0800)
committerGitHub <noreply@github.com>
Wed, 28 Dec 2022 07:51:39 +0000 (15:51 +0800)
Fix `unused_must_use` warning for `Box::from_raw`

1  2 
library/alloc/src/boxed.rs
src/test/ui/lint/unused/must-use-box-from-raw.stderr

Simple merge
index 72118275774d14b4d82747c4cb03297c3e89d54c,fcf32b75d8d920421fe06516cba05898ed8cab14..47ab613bec21c1b5f0e64522a27a2f085ca0e2f2
@@@ -2,9 -2,9 +2,9 @@@ warning: unused return value of `Box::<
    --> $DIR/must-use-box-from-raw.rs:8:5
     |
  LL |     Box::from_raw(ptr);
 -   |     ^^^^^^^^^^^^^^^^^^^
 +   |     ^^^^^^^^^^^^^^^^^^
     |
-    = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
+    = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
  note: the lint level is defined here
    --> $DIR/must-use-box-from-raw.rs:5:9
     |