Fix rustc_pass_by_value.
This commit is contained in:
parent
1c737d6997
commit
5de9c84140
2 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ impl LifetimeName {
|
||||||
|
|
||||||
impl fmt::Display for Lifetime {
|
impl fmt::Display for Lifetime {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
self.ident.fmt(f)
|
if self.ident.name != kw::Empty { self.ident.name.fmt(f) } else { "'_".fmt(f) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ fn gen_args(cx: &LateContext<'_>, segment: &PathSegment<'_>) -> String {
|
||||||
.args
|
.args
|
||||||
.iter()
|
.iter()
|
||||||
.map(|arg| match arg {
|
.map(|arg| match arg {
|
||||||
GenericArg::Lifetime(lt) => lt.ident.to_string(),
|
GenericArg::Lifetime(lt) => lt.to_string(),
|
||||||
GenericArg::Type(ty) => {
|
GenericArg::Type(ty) => {
|
||||||
cx.tcx.sess.source_map().span_to_snippet(ty.span).unwrap_or_else(|_| "_".into())
|
cx.tcx.sess.source_map().span_to_snippet(ty.span).unwrap_or_else(|_| "_".into())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue