]> git.proxmox.com Git - rustc.git/blame - src/test/compile-fail/coherence-overlap-all-t-and-tuple.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / compile-fail / coherence-overlap-all-t-and-tuple.rs
CommitLineData
1a4d82fc 1// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
223e47cc
LB
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
9346a6ac
AL
11// Check that we detect an overlap here in the case where:
12//
13// for some type X:
14// T = (X,)
15// T11 = X, U11 = X
16//
17// Seems pretty basic, but then there was issue #24241. :)
c34b1796 18
9346a6ac 19trait From<U> {
c34b1796
AL
20}
21
54a0048b 22impl <T> From<T> for T {
9346a6ac 23}
c34b1796 24
54a0048b 25impl <T11, U11> From<(U11,)> for (T11,) { //~ ERROR E0119
223e47cc 26}
9346a6ac
AL
27
28fn main() { }