Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly check regions on negative overlap check
- Loading branch information
1 parent
b61e1bb
commit 3fd89a6
Showing
7 changed files
with
59 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#![crate_type = "lib"] | ||
#![feature(negative_impls)] | ||
#![feature(with_negative_coherence)] | ||
|
||
pub trait Error {} | ||
impl !Error for &str {} |
2 changes: 1 addition & 1 deletion
2
src/test/ui/coherence/coherence-overlap-negate-use-feature-gate.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// check-pass | ||
|
||
#![feature(negative_impls)] | ||
#![feature(with_negative_coherence)] | ||
|
||
use std::ops::DerefMut; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// check-pass | ||
|
||
#![feature(negative_impls)] | ||
#![feature(rustc_attrs)] | ||
#![feature(with_negative_coherence)] | ||
|
||
#[rustc_strict_coherence] | ||
trait Foo {} | ||
impl<T> !Foo for &T where T: 'static {} | ||
|
||
#[rustc_strict_coherence] | ||
trait Bar {} | ||
impl<T: Foo> Bar for T {} | ||
impl<T> Bar for &T where T: 'static {} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#![feature(negative_impls)] | ||
#![feature(with_negative_coherence)] | ||
|
||
pub trait ForeignTrait {} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters