Skip to content

Commit

Permalink
inverting speculative flag
Browse files Browse the repository at this point in the history
  • Loading branch information
F001 committed May 23, 2018
1 parent f837c34 commit 88f810f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
}
tcx.check_stability(assoc_ty.def_id, Some(ref_id), binding.span);

if speculative {
if !speculative {
dup_bindings.entry(assoc_ty.def_id)
.and_modify(|prev_span| {
let mut err = self.tcx().struct_span_lint_node(
Expand Down
11 changes: 11 additions & 0 deletions src/test/ui/lint/issue-50589-multiple-associated-types.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ LL | fn test() -> Box<Iterator<Item = (), Item = Unit>> {
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50589 <https://github.com/rust-lang/rust/issues/50589>

warning: associated type binding `Item` specified more than once
--> $DIR/issue-50589-multiple-associated-types.rs:17:39
|
LL | fn test() -> Box<Iterator<Item = (), Item = Unit>> {
| --------- ^^^^^^^^^^^ used more than once
| |
| first use of `Item`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50589 <https://github.com/rust-lang/rust/issues/50589>

0 comments on commit 88f810f

Please sign in to comment.