Skip to content

Rollup of 7 pull requests #107509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
167fbbc
rustdoc: update Source Serif 4 from 4.004 to 4.005
tspiteri Jan 27, 2023
1c3fc9d
add comment to rustdoc.css on updating filename suffixes
tspiteri Jan 27, 2023
e02517d
Fixed confusement between mod and remainder
Jan 27, 2023
fd649a3
Replace enum `==`s with `match`es where it makes sense
WaffleLapkin Jan 30, 2023
4d75f61
Use `Mutability::{is_mut, is_not}`
WaffleLapkin Jan 30, 2023
f1d273c
Replace some `_ == _ || _ == _`s with `matches!(_, _ | _)`s
WaffleLapkin Jan 30, 2023
8d7b092
Improved wording of error messages of missing remainder implementations
Jan 30, 2023
af9671f
Ran rustfmt
Jan 30, 2023
e905b93
Make the "extra if in let...else block" hint a suggestion
edward-shen Jan 30, 2023
0e98a16
Track bound types like bound regions
compiler-errors Jan 17, 2023
31c14f6
rustdoc: remove unused CSS from `.setting-check`
notriddle Jan 30, 2023
340414e
Review changes
WaffleLapkin Jan 31, 2023
fd5774a
Use `Edition` methods a bit more
WaffleLapkin Jan 31, 2023
5d90413
Document `rust_2015` methods
WaffleLapkin Jan 31, 2023
03158f4
Don't do `.edition().rust_*()`
WaffleLapkin Jan 31, 2023
ef6b583
Don't accept `Edition` by ref
WaffleLapkin Jan 31, 2023
c5092cd
Rollup merge of #107354 - tspiteri:source-serif-4.005, r=GuillaumeGomez
GuillaumeGomez Jan 31, 2023
fb3eff2
Rollup merge of #107389 - zvavybir:master, r=estebank
GuillaumeGomez Jan 31, 2023
037d3e4
Rollup merge of #107467 - WaffleLapkin:uneq, r=oli-obk
GuillaumeGomez Jan 31, 2023
7e107b3
Rollup merge of #107486 - compiler-errors:bound-ty-keep-name, r=oli-obk
GuillaumeGomez Jan 31, 2023
1e64a38
Rollup merge of #107487 - edward-shen:edward-shen/107213-round-2, r=e…
GuillaumeGomez Jan 31, 2023
a354532
Rollup merge of #107491 - notriddle:notriddle/setting-check, r=Guilla…
GuillaumeGomez Jan 31, 2023
544b73b
Rollup merge of #107508 - WaffleLapkin:uneq'15, r=oli-obk
GuillaumeGomez Jan 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ pub(crate) enum IfExpressionMissingThenBlockSub {
}

#[derive(Subdiagnostic)]
#[help(parse_extra_if_in_let_else)]
#[suggestion(parse_extra_if_in_let_else, applicability = "maybe-incorrect", code = "")]
pub(crate) struct IfExpressionLetSomeSub {
#[primary_span]
pub if_span: Span,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2290,7 +2290,7 @@ impl<'a> Parser<'a> {
block
} else {
let let_else_sub = matches!(cond.kind, ExprKind::Let(..))
.then(|| IfExpressionLetSomeSub { if_span: lo });
.then(|| IfExpressionLetSomeSub { if_span: lo.until(cond_span) });

self.sess.emit_err(IfExpressionMissingThenBlock {
if_span: lo,
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/let-else/accidental-if.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ help: add a block here
LL | if let Some(y) = x else {
| ^
help: remove the `if` if you meant to write a `let...else` statement
--> $DIR/accidental-if.rs:3:5
|
LL | if let Some(y) = x else {
| ^^
LL - if let Some(y) = x else {
LL + let Some(y) = x else {
|

error: aborting due to previous error

Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ help: add a block here
LL | if let Some(n) = opt else {
| ^
help: remove the `if` if you meant to write a `let...else` statement
--> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:24:5
|
LL | if let Some(n) = opt else {
| ^^
LL - if let Some(n) = opt else {
LL + let Some(n) = opt else {
|

error: this `if` expression is missing a block after the condition
--> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:28:5
Expand Down