fixes
This commit is contained in:
parent
6c883840e6
commit
238e4ee104
@ -192,7 +192,11 @@ macro_rules! add_lint_group {
|
|||||||
},
|
},
|
||||||
FutureIncompatibleInfo {
|
FutureIncompatibleInfo {
|
||||||
id: LintId::of(UNSIZED_IN_TUPLE),
|
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>",
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -865,6 +865,7 @@ fn clean(&self, cx: &DocContext) -> WherePredicate {
|
|||||||
Predicate::WellFormed(_) => panic!("not user writable"),
|
Predicate::WellFormed(_) => panic!("not user writable"),
|
||||||
Predicate::ObjectSafe(_) => panic!("not user writable"),
|
Predicate::ObjectSafe(_) => panic!("not user writable"),
|
||||||
Predicate::ClosureKind(..) => panic!("not user writable"),
|
Predicate::ClosureKind(..) => panic!("not user writable"),
|
||||||
|
Predicate::Rfc1592(..) => panic!("not user writable"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ fn f<T: Array>(x: &T) {
|
|||||||
let _ = x
|
let _ = x
|
||||||
//~^ ERROR `Array` cannot be made into an object
|
//~^ ERROR `Array` cannot be made into an object
|
||||||
//~| NOTE the trait cannot require that `Self : Sized`
|
//~| NOTE the trait cannot require that `Self : Sized`
|
||||||
|
//~| NOTE requirements on the impl of `std::ops::CoerceUnsized<&Array>`
|
||||||
as
|
as
|
||||||
&Array;
|
&Array;
|
||||||
//~^ ERROR `Array` cannot be made into an object
|
//~^ ERROR `Array` cannot be made into an object
|
||||||
|
@ -10,10 +10,9 @@
|
|||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
trait Foo {
|
#[deny(warnings)] trait Foo { fn foo(&self) -> (Self, Self); }
|
||||||
fn foo(&self) -> (Self, Self);
|
//~^ ERROR the trait bound `Self: std::marker::Sized` is not satisfied
|
||||||
//~^ WARNING hard error
|
//~| WARNING hard error
|
||||||
}
|
|
||||||
|
|
||||||
impl<T: Copy> Foo for T {
|
impl<T: Copy> Foo for T {
|
||||||
fn foo(&self) -> (Self, Self) {
|
fn foo(&self) -> (Self, Self) {
|
||||||
@ -21,11 +20,13 @@ fn foo(&self) -> (Self, Self) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[deny(warnings)]
|
||||||
fn main() {
|
fn main() {
|
||||||
assert_eq!((11).foo(), (11, 11));
|
assert_eq!((11).foo(), (11, 11));
|
||||||
|
|
||||||
let junk: Box<fmt::Debug+Sized> = Box::new(42);
|
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);
|
let f = format!("{:?}", junk);
|
||||||
assert_eq!(f, "42");
|
assert_eq!(f, "42");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user