diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-08 13:21:18 +1000 | 
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-13 09:29:22 +1000 | 
| commit | fb084a48e2ca663de41b316dc6ece2dceb93e24e (patch) | |
| tree | b78379f996dceee6039ea4880c66e7fe30b3efad /src/libsyntax/entry.rs | |
| parent | 79602c87b561e26fa1a8fe58b9130cca37375f90 (diff) | |
| download | rust-fb084a48e2ca663de41b316dc6ece2dceb93e24e.tar.gz rust-fb084a48e2ca663de41b316dc6ece2dceb93e24e.zip | |
Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.
Diffstat (limited to 'src/libsyntax/entry.rs')
| -rw-r--r-- | src/libsyntax/entry.rs | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/src/libsyntax/entry.rs b/src/libsyntax/entry.rs index 09e26e29d86..267f863ce35 100644 --- a/src/libsyntax/entry.rs +++ b/src/libsyntax/entry.rs @@ -1,5 +1,6 @@ use crate::attr; use crate::ast::{Item, ItemKind}; +use crate::symbol::sym; pub enum EntryPointType { None, @@ -14,9 +15,9 @@ pub enum EntryPointType { pub fn entry_point_type(item: &Item, depth: usize) -> EntryPointType { match item.node { ItemKind::Fn(..) => { - if attr::contains_name(&item.attrs, "start") { + if attr::contains_name(&item.attrs, sym::start) { EntryPointType::Start - } else if attr::contains_name(&item.attrs, "main") { + } else if attr::contains_name(&item.attrs, sym::main) { EntryPointType::MainAttr } else if item.ident.name == "main" { if depth == 1 { | 
