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#109986 - JohnTitor:rollup-3aax38t, r=JohnTitor
Rollup of 7 pull requests Successful merges: - rust-lang#109909 (Deny `use`ing tool paths) - rust-lang#109921 (Don't ICE when encountering `dyn*` in statics or consts) - rust-lang#109922 (Disable `has_thread_local` on OpenHarmony) - rust-lang#109926 (write threads info into log only when debugging) - rust-lang#109968 (Add regression test for rust-lang#80409) - rust-lang#109969 (Add regression test for rust-lang#86351) - rust-lang#109973 (rustdoc: Improve logo display very small screen) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
17 changed files
with
135 additions
and
16 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
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 @@ | ||
// compile-flags: --crate-type=lib -Zmir-opt-level=2 | ||
// build-pass | ||
// ^-- Must be build-pass, because check-pass will not run const prop. | ||
|
||
pub trait TestTrait { | ||
type MyType; | ||
fn func() -> Option<Self> | ||
where | ||
Self: Sized; | ||
} | ||
|
||
impl<T> dyn TestTrait<MyType = T> | ||
where | ||
Self: Sized, | ||
{ | ||
pub fn other_func() -> Option<Self> { | ||
match Self::func() { | ||
Some(me) => Some(me), | ||
None => None, | ||
} | ||
} | ||
} |
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,10 @@ | ||
// check-pass | ||
|
||
#![feature(dyn_star)] | ||
//~^ WARN the feature `dyn_star` is incomplete | ||
|
||
const C: dyn* Send + Sync = &(); | ||
|
||
static S: dyn* Send + Sync = &(); | ||
|
||
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,11 @@ | ||
warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/const-and-static.rs:3:12 | ||
| | ||
LL | #![feature(dyn_star)] | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
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,36 @@ | ||
// check-pass | ||
|
||
#![allow(unreachable_code, unused)] | ||
|
||
use std::marker::PhantomData; | ||
|
||
struct FsmBuilder<TFsm> { | ||
_fsm: PhantomData<TFsm>, | ||
} | ||
|
||
impl<TFsm> FsmBuilder<TFsm> { | ||
fn state(&mut self) -> FsmStateBuilder<TFsm> { | ||
todo!() | ||
} | ||
} | ||
|
||
struct FsmStateBuilder<TFsm> { | ||
_state: PhantomData<TFsm>, | ||
} | ||
|
||
impl<TFsm> FsmStateBuilder<TFsm> { | ||
fn on_entry<TAction: Fn(&mut StateContext<'_, TFsm>)>(&self, _action: TAction) {} | ||
} | ||
|
||
trait Fsm { | ||
type Context; | ||
} | ||
|
||
struct StateContext<'a, TFsm: Fsm> { | ||
context: &'a mut TFsm::Context, | ||
} | ||
|
||
fn main() { | ||
let mut builder: FsmBuilder<usize> = todo!(); | ||
builder.state().on_entry(|_| {}); | ||
} |
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,8 @@ | ||
// edition: 2018 | ||
|
||
use clippy::time::Instant; | ||
//~^ `clippy` is a tool module | ||
|
||
fn main() { | ||
Instant::now(); | ||
} |
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,9 @@ | ||
error[E0433]: failed to resolve: `clippy` is a tool module, not a module | ||
--> $DIR/tool-import.rs:3:5 | ||
| | ||
LL | use clippy::time::Instant; | ||
| ^^^^^^ `clippy` is a tool module, not a module | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0433`. |