about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLukas Markeffsky <@>2022-11-14 16:06:21 +0100
committerLukas Markeffsky <@>2022-11-14 16:06:21 +0100
commitb8357ffd1f2b3f7cd12b7cd29d32c08a5ec5b7c5 (patch)
treee579224e86cf8eb7e3149d39486beb935b93c9b5 /tests
parenta5995279fb896c87b94cef1f34fb4a17d87eaae7 (diff)
downloadrust-b8357ffd1f2b3f7cd12b7cd29d32c08a5ec5b7c5.tar.gz
rust-b8357ffd1f2b3f7cd12b7cd29d32c08a5ec5b7c5.zip
fix `vec-box-size-threshold` off-by-one error
Diffstat (limited to 'tests')
-rw-r--r--tests/ui-toml/vec_box_sized/test.rs5
-rw-r--r--tests/ui-toml/vec_box_sized/test.stderr6
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/ui-toml/vec_box_sized/test.rs b/tests/ui-toml/vec_box_sized/test.rs
index bf04bee1637..4c46deb585b 100644
--- a/tests/ui-toml/vec_box_sized/test.rs
+++ b/tests/ui-toml/vec_box_sized/test.rs
@@ -7,8 +7,9 @@ struct C {
 }
 
 struct Foo(Vec<Box<u8>>);
-struct Bar(Vec<Box<u32>>);
-struct Baz(Vec<Box<(u32, u32)>>);
+struct Bar(Vec<Box<u16>>);
+struct Quux(Vec<Box<u32>>);
+struct Baz(Vec<Box<(u16, u16)>>);
 struct BarBaz(Vec<Box<S>>);
 struct FooBarBaz(Vec<Box<C>>);
 
diff --git a/tests/ui-toml/vec_box_sized/test.stderr b/tests/ui-toml/vec_box_sized/test.stderr
index cf194de3c55..55de68f8ecf 100644
--- a/tests/ui-toml/vec_box_sized/test.stderr
+++ b/tests/ui-toml/vec_box_sized/test.stderr
@@ -9,11 +9,11 @@ LL | struct Foo(Vec<Box<u8>>);
 error: `Vec<T>` is already on the heap, the boxing is unnecessary
   --> $DIR/test.rs:10:12
    |
-LL | struct Bar(Vec<Box<u32>>);
-   |            ^^^^^^^^^^^^^ help: try: `Vec<u32>`
+LL | struct Bar(Vec<Box<u16>>);
+   |            ^^^^^^^^^^^^^ help: try: `Vec<u16>`
 
 error: `Vec<T>` is already on the heap, the boxing is unnecessary
-  --> $DIR/test.rs:13:18
+  --> $DIR/test.rs:14:18
    |
 LL | struct FooBarBaz(Vec<Box<C>>);
    |                  ^^^^^^^^^^^ help: try: `Vec<C>`