update pass_by_value
This commit is contained in:
parent
563250a65c
commit
e6808381e5
2 changed files with 3 additions and 3 deletions
|
@ -625,7 +625,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||||
),
|
),
|
||||||
rustc_attr!(
|
rustc_attr!(
|
||||||
rustc_pass_by_value, Normal,
|
rustc_pass_by_value, Normal,
|
||||||
template!(Word), WarnFollowing,
|
template!(Word), ErrorFollowing,
|
||||||
"#[rustc_pass_by_value] is used to mark types that must be passed by value instead of reference."
|
"#[rustc_pass_by_value] is used to mark types that must be passed by value instead of reference."
|
||||||
),
|
),
|
||||||
BuiltinAttribute {
|
BuiltinAttribute {
|
||||||
|
|
|
@ -76,10 +76,10 @@ fn gen_args(cx: &LateContext<'_>, segment: &PathSegment<'_>) -> String {
|
||||||
.map(|arg| match arg {
|
.map(|arg| match arg {
|
||||||
GenericArg::Lifetime(lt) => lt.name.ident().to_string(),
|
GenericArg::Lifetime(lt) => lt.name.ident().to_string(),
|
||||||
GenericArg::Type(ty) => {
|
GenericArg::Type(ty) => {
|
||||||
cx.tcx.sess.source_map().span_to_snippet(ty.span).unwrap_or_default()
|
cx.tcx.sess.source_map().span_to_snippet(ty.span).unwrap_or_else(|_| "_".into())
|
||||||
}
|
}
|
||||||
GenericArg::Const(c) => {
|
GenericArg::Const(c) => {
|
||||||
cx.tcx.sess.source_map().span_to_snippet(c.span).unwrap_or_default()
|
cx.tcx.sess.source_map().span_to_snippet(c.span).unwrap_or_else(|_| "_".into())
|
||||||
}
|
}
|
||||||
GenericArg::Infer(_) => String::from("_"),
|
GenericArg::Infer(_) => String::from("_"),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue