Skip to content

Commit 428c58b

Browse files
committed
Forbid duplicate supertraits
I actually already pushed most of this by accident before I meant to, but r=nmatsakis anyway. Closes #3953
1 parent 5005be6 commit 428c58b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/typeck/collect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ fn ensure_supertraits(ccx: @crate_ctxt,
264264
for trait_refs.each |trait_ref| {
265265
let (did, tpt) = instantiate_trait_ref(ccx, *trait_ref, rp);
266266
if instantiated.any(|other_trait: &InstantiatedTraitRef|
267-
{ (*other_trait).def_id == did }) {
267+
{ other_trait.def_id == did }) {
268268
// This means a trait inherited from the same supertrait more
269269
// than once.
270270
tcx.sess.span_err(sp, ~"Duplicate supertrait in trait \

0 commit comments

Comments
 (0)