From 238e4ee104179c5a6beb5bb25ffe28a3fd77bff5 Mon Sep 17 00:00:00 2001 From: Ariel Ben-Yehuda Date: Mon, 2 May 2016 17:18:05 +0300 Subject: [PATCH] fixes --- src/librustc_lint/lib.rs | 6 +++++- src/librustdoc/clean/mod.rs | 1 + src/test/compile-fail/issue-20692.rs | 1 + src/test/compile-fail/rfc1592-deprecated.rs | 11 ++++++----- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 4832f18f2132..e0abe1aebd28 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -192,7 +192,11 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) { }, FutureIncompatibleInfo { id: LintId::of(UNSIZED_IN_TUPLE), - reference: "RFC PR 1592 ", + reference: "issue #33242 ", + }, + FutureIncompatibleInfo { + id: LintId::of(OBJECT_UNSAFE_FRAGMENT), + reference: "issue #33243 ", } ]); diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 35922c477cce..6895bceeb008 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -865,6 +865,7 @@ impl<'a> Clean for ty::Predicate<'a> { Predicate::WellFormed(_) => panic!("not user writable"), Predicate::ObjectSafe(_) => panic!("not user writable"), Predicate::ClosureKind(..) => panic!("not user writable"), + Predicate::Rfc1592(..) => panic!("not user writable"), } } } diff --git a/src/test/compile-fail/issue-20692.rs b/src/test/compile-fail/issue-20692.rs index 62d775adac3c..1c9e588cb2cd 100644 --- a/src/test/compile-fail/issue-20692.rs +++ b/src/test/compile-fail/issue-20692.rs @@ -14,6 +14,7 @@ fn f(x: &T) { let _ = x //~^ ERROR `Array` cannot be made into an object //~| NOTE the trait cannot require that `Self : Sized` + //~| NOTE requirements on the impl of `std::ops::CoerceUnsized<&Array>` as &Array; //~^ ERROR `Array` cannot be made into an object diff --git a/src/test/compile-fail/rfc1592-deprecated.rs b/src/test/compile-fail/rfc1592-deprecated.rs index 0c12c1c44440..e766f977200c 100644 --- a/src/test/compile-fail/rfc1592-deprecated.rs +++ b/src/test/compile-fail/rfc1592-deprecated.rs @@ -10,10 +10,9 @@ use std::fmt; -trait Foo { - fn foo(&self) -> (Self, Self); - //~^ WARNING hard error -} +#[deny(warnings)] trait Foo { fn foo(&self) -> (Self, Self); } +//~^ ERROR the trait bound `Self: std::marker::Sized` is not satisfied +//~| WARNING hard error impl Foo for T { fn foo(&self) -> (Self, Self) { @@ -21,11 +20,13 @@ impl Foo for T { } } +#[deny(warnings)] fn main() { assert_eq!((11).foo(), (11, 11)); let junk: Box = Box::new(42); - //~^ WARNING hard error + //~^ ERROR the trait cannot require that `Self : Sized` + //~| WARNING hard error let f = format!("{:?}", junk); assert_eq!(f, "42"); }