Warn about more ignored bounds on type aliases

This commit is contained in:
Ralf Jung 2018-02-05 21:20:57 +01:00
parent c83dd03062
commit 2aae22746e
5 changed files with 68 additions and 22 deletions

View file

@ -13,7 +13,7 @@
#![feature(unsized_tuple_coercion)]
type Fat<T: ?Sized> = (isize, &'static str, T);
//~^ WARNING trait bounds are not (yet) enforced
//~^ WARNING bounds are ignored
#[derive(PartialEq,Eq)]
struct Bar;

View file

@ -58,7 +58,7 @@ mod traits {
pub trait PubTr {}
pub type Alias<T: PrivTr> = T; //~ ERROR private trait `traits::PrivTr` in public interface
//~^ WARN trait bounds are not (yet) enforced in type definitions
//~^ WARN bounds are ignored in type aliases
//~| WARNING hard error
pub trait Tr1: PrivTr {} //~ ERROR private trait `traits::PrivTr` in public interface
//~^ WARNING hard error