
`vec_assign()` requires recyclable value
========================================

> vec_assign(1:3, 1:3, 1:2)
Error: `value` can't be recycled to size 3.
x It must be size 3 or 1, not 2.


logical subscripts must match size of indexed vector
====================================================

> vec_assign(1:2, c(TRUE, FALSE, TRUE), 5)
Error: Must assign to elements with a valid subscript vector.
i Logical subscripts must match the size of the indexed input.
x The input has size 2 but the subscript has size 3.

> vec_assign(mtcars, c(TRUE, FALSE), mtcars[1, ])
Error: Must assign to elements with a valid subscript vector.
i Logical subscripts must match the size of the indexed input.
x The input has size 32 but the subscript has size 2.


must assign existing elements
=============================

> vec_assign(1:3, 5, 10)
Error: Can't assign to elements that don't exist.
x The location 5 doesn't exist.
i There are only 3 elements.

> vec_assign(1:3, "foo", 10)
Error: Can't use character names to index an unnamed vector.

> vec_slice(letters, -100) <- "foo"
Error: Can't negate elements that don't exist.
x The location 100 doesn't exist.
i There are only 26 elements.

> vec_assign(set_names(letters), "foo", "bar")
Error: Can't assign to elements that don't exist.
x The element `foo` doesn't exist.


must assign with proper negative locations
==========================================

> vec_assign(1:3, c(-1, 1), 1:2)
Error: Must assign to elements with a valid subscript vector.
x Negative locations can't be mixed with positive locations.
i The subscript has a positive value at location 2.

> vec_assign(1:3, c(-1, NA), 1:2)
Error: Must assign to elements with a valid subscript vector.
x Negative locations can't have missing values.
i The subscript has a missing value at location 2.

