-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #99133 - matthiaskrgr:rollup-eignphd, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #98713 (promote placeholder bounds to 'static obligations) - #99094 (Remove extra space in AtomicPtr::new docs) - #99095 (Remove duplicate notes from error on inter-crate ambiguous impl of traits) - #99114 (Group .test-arrow CSS rules and fix rgb/rgba property) - #99128 (Fix `download-ci-llvm` NixOS patching for binaries) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
16 changed files
with
136 additions
and
29 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
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
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
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
19 changes: 19 additions & 0 deletions
19
src/test/ui/coherence/inter-crate-ambiguity-causes-notes.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
struct S; | ||
|
||
impl From<()> for S { | ||
fn from(x: ()) -> Self { | ||
S | ||
} | ||
} | ||
|
||
impl<I> From<I> for S | ||
//~^ ERROR conflicting implementations of trait | ||
where | ||
I: Iterator<Item = ()>, | ||
{ | ||
fn from(x: I) -> Self { | ||
S | ||
} | ||
} | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
src/test/ui/coherence/inter-crate-ambiguity-causes-notes.stderr
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,14 @@ | ||
error[E0119]: conflicting implementations of trait `std::convert::From<()>` for type `S` | ||
--> $DIR/inter-crate-ambiguity-causes-notes.rs:9:1 | ||
| | ||
LL | impl From<()> for S { | ||
| ------------------- first implementation here | ||
... | ||
LL | impl<I> From<I> for S | ||
| ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `S` | ||
| | ||
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0119`. |
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,21 @@ | ||
// Regression test for #98693. | ||
// | ||
// The closure encounters an obligation that `T` must outlive `!U1`, | ||
// a placeholder from universe U1. We were ignoring this placeholder | ||
// when promoting the constraint to the enclosing function, and | ||
// thus incorrectly judging the closure to be safe. | ||
|
||
fn assert_static<T>() | ||
where | ||
for<'a> T: 'a, | ||
{ | ||
} | ||
|
||
fn test<T>() { | ||
|| { | ||
//~^ ERROR the parameter type `T` may not live long enough | ||
assert_static::<T>(); | ||
}; | ||
} | ||
|
||
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,17 @@ | ||
error[E0310]: the parameter type `T` may not live long enough | ||
--> $DIR/issue-98693.rs:15:5 | ||
| | ||
LL | / || { | ||
LL | | | ||
LL | | assert_static::<T>(); | ||
LL | | }; | ||
| |_____^ ...so that the type `T` will meet its required lifetime bounds | ||
| | ||
help: consider adding an explicit lifetime bound... | ||
| | ||
LL | fn test<T: 'static>() { | ||
| +++++++++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0310`. |