forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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 rust-lang#103672 - matthiaskrgr:rollup-dyk3civ, r=matth…
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#103585 (Migrate source line numbers CSS to CSS variables) - rust-lang#103608 (Remap early bound lifetimes in return-position `impl Trait` in traits too) - rust-lang#103609 (Emit a nicer error on `impl Self {`) - rust-lang#103631 (Add test for issue 36007) - rust-lang#103643 (rustdoc: stop hiding focus outlines on non-rustdoc-toggle details tags) - rust-lang#103645 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
17 changed files
with
181 additions
and
114 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
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,20 @@ | ||
// check-pass | ||
#![feature(coerce_unsized, unsize)] | ||
|
||
use std::marker::Unsize; | ||
use std::ops::CoerceUnsized; | ||
|
||
struct Foo<T: ?Sized>(Box<T>); | ||
|
||
impl<T> CoerceUnsized<Foo<dyn Baz>> for Foo<T> where T: Unsize<dyn Baz> {} | ||
|
||
struct Bar; | ||
|
||
trait Baz {} | ||
|
||
impl Baz for Bar {} | ||
|
||
fn main() { | ||
let foo = Foo(Box::new(Bar)); | ||
let foobar: Foo<Bar> = foo; | ||
} |
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,23 @@ | ||
// check-pass | ||
// edition:2021 | ||
|
||
#![feature(async_fn_in_trait, return_position_impl_trait_in_trait)] | ||
#![allow(incomplete_features)] | ||
|
||
pub trait Foo { | ||
async fn bar<'a: 'a>(&'a mut self); | ||
} | ||
|
||
impl Foo for () { | ||
async fn bar<'a: 'a>(&'a mut self) {} | ||
} | ||
|
||
pub trait Foo2 { | ||
fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a; | ||
} | ||
|
||
impl Foo2 for () { | ||
fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a {} | ||
} | ||
|
||
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
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,22 +1,10 @@ | ||
error[E0391]: cycle detected when computing type of `<impl at $DIR/issue-23305.rs:5:1: 5:21>` | ||
error: `Self` is not valid in the self type of an impl block | ||
--> $DIR/issue-23305.rs:5:16 | ||
| | ||
LL | impl dyn ToNbt<Self> {} | ||
| ^^^^ | ||
| | ||
= note: ...which immediately requires computing type of `<impl at $DIR/issue-23305.rs:5:1: 5:21>` again | ||
note: cycle used when collecting item types in top-level module | ||
--> $DIR/issue-23305.rs:1:1 | ||
| | ||
LL | / pub trait ToNbt<T> { | ||
LL | | fn new(val: T) -> Self; | ||
LL | | } | ||
LL | | | ||
... | | ||
LL | | | ||
LL | | fn main() {} | ||
| |____________^ | ||
= note: replace `Self` with a different type | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0391`. |
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
Oops, something went wrong.