Warn about more ignored bounds on type aliases
This commit is contained in:
parent
c83dd03062
commit
2aae22746e
5 changed files with 68 additions and 22 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue