Rename sym::item_context
as sym::ItemContext
.
Because it represents the symbol `ItemContext`, and `sym` identifiers are supposed to match the actual symbol whenever possible.
This commit is contained in:
parent
fd8f177234
commit
600b8247a8
3 changed files with 5 additions and 5 deletions
|
@ -145,6 +145,7 @@ symbols! {
|
|||
HashSet,
|
||||
Input,
|
||||
IntoIterator,
|
||||
ItemContext,
|
||||
Iterator,
|
||||
Layout,
|
||||
LintPass,
|
||||
|
@ -553,7 +554,6 @@ symbols! {
|
|||
issue_5723_bootstrap,
|
||||
issue_tracker_base_url,
|
||||
item,
|
||||
item_context: "ItemContext",
|
||||
item_like_imports,
|
||||
iter,
|
||||
keyword,
|
||||
|
|
|
@ -126,7 +126,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
|
||||
let mut flags = vec![];
|
||||
flags.push((
|
||||
sym::item_context,
|
||||
sym::ItemContext,
|
||||
self.describe_enclosure(obligation.cause.body_id).map(|s| s.to_owned()),
|
||||
));
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ impl<'tcx> OnUnimplementedFormatString {
|
|||
// `{from_desugaring}` is allowed
|
||||
Position::ArgumentNamed(s) if s == sym::from_desugaring => (),
|
||||
// `{ItemContext}` is allowed
|
||||
Position::ArgumentNamed(s) if s == sym::item_context => (),
|
||||
Position::ArgumentNamed(s) if s == sym::ItemContext => (),
|
||||
// So is `{A}` if A is a type parameter
|
||||
Position::ArgumentNamed(s) => {
|
||||
match generics.params.iter().find(|param| param.name == s) {
|
||||
|
@ -350,7 +350,7 @@ impl<'tcx> OnUnimplementedFormatString {
|
|||
|
||||
let s = self.0.as_str();
|
||||
let parser = Parser::new(&s, None, None, false, ParseMode::Format);
|
||||
let item_context = (options.get(&sym::item_context)).unwrap_or(&empty_string);
|
||||
let item_context = (options.get(&sym::ItemContext)).unwrap_or(&empty_string);
|
||||
parser
|
||||
.map(|p| match p {
|
||||
Piece::String(s) => s,
|
||||
|
@ -364,7 +364,7 @@ impl<'tcx> OnUnimplementedFormatString {
|
|||
} else if s == sym::from_desugaring || s == sym::from_method {
|
||||
// don't break messages using these two arguments incorrectly
|
||||
&empty_string
|
||||
} else if s == sym::item_context {
|
||||
} else if s == sym::ItemContext {
|
||||
&item_context
|
||||
} else {
|
||||
bug!(
|
||||
|
|
Loading…
Reference in a new issue