about summary refs log tree commit diff
path: root/src/librustc_resolve
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-04-16 19:48:24 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-04-24 20:59:44 +0300
commit8dbab5121e214a08690eefdaa3ee45bb2d1bbd5e (patch)
treed210176cf841c3da5b57b53ac84805b5d92b653b /src/librustc_resolve
parente2c821d35ee5cb5211f92480a53b409b2b2c359e (diff)
downloadrust-8dbab5121e214a08690eefdaa3ee45bb2d1bbd5e.tar.gz
rust-8dbab5121e214a08690eefdaa3ee45bb2d1bbd5e.zip
syntax: Don't parse idents with `parse_path`
Lift some restrictions on type parameters in paths
Sanity check import paths for type parameters
Diffstat (limited to 'src/librustc_resolve')
-rw-r--r--src/librustc_resolve/build_reduced_graph.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs
index effc751c507..f92673b781e 100644
--- a/src/librustc_resolve/build_reduced_graph.rs
+++ b/src/librustc_resolve/build_reduced_graph.rs
@@ -120,7 +120,7 @@ impl<'b, 'tcx:'b> Resolver<'b, 'tcx> {
         // prevent `self` or `super` at beginning of global path
         if path.global && path.segments.len() > 0 {
             let first = path.segments[0].identifier.name;
-            if first == keywords::Super.to_name() || first == keywords::SelfValue.to_name() {
+            if first == keywords::Super.ident.name || first == keywords::SelfValue.ident.name {
                 self.session.add_lint(
                     lint::builtin::SUPER_OR_SELF_IN_GLOBAL_PATH, id, path.span,
                     format!("expected identifier, found keyword `{}`", first)