Merge pull request #2394 from dtolnay/emptybound

Eliminate special case on empty string passed to bound=""
This commit is contained in:
David Tolnay 2023-03-08 19:53:07 -08:00 committed by GitHub
commit b80e722f81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1626,9 +1626,6 @@ fn parse_lit_into_where(
lit: &syn::Lit,
) -> Result<Vec<syn::WherePredicate>, ()> {
let string = get_lit_str2(cx, attr_name, meta_item_name, lit)?;
if string.value().is_empty() {
return Ok(Vec::new());
}
let where_string = syn::LitStr::new(&format!("where {}", string.value()), string.span());