Rollup merge of #80495 - jyn514:rename-empty, r=petrochenkov
Rename kw::Invalid -> kw::Empty See https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Is.20there.20a.20symbol.20for.20the.20empty.20string.3F/near/220054471 for context. r? `@petrochenkov`
This commit is contained in:
commit
9e8edc8c22
27 changed files with 46 additions and 46 deletions
|
@ -883,7 +883,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
Ok(method)
|
||||
}
|
||||
Err(error) => {
|
||||
if segment.ident.name != kw::Invalid {
|
||||
if segment.ident.name != kw::Empty {
|
||||
self.report_extended_method_error(segment, span, args, rcvr_t, error);
|
||||
}
|
||||
Err(())
|
||||
|
@ -1547,7 +1547,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
return field_ty;
|
||||
}
|
||||
|
||||
if field.name == kw::Invalid {
|
||||
if field.name == kw::Empty {
|
||||
} else if self.method_exists(field, expr_t, expr.hir_id, true) {
|
||||
self.ban_take_value_of_method(expr, expr_t, field);
|
||||
} else if !expr_t.is_primitive_ty() {
|
||||
|
|
|
@ -914,7 +914,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
method::MethodError::PrivateMatch(kind, def_id, _) => Ok((kind, def_id)),
|
||||
_ => Err(ErrorReported),
|
||||
};
|
||||
if item_name.name != kw::Invalid {
|
||||
if item_name.name != kw::Empty {
|
||||
if let Some(mut e) = self.report_method_error(
|
||||
span,
|
||||
ty,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue