Skip to content

Commit

Permalink
label-to-label comparisons can remain hygienic, at least.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Apr 10, 2015
1 parent 61845dd commit fdb8414
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc/middle/resolve_lifetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ fn extract_labels<'v, 'a>(ctxt: &mut LifetimeContext<'a>, b: &'v ast::Block) {
fn visit_expr(&mut self, ex: &'v ast::Expr) {
if let Some(label) = expression_label(ex) {
for &(prior, prior_span) in &self.labels_in_fn[..] {
// FIXME (#24278): non-hygienic comparision
if label.name == prior.name {
if label == prior {
signal_shadowing_error(self.sess,
label.name,
original_label(prior_span),
Expand Down

0 comments on commit fdb8414

Please sign in to comment.