-
Notifications
You must be signed in to change notification settings - Fork 892
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6217 from compiler-errors/sync-from-rust-2024-06-24
subtree-push 2024-06-24 Merge commit from master
- Loading branch information
Showing
16 changed files
with
158 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[toolchain] | ||
channel = "nightly-2024-06-13" | ||
channel = "nightly-2024-06-25" | ||
components = ["llvm-tools", "rustc-dev"] |
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,13 @@ | ||
// rustfmt-max_width: 120 | ||
// rustfmt-version: Two | ||
|
||
impl EarlyLintPass for NeedlessContinue { | ||
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { | ||
if let ExprKind::Loop(body, label, ..) | ExprKind::While(_, body, label) | ExprKind::ForLoop { body, label, .. } = | ||
&expr.kind | ||
&& !in_external_macro(cx.sess, expr.span) | ||
{ | ||
check_final_block_stmt(cx, body, label, expr.span.ctxt()); | ||
} | ||
} | ||
} |
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 @@ | ||
fn hello() -> impl | ||
use<'a> + Sized {} | ||
|
||
fn all_three() -> impl Sized + use<'a> + 'a; | ||
|
||
fn pathological() -> impl use<'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, | ||
'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, | ||
'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, | ||
'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a, 'a> + Sized {} |
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,14 @@ | ||
// rustfmt-max_width: 120 | ||
// rustfmt-version: Two | ||
|
||
impl EarlyLintPass for NeedlessContinue { | ||
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { | ||
if let ExprKind::Loop(body, label, ..) | ||
| ExprKind::While(_, body, label) | ||
| ExprKind::ForLoop { body, label, .. } = &expr.kind | ||
&& !in_external_macro(cx.sess, expr.span) | ||
{ | ||
check_final_block_stmt(cx, body, label, expr.span.ctxt()); | ||
} | ||
} | ||
} |
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,55 @@ | ||
fn hello() -> impl use<'a> + Sized {} | ||
|
||
fn all_three() -> impl Sized + use<'a> + 'a; | ||
|
||
fn pathological() -> impl use< | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
'a, | ||
> + Sized { | ||
} |