-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Refactor inner allocation logic of temp dangling pointer lint #133263
base: master
Are you sure you want to change the base?
Conversation
00937d7
to
c547b45
Compare
use rustc_hir::{Block, Body, Expr, ExprKind, FnDecl, LangItem}; | ||
use rustc_middle::ty::{Ty, TyCtxt}; | ||
use rustc_hir::{Block, Body, Expr, ExprKind, FnDecl}; | ||
// use rustc_middle::ty::{self, Ty}; |
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.
A leftover comment, probably no big deal
And |
This PR refactors the inner allocation logic of the
dangling_pointers_from_temporaries
lint by removing the hardcoded list of types and instead taking advantage of the semantics of theas_ptr{,_mut}
methods and derefs.cc @GrigorenkoPV
r? compiler