mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Don't store &Span
This is just needless indirection.
This commit is contained in:
parent
4be0675589
commit
288b4e9078
@ -305,7 +305,7 @@ impl_stable_hash_for!(enum crate::interpret::eval_context::StackPopCleanup {
|
||||
#[derive(Eq, PartialEq)]
|
||||
struct FrameSnapshot<'a, 'tcx> {
|
||||
instance: &'a ty::Instance<'tcx>,
|
||||
span: &'a Span,
|
||||
span: Span,
|
||||
return_to_block: &'a StackPopCleanup,
|
||||
return_place: Option<Place<(), AllocIdSnapshot<'a>>>,
|
||||
locals: IndexVec<mir::Local, LocalValue<(), AllocIdSnapshot<'a>>>,
|
||||
@ -345,7 +345,7 @@ impl<'a, 'mir, 'tcx, Ctx> Snapshot<'a, Ctx> for &'a Frame<'mir, 'tcx>
|
||||
|
||||
FrameSnapshot {
|
||||
instance,
|
||||
span,
|
||||
span: *span,
|
||||
return_to_block,
|
||||
block,
|
||||
stmt: *stmt,
|
||||
|
@ -171,7 +171,7 @@ enum ResolutionError<'a> {
|
||||
GenericParamsFromOuterFunction(Res),
|
||||
/// Error E0403: the name is already used for a type or const parameter in this generic
|
||||
/// parameter list.
|
||||
NameAlreadyUsedInParameterList(Name, &'a Span),
|
||||
NameAlreadyUsedInParameterList(Name, Span),
|
||||
/// Error E0407: method is not a member of trait.
|
||||
MethodNotMemberOfTrait(Name, &'a str),
|
||||
/// Error E0437: type is not a member of trait.
|
||||
@ -297,7 +297,7 @@ fn resolve_struct_error<'sess, 'a>(resolver: &'sess Resolver<'_>,
|
||||
parameter in this list of generic parameters",
|
||||
name);
|
||||
err.span_label(span, "already used");
|
||||
err.span_label(first_use_span.clone(), format!("first use of `{}`", name));
|
||||
err.span_label(first_use_span, format!("first use of `{}`", name));
|
||||
err
|
||||
}
|
||||
ResolutionError::MethodNotMemberOfTrait(method, trait_) => {
|
||||
@ -2853,7 +2853,7 @@ impl<'a> Resolver<'a> {
|
||||
let span = seen_bindings.get(&ident).unwrap();
|
||||
let err = ResolutionError::NameAlreadyUsedInParameterList(
|
||||
ident.name,
|
||||
span,
|
||||
*span,
|
||||
);
|
||||
resolve_error(self, param.ident.span, err);
|
||||
}
|
||||
@ -2875,7 +2875,7 @@ impl<'a> Resolver<'a> {
|
||||
let span = seen_bindings.get(&ident).unwrap();
|
||||
let err = ResolutionError::NameAlreadyUsedInParameterList(
|
||||
ident.name,
|
||||
span,
|
||||
*span,
|
||||
);
|
||||
resolve_error(self, param.ident.span, err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user