Skip to content

Commit

Permalink
Auto merge of #36304 - TimNN:fix-36299, r=eddyb
Browse files Browse the repository at this point in the history
re-add accidentally removed line in wfcheck

Fixes #36299, introduced in #36119.

r? @eddyb
  • Loading branch information
bors authored Sep 7, 2016
2 parents f707582 + d8c58d4 commit cf0cdc4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/librustc_typeck/check/wfcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ impl<'ccx, 'gcx> CheckTypeWellFormedVisitor<'ccx, 'gcx> {
(ast_generics.lifetimes[index].lifetime.span,
ast_generics.lifetimes[index].lifetime.name)
} else {
let index = index - ast_generics.lifetimes.len();
(ast_generics.ty_params[index].span,
ast_generics.ty_params[index].name)
};
Expand Down
15 changes: 15 additions & 0 deletions src/test/compile-fail/issue-36299.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

struct Foo<'a, A> {}
//~^ ERROR parameter `'a` is never used
//~| ERROR parameter `A` is never used

fn main() {}

0 comments on commit cf0cdc4

Please sign in to comment.