Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arielb1 committed May 4, 2016
1 parent 6c88384 commit 238e4ee
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/rust-lang/rfcs/pull/1592>",
reference: "issue #33242 <https://github.com/rust-lang/rust/issues/33242>",
},
FutureIncompatibleInfo {
id: LintId::of(OBJECT_UNSAFE_FRAGMENT),
reference: "issue #33243 <https://github.com/rust-lang/rust/issues/33243>",
}
]);

Expand Down
1 change: 1 addition & 0 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,7 @@ impl<'a> Clean<WherePredicate> 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"),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-20692.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fn f<T: Array>(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
Expand Down
11 changes: 6 additions & 5 deletions src/test/compile-fail/rfc1592-deprecated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@

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<T: Copy> Foo for T {
fn foo(&self) -> (Self, Self) {
(*self, *self)
}
}

#[deny(warnings)]
fn main() {
assert_eq!((11).foo(), (11, 11));

let junk: Box<fmt::Debug+Sized> = 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");
}

0 comments on commit 238e4ee

Please sign in to comment.