-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #113006 - GuillaumeGomez:rollup-l2js0wa, r=GuillaumeGomez
Rollup of 8 pull requests Successful merges: - #112703 ([-Ztrait-solver=next, mir-typeck] instantiate hidden types in the root universe) - #112854 (fix: add cfg diagnostic for unresolved import error) - #112912 (style-guide: Rewrite let-else section for clarity, without changing formatting) - #112915 (Update runtests.py : grammar correction) - #112971 (issue template: add clippy entry which points to the clippy repo) - #112989 (Add a regression test for #109141) - #113002 (bootstrap: Backup `settings.json` to the correct filename) - #113003 (Fix old python deprecation check in x.py) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
15 changed files
with
313 additions
and
53 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
13 changes: 13 additions & 0 deletions
13
tests/ui/const-generics/generic_const_exprs/issue-109141.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,13 @@ | ||
#![feature(generic_const_exprs)] | ||
#![allow(incomplete_features)] | ||
|
||
impl EntriesBuffer { | ||
fn a(&self) -> impl Iterator { | ||
self.0.iter_mut() //~ ERROR: cannot borrow `*self.0` as mutable, as it is behind a `&` reference | ||
} | ||
} | ||
|
||
struct EntriesBuffer(Box<[[u8; HashesEntryLEN]; 5]>); | ||
//~^ ERROR: cannot find value `HashesEntryLEN` in this scope | ||
|
||
fn main() {} |
26 changes: 26 additions & 0 deletions
26
tests/ui/const-generics/generic_const_exprs/issue-109141.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,26 @@ | ||
error[E0425]: cannot find value `HashesEntryLEN` in this scope | ||
--> $DIR/issue-109141.rs:10:32 | ||
| | ||
LL | struct EntriesBuffer(Box<[[u8; HashesEntryLEN]; 5]>); | ||
| ^^^^^^^^^^^^^^ not found in this scope | ||
| | ||
help: you might be missing a const parameter | ||
| | ||
LL | struct EntriesBuffer<const HashesEntryLEN: /* Type */>(Box<[[u8; HashesEntryLEN]; 5]>); | ||
| ++++++++++++++++++++++++++++++++++ | ||
|
||
error[E0596]: cannot borrow `*self.0` as mutable, as it is behind a `&` reference | ||
--> $DIR/issue-109141.rs:6:9 | ||
| | ||
LL | self.0.iter_mut() | ||
| ^^^^^^^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable | ||
| | ||
help: consider changing this to be a mutable reference | ||
| | ||
LL | fn a(&mut self) -> impl Iterator { | ||
| ~~~~~~~~~ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0425, E0596. | ||
For more information about an error, try `rustc --explain E0425`. |
17 changes: 17 additions & 0 deletions
17
tests/ui/traits/new-solver/member-constraints-in-root-universe.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,17 @@ | ||
// compile-flags: -Ztrait-solver=next | ||
// check-pass | ||
|
||
trait Trait { | ||
type Ty; | ||
} | ||
|
||
impl Trait for for<'a> fn(&'a u8, &'a u8) { | ||
type Ty = (); | ||
} | ||
|
||
// argument is necessary to create universes before registering the hidden type. | ||
fn test<'a>(_: <fn(&u8, &u8) as Trait>::Ty) -> impl Sized { | ||
"hidden type is `&'?0 str` with '?0 member of ['static,]" | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.