-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
borrowed_box
lint and Any
#1884
Comments
hmm... that definitely is a footgun. Let's special case |
I would like to try to fix this. 😄 |
Great! It's probably enough to extract the boxed type (see the |
@oli-obk You propose to use As for |
Ah right. You need to distinguish between syntactial types and actual types. Syntactical types are what you enter in the code (e.g. You should be able to get the real type via |
I'm not sure that this is an issue, but it can be a little confusing.
I have the following situation: there is a function that works with
panic::catch_unwind
error (Box<Any + Send + 'static>
):Clippy suggests the following:
Functions becomes more generic, that for sure, but
Any
is a specific type:foo
call site must be updated otherwise instead ofAny
that contains a panic error it will takeAny
that containsBox<Any + Send>
.Probably
borrowed_box
lint should be disabled forAny
type?The text was updated successfully, but these errors were encountered: