From 30b5be0e9530a4de106b581074c3707e6a938329 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 20 Feb 2018 14:52:23 +0100 Subject: [PATCH] update compile-fail tests; remove now redundant issue-39122.rs It is subsumed by ui/param-bounds-ignored.rs. --- src/test/compile-fail/dst-bad-assign-3.rs | 3 +-- src/test/compile-fail/issue-17994.rs | 2 +- src/test/compile-fail/issue-23046.rs | 2 ++ src/test/compile-fail/issue-39122.rs | 13 ------------- src/test/compile-fail/private-in-public-warn.rs | 4 ++-- src/test/compile-fail/rfc1623.rs | 2 +- 6 files changed, 7 insertions(+), 19 deletions(-) delete mode 100644 src/test/compile-fail/issue-39122.rs diff --git a/src/test/compile-fail/dst-bad-assign-3.rs b/src/test/compile-fail/dst-bad-assign-3.rs index 759da7b2bde21..ceaa371623223 100644 --- a/src/test/compile-fail/dst-bad-assign-3.rs +++ b/src/test/compile-fail/dst-bad-assign-3.rs @@ -12,8 +12,7 @@ #![feature(unsized_tuple_coercion)] -type Fat = (isize, &'static str, T); -//~^ WARNING bounds are ignored +type Fat = (isize, &'static str, T); #[derive(PartialEq,Eq)] struct Bar; diff --git a/src/test/compile-fail/issue-17994.rs b/src/test/compile-fail/issue-17994.rs index ac15bd9d15b04..0f30e2461cf3b 100644 --- a/src/test/compile-fail/issue-17994.rs +++ b/src/test/compile-fail/issue-17994.rs @@ -10,5 +10,5 @@ trait Tr {} type Huh where T: Tr = isize; //~ ERROR type parameter `T` is unused - //~| WARNING E0122 + //~| WARNING where clauses are ignored in type aliases fn main() {} diff --git a/src/test/compile-fail/issue-23046.rs b/src/test/compile-fail/issue-23046.rs index 129f7c8b1ea0e..6ce0887869335 100644 --- a/src/test/compile-fail/issue-23046.rs +++ b/src/test/compile-fail/issue-23046.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(ignored_generic_bounds)] + pub enum Expr<'var, VAR> { Let(Box>, Box Fn(Expr<'v, VAR>) -> Expr<'v, VAR> + 'var>) diff --git a/src/test/compile-fail/issue-39122.rs b/src/test/compile-fail/issue-39122.rs deleted file mode 100644 index 2e8a740f89394..0000000000000 --- a/src/test/compile-fail/issue-39122.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -type Foo = T; //~ WARNING E0122 - -type Bar where T: std::ops::Add = T; //~ WARNING E0122 diff --git a/src/test/compile-fail/private-in-public-warn.rs b/src/test/compile-fail/private-in-public-warn.rs index aa91ce27c379a..4be01dbd677f0 100644 --- a/src/test/compile-fail/private-in-public-warn.rs +++ b/src/test/compile-fail/private-in-public-warn.rs @@ -58,7 +58,7 @@ mod traits { pub trait PubTr {} pub type Alias = T; //~ ERROR private trait `traits::PrivTr` in public interface - //~^ WARN bounds are ignored in type aliases + //~^ WARNING bounds on generic type parameters are ignored //~| WARNING hard error pub trait Tr1: PrivTr {} //~ ERROR private trait `traits::PrivTr` in public interface //~^ WARNING hard error @@ -85,7 +85,7 @@ mod traits_where { pub type Alias where T: PrivTr = T; //~^ ERROR private trait `traits_where::PrivTr` in public interface //~| WARNING hard error - //~| WARNING E0122 + //~| WARNING where clauses are ignored in type aliases pub trait Tr2 where T: PrivTr {} //~^ ERROR private trait `traits_where::PrivTr` in public interface //~| WARNING hard error diff --git a/src/test/compile-fail/rfc1623.rs b/src/test/compile-fail/rfc1623.rs index e8295e5e2da08..579fa378a1c24 100644 --- a/src/test/compile-fail/rfc1623.rs +++ b/src/test/compile-fail/rfc1623.rs @@ -22,7 +22,7 @@ static NON_ELIDABLE_FN: &fn(&u8, &u8) -> &u8 = struct SomeStruct<'x, 'y, 'z: 'x> { foo: &'x Foo<'z>, bar: &'x Bar<'z>, - f: &'y for<'a, 'b: 'a> Fn(&'a Foo<'b>) -> &'a Bar<'b>, + f: &'y for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Bar<'b>, } fn id(t: T) -> T {