about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorChristopher Vittal <christopher.vittal@gmail.com>2017-11-10 12:47:33 -0500
committerChristopher Vittal <christopher.vittal@gmail.com>2017-11-15 15:46:01 -0500
commit109f2dd36b38d0642246ad50101bba21f5c0fba9 (patch)
treea5d5704dab57dea70cf32c8cd01a7ce65e444f50 /src/rustllvm/RustWrapper.cpp
parentf225fe43f14a8a3887aca558f20c7d7e990b591e (diff)
downloadrust-109f2dd36b38d0642246ad50101bba21f5c0fba9.tar.gz
rust-109f2dd36b38d0642246ad50101bba21f5c0fba9.zip
Add new error comparision to hide desugaring
First some background:
To the compiler, the following two signatures in the trait vs the impl
are the same.

```rust
trait Foo {
    fn foo(&self, &impl Debug);
}
impl Foo for () {
    fn foo<U: Debug>(&self, x: &U) { ... }
}
```

We do not want to allow this, and so we add a new error and check.

The check just tests that all paramters 'syntheticness' match up. As
during collection, the impl Trait parameters are transformed into
anonymous synthetic generics.

Furthermore, causes a check for unused type parameters to be skipped in
check_bounds_are_used if there is already a TyError. Thus, an unused
input will not trigger `type parameter unused` errors.

Update the one test that checked for this error in the case of
a TyError.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions