-
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
box_vec: dont use Box<&T> #5310
Conversation
b7edf08
to
ca5f1c0
Compare
d7eea04
to
7196d14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Some small name/doc/test changes remaining
a35a8b2
to
f9d5758
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with one change
cx, | ||
BOX_BORROWS, | ||
hir_ty.span, | ||
"usage of `Box<&T>`", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use span_lint_and_suggestion
here and emit a suggestion instead of a help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the text being something like "Box<&T>
does not offer any advantages over &T
, please try: {}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd want to also add a fixture test for this (add run-rustfix to the top and run/update the tests a couple times)
☔ The latest upstream changes (presumably #5294) made this pull request unmergeable. Please resolve the merge conflicts. |
moving those changes to #5349 |
refers to #2394
Don't use Box<&T>