-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #124811 - matthiaskrgr:rollup-4zpov13, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #124520 (Document that `create_dir_all` calls `mkdir`/`CreateDirW` multiple times) - #124724 (Prefer lower vtable candidates in select in new solver) - #124771 (Don't consider candidates with no failing where clauses when refining obligation causes in new solver) - #124808 (Use `super_fold` in `RegionsToStatic` visitor) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
12 changed files
with
137 additions
and
15 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
8 changes: 8 additions & 0 deletions
8
tests/ui/traits/next-solver/canonical/const-region-infer-to-static-in-binder.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,8 @@ | ||
//@ compile-flags: -Znext-solver=coherence | ||
|
||
#[derive(Debug)] | ||
struct X<const FN: fn() = { || {} }>; | ||
//~^ ERROR using function pointers as const generic parameters is forbidden | ||
//~| ERROR using function pointers as const generic parameters is forbidden | ||
|
||
fn main() {} |
19 changes: 19 additions & 0 deletions
19
tests/ui/traits/next-solver/canonical/const-region-infer-to-static-in-binder.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,19 @@ | ||
error: using function pointers as const generic parameters is forbidden | ||
--> $DIR/const-region-infer-to-static-in-binder.rs:4:20 | ||
| | ||
LL | struct X<const FN: fn() = { || {} }>; | ||
| ^^^^ | ||
| | ||
= note: the only supported types are integers, `bool` and `char` | ||
|
||
error: using function pointers as const generic parameters is forbidden | ||
--> $DIR/const-region-infer-to-static-in-binder.rs:4:20 | ||
| | ||
LL | struct X<const FN: fn() = { || {} }>; | ||
| ^^^^ | ||
| | ||
= note: the only supported types are integers, `bool` and `char` | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error: aborting due to 2 previous errors | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
tests/ui/traits/next-solver/diagnostics/where-clause-doesnt-apply.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,22 @@ | ||
trait Foo {} | ||
trait Bar {} | ||
|
||
impl<T> Foo for T where T: Bar {} | ||
fn needs_foo(_: impl Foo) {} | ||
|
||
trait Mirror { | ||
type Mirror; | ||
} | ||
impl<T> Mirror for T { | ||
type Mirror = T; | ||
} | ||
|
||
// Make sure the `Alias: Foo` bound doesn't "shadow" the impl, since the | ||
// impl is really the only candidate we care about here for the purpose | ||
// of error reporting. | ||
fn hello<T>() where <T as Mirror>::Mirror: Foo { | ||
needs_foo(()); | ||
//~^ ERROR the trait bound `(): Foo` is not satisfied | ||
} | ||
|
||
fn main() {} |
22 changes: 22 additions & 0 deletions
22
tests/ui/traits/next-solver/diagnostics/where-clause-doesnt-apply.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,22 @@ | ||
error[E0277]: the trait bound `(): Foo` is not satisfied | ||
--> $DIR/where-clause-doesnt-apply.rs:18:15 | ||
| | ||
LL | needs_foo(()); | ||
| --------- ^^ the trait `Bar` is not implemented for `()`, which is required by `(): Foo` | ||
| | | ||
| required by a bound introduced by this call | ||
| | ||
note: required for `()` to implement `Foo` | ||
--> $DIR/where-clause-doesnt-apply.rs:4:9 | ||
| | ||
LL | impl<T> Foo for T where T: Bar {} | ||
| ^^^ ^ --- unsatisfied trait bound introduced here | ||
note: required by a bound in `needs_foo` | ||
--> $DIR/where-clause-doesnt-apply.rs:5:22 | ||
| | ||
LL | fn needs_foo(_: impl Foo) {} | ||
| ^^^ required by this bound in `needs_foo` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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