Remove the box_pointers lint.

As the comment says, this lint "is mostly historical, and not
particularly useful". It's not worth keeping it around.
This commit is contained in:
Nicholas Nethercote 2024-06-05 18:06:09 +10:00
parent 4bc39f028d
commit c053e8939b
9 changed files with 11 additions and 125 deletions

View file

@ -1,12 +0,0 @@
#![allow(dead_code)]
#![forbid(box_pointers)]
struct Foo {
x: Box<isize> //~ ERROR type uses owned
}
fn main() {
let _x: Foo = Foo { x : Box::new(10) };
//~^ ERROR type uses owned
}

View file

@ -1,20 +0,0 @@
error: type uses owned (Box type) pointers: Box<isize>
--> $DIR/lint-owned-heap-memory.rs:6:5
|
LL | x: Box<isize>
| ^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/lint-owned-heap-memory.rs:2:11
|
LL | #![forbid(box_pointers)]
| ^^^^^^^^^^^^
error: type uses owned (Box type) pointers: Box<isize>
--> $DIR/lint-owned-heap-memory.rs:10:29
|
LL | let _x: Foo = Foo { x : Box::new(10) };
| ^^^^^^^^^^^^
error: aborting due to 2 previous errors

View file

@ -9,7 +9,7 @@
#![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
//~^ ERROR malformed lint attribute
//~| NOTE bad attribute argument
#![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
#![warn(unsafe_code, blerp = "or in league with robbers have reversed the signposts")]
//~^ ERROR malformed lint attribute
//~| NOTE bad attribute argument
#![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]

View file

@ -17,10 +17,10 @@ LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides thei
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
error[E0452]: malformed lint attribute input
--> $DIR/reasons-erroneous.rs:12:23
--> $DIR/reasons-erroneous.rs:12:22
|
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
LL | #![warn(unsafe_code, blerp = "or in league with robbers have reversed the signposts")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
error[E0452]: malformed lint attribute input
--> $DIR/reasons-erroneous.rs:15:36