]> git.lizzy.rs Git - rust.git/commit
Simplify PatIdent to contain an Ident rather than a Path
authorJohn Clements <clements@racket-lang.org>
Tue, 1 Jul 2014 01:02:14 +0000 (18:02 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 3 Jul 2014 19:54:51 +0000 (12:54 -0700)
commite38cb972dcfc0fdab44270257eac3405a39bd996
treef45affb2ba2b0e35e03f102755103f93063ac9e5
parentcff79ab5633f0900eb71a53ccb924632f7b1090c
Simplify PatIdent to contain an Ident rather than a Path

Rationale: for what appear to be historical reasons only, the PatIdent contains
a Path rather than an Ident.  This means that there are many places in the code
where an ident is artificially promoted to a path, and---much more problematically---
a bunch of elements from a path are simply thrown away, which seems like an invitation
to some really nasty bugs.

This commit replaces the Path in a PatIdent with a SpannedIdent, which just contains an ident
and a span.
26 files changed:
src/librustc/lint/builtin.rs
src/librustc/metadata/encoder.rs
src/librustc/middle/borrowck/gather_loans/gather_moves.rs
src/librustc/middle/borrowck/gather_loans/move_error.rs
src/librustc/middle/dead.rs
src/librustc/middle/kind.rs
src/librustc/middle/liveness.rs
src/librustc/middle/pat_util.rs
src/librustc/middle/resolve.rs
src/librustc/middle/save/mod.rs
src/librustc/middle/trans/_match.rs
src/librustc/middle/trans/debuginfo.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/mod.rs
src/librustdoc/clean/mod.rs
src/libsyntax/ast.rs
src/libsyntax/ast_util.rs
src/libsyntax/ext/build.rs
src/libsyntax/ext/deriving/generic/mod.rs
src/libsyntax/ext/expand.rs
src/libsyntax/fold.rs
src/libsyntax/parse/mod.rs
src/libsyntax/parse/parser.rs
src/libsyntax/print/pprust.rs
src/libsyntax/visit.rs