forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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#135609 - cuviper:beta-next, r=cuviper
[beta] backports - do not in-place-iterate over flatmap/flatten rust-lang#135104 - Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024 rust-lang#135441 - Update to LLVM 19.1.7 rust-lang#135484 r? cuviper
- Loading branch information
Showing
6 changed files
with
39 additions
and
64 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
Submodule llvm-project
updated
36 files
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,24 +1,24 @@ | ||
//@ edition: 2024 | ||
//@ check-pass | ||
|
||
#![feature(precise_capturing_in_traits)] | ||
#![deny(impl_trait_redundant_captures)] | ||
|
||
fn hello<'a>() -> impl Sized + use<'a> {} | ||
//~^ WARN all possible in-scope parameters are already captured | ||
//~^ ERROR all possible in-scope parameters are already captured | ||
|
||
struct Inherent; | ||
impl Inherent { | ||
fn inherent(&self) -> impl Sized + use<'_> {} | ||
//~^ WARN all possible in-scope parameters are already captured | ||
//~^ ERROR all possible in-scope parameters are already captured | ||
} | ||
|
||
trait Test<'a> { | ||
fn in_trait() -> impl Sized + use<'a, Self>; | ||
//~^ WARN all possible in-scope parameters are already captured | ||
//~^ ERROR all possible in-scope parameters are already captured | ||
} | ||
impl<'a> Test<'a> for () { | ||
fn in_trait() -> impl Sized + use<'a> {} | ||
//~^ WARN all possible in-scope parameters are already captured | ||
//~^ ERROR all possible in-scope parameters are already captured | ||
} | ||
|
||
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 |
---|---|---|
@@ -1,36 +1,40 @@ | ||
warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant | ||
error: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant | ||
--> $DIR/redundant.rs:6:19 | ||
| | ||
LL | fn hello<'a>() -> impl Sized + use<'a> {} | ||
| ^^^^^^^^^^^^^------- | ||
| | | ||
| help: remove the `use<...>` syntax | ||
| | ||
= note: `#[warn(impl_trait_redundant_captures)]` on by default | ||
note: the lint level is defined here | ||
--> $DIR/redundant.rs:4:9 | ||
| | ||
LL | #![deny(impl_trait_redundant_captures)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant | ||
error: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant | ||
--> $DIR/redundant.rs:11:27 | ||
| | ||
LL | fn inherent(&self) -> impl Sized + use<'_> {} | ||
| ^^^^^^^^^^^^^------- | ||
| | | ||
| help: remove the `use<...>` syntax | ||
|
||
warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant | ||
error: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant | ||
--> $DIR/redundant.rs:16:22 | ||
| | ||
LL | fn in_trait() -> impl Sized + use<'a, Self>; | ||
| ^^^^^^^^^^^^^------------- | ||
| | | ||
| help: remove the `use<...>` syntax | ||
|
||
warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant | ||
error: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant | ||
--> $DIR/redundant.rs:20:22 | ||
| | ||
LL | fn in_trait() -> impl Sized + use<'a> {} | ||
| ^^^^^^^^^^^^^------- | ||
| | | ||
| help: remove the `use<...>` syntax | ||
|
||
warning: 4 warnings emitted | ||
error: aborting due to 4 previous errors | ||
|