better error for rustc_strict_coherence misuse
This commit is contained in:
parent
5ab74459b8
commit
953727f574
5 changed files with 45 additions and 2 deletions
|
|
@ -0,0 +1,7 @@
|
|||
#![feature(rustc_attrs)]
|
||||
|
||||
#[rustc_strict_coherence]
|
||||
trait Foo {}
|
||||
//~^ ERROR to use `strict_coherence` on this trait, the `with_negative_coherence` feature must be enabled
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
error: to use `strict_coherence` on this trait, the `with_negative_coherence` feature must be enabled
|
||||
--> $DIR/strict-coherence-needs-negative-coherence.rs:4:1
|
||||
|
|
||||
LL | #[rustc_strict_coherence]
|
||||
| ------------------------- due to this attribute
|
||||
LL | trait Foo {}
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue