forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#106923 - mejrs:fluent_err, r=davidtwco
Restore behavior when primary bundle is missing Fixes rust-lang#106755 by restoring some of the behavior prior to rust-lang#106427 Still, I have no idea how this debug assertion can even hit while using `en-US` as primary bundle. r? ``@davidtwco``
- Loading branch information
Showing
4 changed files
with
59 additions
and
6 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
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,19 @@ | ||
// compile-flags:-Ztranslate-lang=en_US | ||
|
||
#![feature(negative_impls)] | ||
#![feature(marker_trait_attr)] | ||
|
||
#[marker] | ||
trait MyTrait {} | ||
|
||
struct TestType<T>(::std::marker::PhantomData<T>); | ||
|
||
unsafe impl<T: MyTrait + 'static> Send for TestType<T> {} | ||
|
||
impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and negative implementation | ||
|
||
unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations | ||
|
||
impl !Send for TestType<i32> {} | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
error[E0751]: found both positive and negative implementation of trait `Send` for type `TestType<_>`: | ||
--> $DIR/issue-106755.rs:13:1 | ||
| | ||
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {} | ||
| ------------------------------------------------------ positive implementation here | ||
LL | | ||
LL | impl<T: MyTrait> !Send for TestType<T> {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here | ||
|
||
error[E0119]: conflicting implementations of trait `Send` for type `TestType<_>` | ||
--> $DIR/issue-106755.rs:15:1 | ||
| | ||
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {} | ||
| ------------------------------------------------------ first implementation here | ||
... | ||
LL | unsafe impl<T: 'static> Send for TestType<T> {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0119, E0751. | ||
For more information about an error, try `rustc --explain E0119`. |